Text output needs clipping? |
Post Reply |
Author | |
_esl
Newbie Joined: 23 January 2007 Status: Offline Points: 1 |
Post Options
Thanks(0)
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); |
|
esc67
Newbie Joined: 09 June 2005 Status: Offline Points: 29 |
Post Options
Thanks(0)
|
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:
|
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |