[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bidi reordering engine upgraded

From: Eli Zaretskii
Subject: Re: Bidi reordering engine upgraded
Date: Thu, 16 Oct 2014 13:15:24 +0300

> From: Thien-Thi Nguyen <address@hidden>
> Date: Thu, 16 Oct 2014 11:42:34 +0200
>    why we subtract 1 pixel from the cursor glyph's pixel_width
> I see in XDrawRectangle(3):
>  The XDrawRectangle and XDrawRectangles functions draw the
>  outlines of the specified rectangle or rectangles as if a
>  five-point PolyLine protocol request were specified for
>  each rectangle:
>    [x,y] [x+width,y] [x+width,y+height] [x,y+height] [x,y]
> So if you use the glyph width directly, the resulting rectangle
> drawn will invade the next character cell by one pixel.

The last sentence is your interpretation, because the documentation
you cite does not explain what exactly it means by "the outlines of
the rectangle".  That is, it doesn't say whether the 1-pixel border of
the outline exceeds the x+width coordinate, or ends at it.  And that's
the crucial point here.

> Probably (i don't have docs handy) the other toolkits'
> rectangle-drawing primitives draw from X,Y to X+W-1,Y+H-1

I don't think so, at least not the w32 toolkit, whose documentation

  The FrameRect function draws a border around the specified rectangle
  by using the specified brush. The width and height of the border are
  always one logical unit.

This is equivalent to what you cited from the X docs, AFAIU.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]