Print Page | Close Window

Text output needs clipping?

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Syntax Edit
Forum Description: Topics Related to Codejock Syntax Edit
URL: http://forum.codejock.com/forum_posts.asp?TID=6200
Printed Date: 23 November 2024 at 7:17pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Text output needs clipping?
Posted By: _esl
Subject: Text output needs clipping?
Date Posted: 23 January 2007 at 6:31pm
I noticed that when the font is set to Consolas and ClearType rendering is on, I can see that sometimes the last column of pixels of a text block is overdrawn by the next block, cropping round letters:
 
 
The effect disappeared when I changed CXTPSyntaxEditPaintManager::DrawLineText to use ExtTextOut with clipping:
...
CRect rcBGex(nOutCol, /*nTxtBottom - 1 -> */iLine, nOutCol + nTxtWidth, nTxtBottom);
...
pDC->FillSolidRect(&rcBGex, pDC->GetBkColor());
/* pDC->TextOut(nOutCol, iLine, pOutText, nOutTextLen); -> */
pDC->ExtTextOut(nOutCol, iLine, ETO_CLIPPED|ETO_OPAQUE, &rcBGex, pOutText, nOutTextLen, NULL);



Replies:
Posted By: esc67
Date Posted: 07 February 2007 at 12:17am
I noticed a similar problem in the MDI Text Editor sample (straight Debug build, no changes). In my case entire letters are missing.
 
See how the "e" in "parent:file" is totally occluded:
 
 
 
 
 



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net