Re: robsta - r24035 - abiword/branches/gsoc2008cairo/src/af/gr/gtk

From: J.M. Maurer <uwog_at_uwog.net>
Date: Mon May 26 2008 - 22:45:51 CEST

On Mon, 2008-05-26 at 22:03 +0200, Robert Staudinger wrote:
> On Mon, May 26, 2008 at 6:55 PM, J.M. Maurer <uwog@uwog.net> wrote:
>
> [...]
>
> > I don't think this is actually correct. If you do x1 + width = x2, then
> > your x2 is 1 pixel too big. For example, left pos x1 = 0, width = 10,
> > then x2 should be 9, not 10. So you need an additional -1. Same case for
> > y2.
> >
> > We have this mistake all over the code. No need to spread it any
> > further :)
>
> http://cairographics.org/FAQ/#sharp_lines
>
> It seems both of us are not quite correct.

That example is weird too:

  cairo_move_to (cr, 10, 10);
  cairo_line_to (cr, 20, 10);
  cairo_set_line_width (cr, 1);
  cairo_stroke (cr);

  The user expects 10 pixels in one row to be affected,

I would expect 11 pixels to be affected (10-19 would be 10 pixels).

Ah well, as long as you are aware that x2-x1 != width, and x2-x1+1 =
width in general, then I'm happy :)

  Marc
Received on Mon May 26 22:46:16 2008

This archive was generated by hypermail 2.1.8 : Mon May 26 2008 - 22:46:16 CEST