FLTK logo

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

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? - [General Use] Albrecht Schlosser Feb 26, 2021  
 
On 2/26/21 9:42 AM Manolo wrote:
I'm completely lost after all these propositions.

1) Functions fl_push_matrix()/fl_pop_matrix() belong to the "Drawing complex shapes" API so they affect only that part of the drawing API. In contrast, the scaling factor affects all
drawing functions. I don't see how a transient change of the scaling factor
could be related to the transformation matrix of the "complex shapes" API.

I agree, using the transformation would be bad and confusing (IMHO).

I believe we might need a warning in the docs that the transformation matrix would need to be reset by the user if it's unity because of different coordinate systems before and after resetting the scaling factor. Otherwise the result of drawing complex shapes might be undefined.

2) Proposal for this function
    float fl_set_scale(float s);
involves two scaling factor values, the current one, and the new one, whereas in what has been programmed, the new value is always 1.
I don't see how changing the scaling factor to another
value makes sense. The goal is to allow working at the single
pixel level. And only one value of the scaling factor is
compatible with that, value 1.f.

Yes, you're right. I withdraw this proposal. The reason for using the parameter "float s" was because "set_scale" should "set something". It looked weird without an argument. Withdrawn.

My vote is now for Ian's

  fl_override_scale()  paired with  fl_restore_scale()

followed by Greg's

  fl_unscale() / fl_rescale()

or (yet another proposal)

  fl_unset_scale() / fl_restore_scale()

--
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/be8789fe-fa4a-263f-76ea-b439e038991a%40online.de.
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'.