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? Albrecht Schlosser Feb 24, 2021  
 
On 2/24/21 3:28 PM Manolo wrote:

On Wednesday, February 24, 2021 at 3:00:18 PM UTC+1 remy.o...@gmail.com wrote:

    Ideally for me, at 200% DPI a boxtype function could disable having
    its own draw calls scaled, and instead multiply its own X/Y/W/H
    arguments by screen_scale(), so it would be like drawing a box twice
    as large and with a doubled offset from (0,0). (Then it would decide
    whether to, for instance, draw some of its elements as thicker or not.)

When the scaling factor value is fractional, horizontal and vertical lines have varying width, precisely to make sure adjacent boxes remain adjacent. But at 200% (and 300%) all lines have the same width as in the attached png. I may add a new line style that would prevent lines from getting variable width with fractional scale factors, then your custom boxes would just have to use that line style. But it's not possible, I believe, to simultaneously have
fixed-width lines, adjacent boxes or lines, and fractional scale factors.

What I think Remy wants is to be able to switch to a "non-scaling" driver in his own draw() method, just like you could switch to an image surface, draw to the surface at a higher resolution (w*scale, h*scale), save the image, call image->scale(w,h) and then draw the image with image->draw(). Or something like that, maybe. This would presumably work for all scaling factors, not only integer ones.

@Remy: Maybe I missed some details but I think this would be possible with the current Fl_Image_Surface stuff. It's a little effort but if there's no better option...

@Manolo: Wouldn't it be great to be able to switch from the default "scaling" drivers to "non-scaling" drivers if the user wants to do that (as I think Remy would like to do)? As you can do with image surfaces etc.

This is just a thought, I don't know the scaling internals well enough, but maybe there's a way ...

--
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/6bc12ce6-c4ce-1f36-62a9-aecb5f1bf3fe%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'.