unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: emacs-devel@gnu.org
Subject: Re: Bidi reordering engine upgraded
Date: Thu, 16 Oct 2014 16:51:43 +0300	[thread overview]
Message-ID: <8361fk3yxc.fsf@gnu.org> (raw)
In-Reply-To: <8738ao5emi.fsf@zigzag.favinet>

> From: Thien-Thi Nguyen <ttn@gnu.org>
> Date: Thu, 16 Oct 2014 15:27:17 +0200
> 
> 
> [1:text/plain Hide]
> 
> () Eli Zaretskii <eliz@gnu.org>
> () Thu, 16 Oct 2014 13:15:24 +0300
> 
>    >  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.
> 
> My interpretation is informed by the word "PolyLine" (and general
> experience playing w/ the X protocol[0], but that is tangential); i
> ignore the word "outline" as noise.  XDrawline(3) explains things
> in gory detail, but to summarize, pixels "around" each point in a
> "polyline" are "rendered", so the upshot (of my example) is if ‘x’ is
> 20, ‘w’ is 10, and the "line width" is 1, then the pixel at 30,y will
> be rendered (undesirable) instead of the one at 29,y (desirable).

I cannot argue with experience and facts, but please be precise in
your description: when you say "the pixel at 30,y will be rendered",
do you mean between 30 and 31, or do you mean between 29 and 30?

More importantly, if you remove the "- 1" part, per my suggested
patch, do you see a change in the cursor dimensions when you toggle a
window between selected (filled block cursor) and non-selected (hollow
block cursor) status?

>      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.
> 
> I think it hinges on what how "the specified rectangle" is specified.

This sentence didn't parse.  How the rectangle is specified is
described on the same page, so you've probably read that already.




  reply	other threads:[~2014-10-16 13:51 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-15 14:51 Bidi reordering engine upgraded Eli Zaretskii
2014-10-15 15:22 ` Dmitry Antipov
2014-10-15 15:47   ` Eli Zaretskii
2014-10-15 16:00     ` Dmitry Antipov
2014-10-15 16:31       ` Eli Zaretskii
2014-10-15 17:28         ` Eli Zaretskii
2014-10-15 17:50           ` Eli Zaretskii
2014-10-16  3:55             ` Dmitry Antipov
2014-10-16  7:21               ` Eli Zaretskii
2014-10-16  9:42                 ` Thien-Thi Nguyen
2014-10-16 10:15                   ` Eli Zaretskii
2014-10-16 13:27                     ` Thien-Thi Nguyen
2014-10-16 13:51                       ` Eli Zaretskii [this message]
2014-10-17  5:42                         ` Thien-Thi Nguyen
2014-10-17  6:16                           ` Eli Zaretskii
2014-10-17  7:50                             ` Thien-Thi Nguyen
2014-10-17  8:25                               ` Eli Zaretskii
2014-10-17 10:27                                 ` Thien-Thi Nguyen
2014-10-17 10:31                                   ` Eli Zaretskii
2014-10-16  9:51                 ` Dmitry Antipov
2014-10-16 10:20                   ` Eli Zaretskii
2014-10-16 11:28                   ` Eli Zaretskii
2014-10-17  6:46                 ` Eli Zaretskii
2014-10-17 17:45                 ` Jan Djärv
2014-10-17 18:45                   ` Eli Zaretskii
2014-10-17 19:32                     ` Stefan Monnier
2014-10-18 12:34                     ` Jan Djärv
2014-10-18 12:54                       ` Eli Zaretskii
2014-10-18 13:13                         ` Eli Zaretskii
2014-10-19 11:45                           ` Jan Djärv
2014-10-19 13:19                             ` Eli Zaretskii
2014-10-19 11:49                           ` Jan Djärv
2014-10-19 13:20                             ` Eli Zaretskii
  -- strict thread matches above, loose matches on Subject: below --
2014-10-17 11:12 grischka
2014-10-17 11:42 ` martin rudalics
2014-10-17 11:47   ` David Kastrup
2014-10-17 13:21   ` grischka
2014-10-17 13:30     ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8361fk3yxc.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).