FLTK logo

Re: [fltk.general] Re: Can custom box type functions handle their own high-DPI screen scaling?

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.general  ]
 
Previous Message ]New Message | Reply ]Next Message ]

Re: Re: Can custom box type functions handle their own high-DPI screen scaling? Remy Oukaour Feb 26, 2021  
  Thank you, this does just what I needed! The fl_remove_scale()/fl_restore_scale() API is a convenient wrapper around what was already possible.

On Wednesday, February 24, 2021 at 12:59:18 PM UTC-5 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.

--
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/bf92063a-71cb-4d2e-9792-bf999789c738n%40googlegroups.com.
Direct Link to Message ]
 
     
Previous Message ]New Message | Reply ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.