Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Syntax Edit
  New Posts New Posts RSS Feed - Text output needs clipping?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Text output needs clipping?

 Post Reply Post Reply
Author
Message Reverse Sort Order
esc67 View Drop Down
Newbie
Newbie


Joined: 09 June 2005
Status: Offline
Points: 29
Post Options Post Options   Thanks (0) Thanks(0)   Quote esc67 Quote  Post ReplyReply Direct Link To This Post Topic: Text output needs clipping?
    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:
 
 
 
 
 
Back to Top
_esl View Drop Down
Newbie
Newbie


Joined: 23 January 2007
Status: Offline
Points: 1
Post Options Post Options   Thanks (0) Thanks(0)   Quote _esl Quote  Post ReplyReply Direct Link To This Post 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);
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.156 seconds.