From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Bidi reordering engine upgraded Date: Thu, 16 Oct 2014 13:15:24 +0300 Message-ID: <83egu848xv.fsf@gnu.org> References: <834mv55quj.fsf@gnu.org> <543E9122.6070605@yandex.ru> <8338ap5o7l.fsf@gnu.org> <543E9A1C.2010904@yandex.ru> <831tq95m6x.fsf@gnu.org> <83zjcx450f.fsf@gnu.org> <83y4sh43zq.fsf@gnu.org> <543F41C9.3000507@yandex.ru> <83oatc4gz3.fsf@gnu.org> <877g005p11.fsf@zigzag.favinet> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1413454566 8780 80.91.229.3 (16 Oct 2014 10:16:06 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 16 Oct 2014 10:16:06 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Oct 16 12:15:58 2014 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Xei69-0001IS-RO for ged-emacs-devel@m.gmane.org; Thu, 16 Oct 2014 12:15:57 +0200 Original-Received: from localhost ([::1]:49586 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xei69-0006Db-65 for ged-emacs-devel@m.gmane.org; Thu, 16 Oct 2014 06:15:57 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57170) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xei5i-0006D8-PV for emacs-devel@gnu.org; Thu, 16 Oct 2014 06:15:36 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xei5c-0000tu-5H for emacs-devel@gnu.org; Thu, 16 Oct 2014 06:15:30 -0400 Original-Received: from mtaout28.012.net.il ([80.179.55.184]:36501) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xei5b-0000tS-SJ for emacs-devel@gnu.org; Thu, 16 Oct 2014 06:15:24 -0400 Original-Received: from conversion-daemon.mtaout28.012.net.il by mtaout28.012.net.il (HyperSendmail v2007.08) id <0NDJ00N007TDTI00@mtaout28.012.net.il> for emacs-devel@gnu.org; Thu, 16 Oct 2014 13:13:37 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout28.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NDJ00JZE8EO3Q50@mtaout28.012.net.il> for emacs-devel@gnu.org; Thu, 16 Oct 2014 13:13:37 +0300 (IDT) In-reply-to: <877g005p11.fsf@zigzag.favinet> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 80.179.55.184 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:175450 Archived-At: > From: Thien-Thi Nguyen > 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 (http://msdn.microsoft.com/en-us/library/dd144838%28v=vs.85%29.aspx) says: 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.