Index: [thread] [date] [subject] [author]
  From: Marcus Sundberg <mackan@stacken.kth.se>
  To  : ggi-develop@eskimo.com
  Date: Thu, 10 Jun 1999 21:32:39 +0000

Re: ggiDrawHLine and ggiDrawVLine bugs?

Tristan Wibberley wrote:
> 
> The display-x and display-xlib targets seem to behave differently when doing either
> ggiDrawHLine or ggiDrawVLine, with display-xlib drawing lines one pixel longer.
> 
> * display-x draws lines from the starting pixel up to, but not
> including the starting pixel + length.
> * display-xlib draws lines from the starting pixel up to, *and*
> including the staing pixel + length. (ie, it's one pixel longer
> than one would expect).
> 
>              start           start+length
>              +               +
> display-x    ################
> display-xlib #################
> 
> Should:
> 
>         XDrawLine(priv->xwin.x.display, priv->xwin.window, priv->xwin.x.gc,
>                   x, y, x+w, y);
> 
> in display/Xlib/hline.c be:
> 
>         XDrawLine(priv->xwin.x.display, priv->xwin.window, priv->xwin.x.gc,
>                 x, y, x+w-1, y);
> 
> Since the Xlib call takes start point and end point, not the point where
> the line starts and number of pixels on the line.
> 
> Is this actually happening? Am I imagining it? Is anything else affected
> by differences in behaviour between LibGGI and Xlib?

Just plain old bugs in the xlib target. ;) Thanks for finding those!
Probably some leftovers from when I was messing with the clipping code
a long time ago.

//Marcus
-- 
-------------------------------+------------------------------------
        Marcus Sundberg        | http://www.stacken.kth.se/~mackan/
 Royal Institute of Technology |       Phone: +46 707 295404
       Stockholm, Sweden       |   E-Mail: mackan@stacken.kth.se

Index: [thread] [date] [subject] [author]