U++ framework
Do not panic. Ask here before giving up.

Home » U++ Library support » Draw, Display, Images, Bitmaps, Icons » Painter Text Underline/Strikeout not working
Re: Painter Text Underline/Strikeout not working [message #47442 is a reply to message #47436] Tue, 17 January 2017 09:20 Go to previous messageGo to previous message
Tom1
Messages: 1319
Registered: March 2007
Ultimate Contributor
Hi Mirek,

Sorry to waste your time with stupid mistakes I make. I sincerely hope this is my final update for Painter.cpp Painter::TextOp() :
...
	if(fnt.IsUnderline() || fnt.IsStrikeout()) {
		int a = fnt.GetAscent();
		int cy = max(a / 16, 1);
		int cx = x - p.x;
		if(fnt.IsUnderline())
			Rectangle(p.x, p.y + a + cy, cx, cy);
		if(fnt.IsStrikeout())
			Rectangle(p.x, p.y + 2 * a / 3, cx, cy);
	}


Thanks and best regards,

Tom
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Assertion fails in BufferPainter::TransformOp() with rotated text
Next Topic: Painter Fill with Image MSC14x64 performance issue
Goto Forum:
  


Current Time: Sun Sep 27 19:08:02 GMT+2 2026

Total time taken to generate the page: 0.01093 seconds