|
|
On 2/25/21 3:54 PM Manolo wrote:
On Thursday, February 25, 2021 at 1:57:34 PM UTC+1 Albrecht Schlosser wrote:
If there's anything wrong with my test program, please tell me.
Yes. There is. That program assumes the font face and size are correctly
set when fl_text_extents() is called. But that's not the case at
the very beginning of the draw() method.
If you add
fl_font(labelfont(), labelsize());
just before
fl_text_extents(label(), dx, dy, ll, lh);
all runs smoothly.
Ooh, what a silly mistake, sorry for the noise. I had copied things
around and obviously deleted that line.
Works now, as you say. Thanks for the correction.
The transient window display lets the font size to large values which
produce erroneously large colored boxes later.
Yep, that explains it very well.
--
You received this message because you are subscribed to the Google Groups "fltk.general" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkgeneral+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkgeneral/5d22c61e-f4b3-4ec2-ea84-bc1270afdc14%40online.de.
[ Direct Link to Message ] | |
|
| |