Class Hierarchy
Fl_Widget
|
+----Fl_Shared_Image_Display
Include Files
#include <FL/Fl_Shared_Image_Display.H>
Download source: Fl_Shared_Image_Display.zip
Description
The Fl_Shared_Image_Display will display an Fl_Image. The image can be rotated, and a background color can be set for unfilled space. All scaling and rotations are done as the image is being drawn, so this widget should have little memory overhead.
Notes:
- Pixmap glitches and transparency issues fixed.
- Based on a (very) rough benchmark, this version is about five and a half times faster than the first attempt. There are still some inefficiencies, but I consider the tradeoff of messier, less powerful code to be not worth it right now.
Methods
Creates a new Fl_Shared_Image_Display widget and sets some defaults.
The default destructor.
Sets the image to display and redraws if necessary.
Set or return the background color displayed around the image. Redraws if necessary. The default is FL_GRAY
Set or return whether or not the image fills the entire widget, or keeps its original aspect ratio. Redraws if necessary. The default is false
Set or return the rotation applied to the image, redrawing if necessary. Recognized values are from 0 to 8, anything else will result in attempted value, modulo 8, being set. Defaults to no rotation.
- 0 - no rotation
- 1 - no rotation
- 2 - flip horizontal
- 3 - rotate 180°
- 4 - flip vertical
- 5 - flip horizontal, then rotate 90° left
- 6 - rotate 90° left (CCW)
- 7 - flip horizontal, then rotate 90° right
- 8 - rotate 90° right (CW)
(Note that values 1 through 8 will rotate for correct display of images with the same-valued EXIF orientations.)