Home » U++ Library support » Draw, Display, Images, Bitmaps, Icons » Painter Text Underline/Strikeout not working
Re: Painter Text Underline/Strikeout not working [message #47445 is a reply to message #47442] |
Tue, 17 January 2017 09:38 |
|
mirek
Messages: 13975 Registered: November 2005
|
Ultimate Member |
|
|
Missed that one. However, looking at the code (and compiler warnings), should not these 'int's be really 'double's?
if(fnt.IsUnderline() || fnt.IsStrikeout()) {
double a = fnt.GetAscent();
double cy = max(a / 16, 1.0);
double 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);
}
Maybe even that 'max' is not really needed...
(Commiting with doubles, for now)
|
|
|
|
|
Painter Text Underline/Strikeout not working
By: Tom1 on Fri, 30 December 2016 10:18
|
|
|
Re: Painter Text Underline/Strikeout not working
By: Tom1 on Fri, 30 December 2016 11:05
|
|
|
Re: Painter Text Underline/Strikeout not working
By: mirek on Sun, 01 January 2017 21:33
|
|
|
Re: Painter Text Underline/Strikeout not working
By: Tom1 on Mon, 02 January 2017 09:28
|
|
|
Re: Painter Text Underline/Strikeout not working
By: mirek on Mon, 02 January 2017 09:56
|
|
|
Re: Painter Text Underline/Strikeout not working
By: Tom1 on Mon, 02 January 2017 10:09
|
|
|
Re: Painter Text Underline/Strikeout not working
By: Tom1 on Tue, 03 January 2017 09:12
|
|
|
Re: Painter Text Underline/Strikeout not working
By: Tom1 on Mon, 16 January 2017 10:38
|
|
|
Re: Painter Text Underline/Strikeout not working
By: mirek on Mon, 16 January 2017 11:19
|
|
|
Re: Painter Text Underline/Strikeout not working
By: Tom1 on Tue, 17 January 2017 09:20
|
|
|
Re: Painter Text Underline/Strikeout not working
By: mirek on Tue, 17 January 2017 09:38
|
|
|
Re: Painter Text Underline/Strikeout not working
By: Tom1 on Tue, 17 January 2017 10:55
|
|
|
Re: Painter Text Underline/Strikeout not working
By: mirek on Tue, 17 January 2017 16:09
|
Goto Forum:
Current Time: Tue May 07 17:32:17 CEST 2024
Total time taken to generate the page: 0.02597 seconds
|