digikam
cimg_library::CImgDisplay Struct Reference
#include <CImg.h>
Detailed Description
This class represents a window which can display CImg images and handles mouse and keyboard events.
Creating a CImgDisplay instance opens a window that can be used to display a CImg<T> image of a CImgList<T> image list inside. When a display is created, associated window events (such as mouse motion, keyboard and window size changes) are handled and can be easily detected by testing specific CImgDisplay data fields. See cimg_displays for a complete tutorial on using the CImgDisplay class.
Definition at line 7016 of file CImg.h.
Public Member Functions | |
| CImgDisplay & | assign (const CImgDisplay &disp) |
| template<typename T> | |
| CImgDisplay & | assign (const CImgList< T > &list, const char *title=0, const unsigned int normalization_type=3, const bool fullscreen_flag=false, const bool closed_flag=false) |
| template<typename T> | |
| CImgDisplay & | assign (const CImg< T > &img, const char *title=0, const unsigned int normalization_type=3, const bool fullscreen_flag=false, const bool closed_flag=false) |
| CImgDisplay & | assign (const unsigned int dimw, const unsigned int dimh, const char *title=0, const unsigned int normalization_type=3, const bool fullscreen_flag=false, const bool closed_flag=false) |
| CImgDisplay & | assign () |
| CImgDisplay (const CImgDisplay &disp) | |
| template<typename T> | |
| CImgDisplay (const CImgList< T > &list, const char *title=0, const unsigned int normalization_type=3, const bool fullscreen_flag=false, const bool closed_flag=false) | |
| template<typename T> | |
| CImgDisplay (const CImg< T > &img, const char *title=0, const unsigned int normalization_type=3, const bool fullscreen_flag=false, const bool closed_flag=false) | |
| CImgDisplay (const unsigned int dimw, const unsigned int dimh, const char *title=0, const unsigned int normalization_type=3, const bool fullscreen_flag=false, const bool closed_flag=false) | |
| CImgDisplay () | |
| CImgDisplay & | close () |
| int | dimx () const |
| int | dimy () const |
| template<typename T> | |
| CImgDisplay & | display (const CImg< T > &img) |
| template<typename T> | |
| CImgDisplay & | display (const CImgList< T > &list, const char axe='x', const char align='c') |
| template<typename tp, typename tf> | |
| CImgDisplay & | display_object3d (const tp &points, const CImgList< tf > &primitives, const bool centering=true, const int render_static=4, const int render_motion=1, const bool double_sided=false, const float focale=500.0f, const float specular_light=0.2f, const float specular_shine=0.1f, const bool display_axes=true, float *const pose_matrix=0, const float opacity=1.0f) |
| template<typename tp, typename tf, typename tc> | |
| CImgDisplay & | display_object3d (const tp &points, const CImgList< tf > &primitives, const CImgList< tc > &colors, const bool centering=true, const int render_static=4, const int render_motion=1, const bool double_sided=false, const float focale=500.0f, const float specular_light=0.2f, const float specular_shine=0.1f, const bool display_axes=true, float *const pose_matrix=0, const float opacity=1.0f) |
| template<typename tp, typename tf, typename tc, typename to> | |
| CImgDisplay & | display_object3d (const tp &points, const CImgList< tf > &primitives, const CImgList< tc > &colors, const to &opacities, const bool centering=true, const int render_static=4, const int render_motion=1, const bool double_sided=false, const float focale=500.0f, const float specular_light=0.2f, const float specular_shine=0.1f, const bool display_axes=true, float *const pose_matrix=0) |
| CImgDisplay & | flush () |
| float | frames_per_second () |
| CImgDisplay & | fullscreen (const bool redraw=true) |
| CImgDisplay & | hide_mouse () |
| bool | is_empty () const |
| bool | is_key (const unsigned int *const keyseq, const unsigned int N, const bool remove=true) |
| bool | is_key (const unsigned int key1, const unsigned int key2, const unsigned int key3, const unsigned int key4, const unsigned int key5, const unsigned int key6, const unsigned int key7, const unsigned int key8, const unsigned int key9, const bool remove) |
| bool | is_key (const unsigned int key1, const unsigned int key2, const unsigned int key3, const unsigned int key4, const unsigned int key5, const unsigned int key6, const unsigned int key7, const unsigned int key8, const bool remove) |
| bool | is_key (const unsigned int key1, const unsigned int key2, const unsigned int key3, const unsigned int key4, const unsigned int key5, const unsigned int key6, const unsigned int key7, const bool remove) |
| bool | is_key (const unsigned int key1, const unsigned int key2, const unsigned int key3, const unsigned int key4, const unsigned int key5, const unsigned int key6, const bool remove) |
| bool | is_key (const unsigned int key1, const unsigned int key2, const unsigned int key3, const unsigned int key4, const unsigned int key5, const bool remove) |
| bool | is_key (const unsigned int key1, const unsigned int key2, const unsigned int key3, const unsigned int key4, const bool remove) |
| bool | is_key (const unsigned int key1, const unsigned int key2, const unsigned int key3, const bool remove) |
| bool | is_key (const unsigned int key1, const unsigned int key2, const bool remove) |
| bool | is_key (const unsigned int key1, const bool remove) |
| bool | is_key (const bool remove=false) |
| CImgDisplay & | move (const int posx, const int posy) |
| CImgDisplay & | normalscreen (const bool redraw=true) |
| operator bool () const | |
| template<typename T> | |
| CImgDisplay & | operator<< (const CImgList< T > &list) |
| template<typename T> | |
| CImgDisplay & | operator<< (const CImg< T > &img) |
| CImgDisplay & | operator= (const CImgDisplay &disp) |
| CImgDisplay & | paint () |
| template<typename T> | |
| CImgDisplay & | render (const CImg< T > &img) |
| CImgDisplay & | resize (const int width, const int height, const bool redraw=true) |
| CImgDisplay & | resize (const bool redraw=true) |
| CImgDisplay & | resize (const CImgDisplay &disp, const bool redraw=true) |
| template<typename T> | |
| CImgDisplay & | resize (const CImg< T > &img, const bool redraw=true) |
| CImgDisplay & | set_mouse (const int posx, const int posy) |
| CImgDisplay & | set_title (const char *format,...) |
| CImgDisplay & | show () |
| CImgDisplay & | show_mouse () |
| template<typename T> | |
| const CImgDisplay & | snapshot (CImg< T > &img) const |
| CImgDisplay & | toggle_fullscreen (const bool redraw=true) |
| void | update_iskey (const unsigned int key, const bool pressed=true) |
| CImgDisplay & | wait () |
| CImgDisplay & | wait (const unsigned int milliseconds) |
| int | window_dimx () const |
| int | window_dimy () const |
| int | window_posx () const |
| int | window_posy () const |
| ~CImgDisplay () | |
Static Public Member Functions | |
| static unsigned int | _fitscreen (const unsigned int dx, const unsigned int dy=1, const unsigned int dz=1, const bool return_last=false) |
| template<typename t, typename T> | |
| static void | _render_resize (const T *ptrs, const unsigned int ws, const unsigned int hs, t *ptrd, const unsigned int wd, const unsigned int hd) |
| static int | screen_dimx () |
| static int | screen_dimy () |
| static void | wait (CImgDisplay &disp1, CImgDisplay &disp2, CImgDisplay &disp3, CImgDisplay &disp4) |
| static void | wait (CImgDisplay &disp1, CImgDisplay &disp2, CImgDisplay &disp3) |
| static void | wait (CImgDisplay &disp1, CImgDisplay &disp2) |
| static void | wait (CImgDisplay &disp1) |
| static void | wait_all () |
Public Attributes | |
| volatile unsigned int & | button |
| volatile unsigned int | buttons [512] |
| float | fps_fps |
| unsigned long | fps_frames |
| unsigned long | fps_timer |
| unsigned int | height |
| volatile bool | is_closed |
| volatile bool | is_event |
| bool | is_fullscreen |
| volatile bool | is_key0 |
| volatile bool | is_key1 |
| volatile bool | is_key2 |
| volatile bool | is_key3 |
| volatile bool | is_key4 |
| volatile bool | is_key5 |
| volatile bool | is_key6 |
| volatile bool | is_key7 |
| volatile bool | is_key8 |
| volatile bool | is_key9 |
| volatile bool | is_keyA |
| volatile bool | is_keyALTGR |
| volatile bool | is_keyAPPLEFT |
| volatile bool | is_keyAPPRIGHT |
| volatile bool | is_keyARROWDOWN |
| volatile bool | is_keyARROWLEFT |
| volatile bool | is_keyARROWRIGHT |
| volatile bool | is_keyARROWUP |
| volatile bool | is_keyB |
| volatile bool | is_keyBACKSPACE |
| volatile bool | is_keyC |
| volatile bool | is_keyCAPSLOCK |
| volatile bool | is_keyCTRLLEFT |
| volatile bool | is_keyCTRLRIGHT |
| volatile bool | is_keyD |
| volatile bool | is_keyDELETE |
| volatile bool | is_keyE |
| volatile bool | is_keyEND |
| volatile bool | is_keyENTER |
| volatile bool | is_keyESC |
| volatile bool | is_keyF |
| volatile bool | is_keyF1 |
| volatile bool | is_keyF10 |
| volatile bool | is_keyF11 |
| volatile bool | is_keyF12 |
| volatile bool | is_keyF2 |
| volatile bool | is_keyF3 |
| volatile bool | is_keyF4 |
| volatile bool | is_keyF5 |
| volatile bool | is_keyF6 |
| volatile bool | is_keyF7 |
| volatile bool | is_keyF8 |
| volatile bool | is_keyF9 |
| volatile bool | is_keyG |
| volatile bool | is_keyH |
| volatile bool | is_keyHOME |
| volatile bool | is_keyI |
| volatile bool | is_keyINSERT |
| volatile bool | is_keyJ |
| volatile bool | is_keyK |
| volatile bool | is_keyL |
| volatile bool | is_keyM |
| volatile bool | is_keyMENU |
| volatile bool | is_keyN |
| volatile bool | is_keyO |
| volatile bool | is_keyP |
| volatile bool | is_keyPAD0 |
| volatile bool | is_keyPAD1 |
| volatile bool | is_keyPAD2 |
| volatile bool | is_keyPAD3 |
| volatile bool | is_keyPAD4 |
| volatile bool | is_keyPAD5 |
| volatile bool | is_keyPAD6 |
| volatile bool | is_keyPAD7 |
| volatile bool | is_keyPAD8 |
| volatile bool | is_keyPAD9 |
| volatile bool | is_keyPADADD |
| volatile bool | is_keyPADDIV |
| volatile bool | is_keyPADMUL |
| volatile bool | is_keyPADSUB |
| volatile bool | is_keyPAGEDOWN |
| volatile bool | is_keyPAGEUP |
| volatile bool | is_keyPAUSE |
| volatile bool | is_keyQ |
| volatile bool | is_keyR |
| volatile bool | is_keyS |
| volatile bool | is_keySHIFTLEFT |
| volatile bool | is_keySHIFTRIGHT |
| volatile bool | is_keySPACE |
| volatile bool | is_keyT |
| volatile bool | is_keyTAB |
| volatile bool | is_keyU |
| volatile bool | is_keyV |
| volatile bool | is_keyW |
| volatile bool | is_keyX |
| volatile bool | is_keyY |
| volatile bool | is_keyZ |
| volatile bool | is_moved |
| volatile bool | is_resized |
| volatile unsigned int & | key |
| volatile unsigned int | keys [512] |
| float | max |
| float | min |
| volatile int | mouse_x |
| volatile int | mouse_y |
| unsigned int | normalization |
| volatile unsigned int & | released_key |
| volatile unsigned int | released_keys [512] |
| unsigned long | timer |
| char * | title |
| volatile int | wheel |
| unsigned int | width |
| volatile unsigned int | window_height |
| volatile unsigned int | window_width |
| volatile int | window_x |
| volatile int | window_y |
Constructor & Destructor Documentation
| cimg_library::CImgDisplay::CImgDisplay | ( | ) | [inline] |
| cimg_library::CImgDisplay::CImgDisplay | ( | const unsigned int | dimw, | |
| const unsigned int | dimh, | |||
| const char * | title = 0, |
|||
| const unsigned int | normalization_type = 3, |
|||
| const bool | fullscreen_flag = false, |
|||
| const bool | closed_flag = false | |||
| ) | [inline] |
Create a display window with a specified size pwidth x height.
- Parameters:
-
dimw Width of the display window. dimh Height of the display window. title Title of the display window. normalization_type Normalization type of the display window (0=none, 1=always, 2=once). fullscreen_flag : Fullscreen mode. closed_flag : Initially visible mode. A black image will be initially displayed in the display window.
| cimg_library::CImgDisplay::CImgDisplay | ( | const CImg< T > & | img, | |
| const char * | title = 0, |
|||
| const unsigned int | normalization_type = 3, |
|||
| const bool | fullscreen_flag = false, |
|||
| const bool | closed_flag = false | |||
| ) | [inline] |
Create a display window from an image.
- Parameters:
-
img : Image that will be used to create the display window. title : Title of the display window normalization_type : Normalization type of the display window. fullscreen_flag : Fullscreen mode. closed_flag : Initially visible mode.
| cimg_library::CImgDisplay::CImgDisplay | ( | const CImgList< T > & | list, | |
| const char * | title = 0, |
|||
| const unsigned int | normalization_type = 3, |
|||
| const bool | fullscreen_flag = false, |
|||
| const bool | closed_flag = false | |||
| ) | [inline] |
Create a display window from an image list.
- Parameters:
-
list : The list of images to display. title : Title of the display window normalization_type : Normalization type of the display window. fullscreen_flag : Fullscreen mode. closed_flag : Initially visible mode.
| cimg_library::CImgDisplay::CImgDisplay | ( | const CImgDisplay & | disp | ) | [inline] |
| cimg_library::CImgDisplay::~CImgDisplay | ( | ) | [inline] |
Member Function Documentation
| static unsigned int cimg_library::CImgDisplay::_fitscreen | ( | const unsigned int | dx, | |
| const unsigned int | dy = 1, |
|||
| const unsigned int | dz = 1, |
|||
| const bool | return_last = false | |||
| ) | [inline, static] |
| static void cimg_library::CImgDisplay::_render_resize | ( | const T * | ptrs, | |
| const unsigned int | ws, | |||
| const unsigned int | hs, | |||
| t * | ptrd, | |||
| const unsigned int | wd, | |||
| const unsigned int | hd | |||
| ) | [inline, static] |
| CImgDisplay& cimg_library::CImgDisplay::assign | ( | const CImgDisplay & | disp | ) | [inline] |
| CImgDisplay& cimg_library::CImgDisplay::assign | ( | const CImgList< T > & | list, | |
| const char * | title = 0, |
|||
| const unsigned int | normalization_type = 3, |
|||
| const bool | fullscreen_flag = false, |
|||
| const bool | closed_flag = false | |||
| ) | [inline] |
| CImgDisplay& cimg_library::CImgDisplay::assign | ( | const CImg< T > & | img, | |
| const char * | title = 0, |
|||
| const unsigned int | normalization_type = 3, |
|||
| const bool | fullscreen_flag = false, |
|||
| const bool | closed_flag = false | |||
| ) | [inline] |
| CImgDisplay& cimg_library::CImgDisplay::assign | ( | const unsigned int | dimw, | |
| const unsigned int | dimh, | |||
| const char * | title = 0, |
|||
| const unsigned int | normalization_type = 3, |
|||
| const bool | fullscreen_flag = false, |
|||
| const bool | closed_flag = false | |||
| ) | [inline] |
| CImgDisplay& cimg_library::CImgDisplay::assign | ( | ) | [inline] |
| CImgDisplay& cimg_library::CImgDisplay::close | ( | ) | [inline] |
| int cimg_library::CImgDisplay::dimx | ( | ) | const [inline] |
| int cimg_library::CImgDisplay::dimy | ( | ) | const [inline] |
| CImgDisplay& cimg_library::CImgDisplay::display | ( | const CImg< T > & | img | ) | [inline] |
| CImgDisplay& cimg_library::CImgDisplay::display | ( | const CImgList< T > & | list, | |
| const char | axe = 'x', |
|||
| const char | align = 'c' | |||
| ) | [inline] |
Display an image list CImgList<T> into a display window.
First, all images of the list are appended into a single image used for visualization, then this image is displayed in the current display window.
- Parameters:
-
list : The list of images to display. axe : The axe used to append the image for visualization. Can be 'x' (default),'y','z' or 'v'. align : Defines the relative alignment of images when displaying images of different sizes. Can be ' c'(centered, which is the default), 'p'(top alignment) and 'n'(bottom aligment).
| CImgDisplay& cimg_library::CImgDisplay::display_object3d | ( | const tp & | points, | |
| const CImgList< tf > & | primitives, | |||
| const bool | centering = true, |
|||
| const int | render_static = 4, |
|||
| const int | render_motion = 1, |
|||
| const bool | double_sided = false, |
|||
| const float | focale = 500.0f, |
|||
| const float | specular_light = 0.2f, |
|||
| const float | specular_shine = 0.1f, |
|||
| const bool | display_axes = true, |
|||
| float *const | pose_matrix = 0, |
|||
| const float | opacity = 1.0f | |||
| ) | [inline] |
| CImgDisplay& cimg_library::CImgDisplay::display_object3d | ( | const tp & | points, | |
| const CImgList< tf > & | primitives, | |||
| const CImgList< tc > & | colors, | |||
| const bool | centering = true, |
|||
| const int | render_static = 4, |
|||
| const int | render_motion = 1, |
|||
| const bool | double_sided = false, |
|||
| const float | focale = 500.0f, |
|||
| const float | specular_light = 0.2f, |
|||
| const float | specular_shine = 0.1f, |
|||
| const bool | display_axes = true, |
|||
| float *const | pose_matrix = 0, |
|||
| const float | opacity = 1.0f | |||
| ) | [inline] |
| CImgDisplay& cimg_library::CImgDisplay::display_object3d | ( | const tp & | points, | |
| const CImgList< tf > & | primitives, | |||
| const CImgList< tc > & | colors, | |||
| const to & | opacities, | |||
| const bool | centering = true, |
|||
| const int | render_static = 4, |
|||
| const int | render_motion = 1, |
|||
| const bool | double_sided = false, |
|||
| const float | focale = 500.0f, |
|||
| const float | specular_light = 0.2f, |
|||
| const float | specular_shine = 0.1f, |
|||
| const bool | display_axes = true, |
|||
| float *const | pose_matrix = 0 | |||
| ) | [inline] |
| CImgDisplay& cimg_library::CImgDisplay::flush | ( | ) | [inline] |
| float cimg_library::CImgDisplay::frames_per_second | ( | ) | [inline] |
| CImgDisplay& cimg_library::CImgDisplay::fullscreen | ( | const bool | redraw = true |
) | [inline] |
| CImgDisplay& cimg_library::CImgDisplay::hide_mouse | ( | ) | [inline] |
| bool cimg_library::CImgDisplay::is_empty | ( | ) | const [inline] |
| bool cimg_library::CImgDisplay::is_key | ( | const unsigned int *const | keyseq, | |
| const unsigned int | N, | |||
| const bool | remove = true | |||
| ) | [inline] |
| bool cimg_library::CImgDisplay::is_key | ( | const unsigned int | key1, | |
| const unsigned int | key2, | |||
| const unsigned int | key3, | |||
| const unsigned int | key4, | |||
| const unsigned int | key5, | |||
| const unsigned int | key6, | |||
| const unsigned int | key7, | |||
| const unsigned int | key8, | |||
| const unsigned int | key9, | |||
| const bool | remove | |||
| ) | [inline] |
| bool cimg_library::CImgDisplay::is_key | ( | const unsigned int | key1, | |
| const unsigned int | key2, | |||
| const unsigned int | key3, | |||
| const unsigned int | key4, | |||
| const unsigned int | key5, | |||
| const unsigned int | key6, | |||
| const unsigned int | key7, | |||
| const unsigned int | key8, | |||
| const bool | remove | |||
| ) | [inline] |
| bool cimg_library::CImgDisplay::is_key | ( | const unsigned int | key1, | |
| const unsigned int | key2, | |||
| const unsigned int | key3, | |||
| const unsigned int | key4, | |||
| const unsigned int | key5, | |||
| const unsigned int | key6, | |||
| const unsigned int | key7, | |||
| const bool | remove | |||
| ) | [inline] |
| bool cimg_library::CImgDisplay::is_key | ( | const unsigned int | key1, | |
| const unsigned int | key2, | |||
| const unsigned int | key3, | |||
| const unsigned int | key4, | |||
| const unsigned int | key5, | |||
| const unsigned int | key6, | |||
| const bool | remove | |||
| ) | [inline] |
| bool cimg_library::CImgDisplay::is_key | ( | const unsigned int | key1, | |
| const unsigned int | key2, | |||
| const unsigned int | key3, | |||
| const unsigned int | key4, | |||
| const unsigned int | key5, | |||
| const bool | remove | |||
| ) | [inline] |
| bool cimg_library::CImgDisplay::is_key | ( | const unsigned int | key1, | |
| const unsigned int | key2, | |||
| const unsigned int | key3, | |||
| const unsigned int | key4, | |||
| const bool | remove | |||
| ) | [inline] |
| bool cimg_library::CImgDisplay::is_key | ( | const unsigned int | key1, | |
| const unsigned int | key2, | |||
| const unsigned int | key3, | |||
| const bool | remove | |||
| ) | [inline] |
| bool cimg_library::CImgDisplay::is_key | ( | const unsigned int | key1, | |
| const unsigned int | key2, | |||
| const bool | remove | |||
| ) | [inline] |
| bool cimg_library::CImgDisplay::is_key | ( | const unsigned int | key1, | |
| const bool | remove | |||
| ) | [inline] |
| bool cimg_library::CImgDisplay::is_key | ( | const bool | remove = false |
) | [inline] |
| CImgDisplay& cimg_library::CImgDisplay::move | ( | const int | posx, | |
| const int | posy | |||
| ) | [inline] |
| CImgDisplay& cimg_library::CImgDisplay::normalscreen | ( | const bool | redraw = true |
) | [inline] |
| cimg_library::CImgDisplay::operator bool | ( | )& |
KDE 4.2 API Reference