|
|
On Wednesday, February 24, 2021 at 8:38:48 PM UTC+1 Ian MacArthur wrote:
On 24 Feb 2021, at 17:59, Manolo wrote:
>
> The possibility to draw using an unscaled context is already present in FLTK 1.4.
> The key is to call Fl_Graphics_Driver::scale(float s) to change the scaling factor
> and set it to 1. I attach a small example program that redraws a button label
> using an unscaled setting. The result is that lines have a constant width, set to 1, 2 and 3
> with growing scale factor values.
Neat, didn’t know that worked.
Can you change the scale factor during a draw() method? I wonder if you could use this technique to, for example, have the text scale “normally” with the DPI, but force lines always to be scale 1.0, or etc...?
Please, look at my example program button.cxx that does exactly this.
--
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/9f00dc6b-7cdc-4f1d-8827-960cfb13b81fn%40googlegroups.com.
[ Direct Link to Message ] | |
|
| |