FLTK logo

Re: [fltk/fltk] Fl_Shared_Image Improvements (#188)

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.issues  ]
 
Previous Message ]New Message | Reply ]Next Message ]

Re: [fltk/fltk] Fl_Shared_Image Improvements (#188) ManoloFLTK Mar 15, 2021  
 

I believe the inconsistency noticed above to be fixed with commit a4866ff.

I propose a fix for the remaining issue, to remove the old-style aspect of class Fl_Shared_Image
in branch 1.4 (see attached shared_image_patch.txt) :

The fix modifies member function Fl_Shared_Image::get(const char *name, int W, int H).

Test program test/pixmap_browser.cxx is slightly modified to exercize the fix: a small
copy of the main image is added to the GUI. That makes two Fl_Shared_Image objects
that have identical underlying image (image_ member), identical data_w() and data_h()
but differ by their drawing size (w() and h()). The image file is read only once and the
image cache is computed only once with the full size of the image file. That cached form of the
image is used by two scale-and-draw operations when drawing the window.

Opinions?

shared_image_patch.txt


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

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'.