1 #ifndef GLIMAGE_SELECTIONS_GPU_H
2 #define GLIMAGE_SELECTIONS_GPU_H
4 #include "envGLImageCudas.h"
5 #include "GLImages_GPU.h"
6 #include "DomaineEcran_GPU.h"
8 /*----------------------------------------------------------------------*\
10 \*---------------------------------------------------------------------*/
12 /*--------------------------------------*\
14 \*-------------------------------------*/
18 class CBI_GLIMAGE_CUDA GLImageSelections
: public gpu::GLImages
21 /*--------------------------------------*\
23 \*-------------------------------------*/
27 GLImageSelections(gpu::ImageMOOs_A
* ptrImageCudaMOO
, bool isAnimationEnable
= true);
29 virtual ~GLImageSelections();
31 /*--------------------------------------*\
33 \*-------------------------------------*/
40 virtual void display(Panel_A
&panel
);
45 virtual void onMouseMoved(const MouseEvent
&event
);
50 virtual void onMousePressed(const MouseEvent
&event
);
55 virtual void onMouseReleased(const MouseEvent
&event
);
61 * then selection is performed with the mouse, 3 arguments :
62 * 1) selected domaine in frame coordinate
63 * 2) dx is the screen width in pixLa clel
64 * 3) dy is the screen height in pixel
66 virtual void selectionPerformed(const gpu::DomaineEcran
& domaineEcran
, int dx
, int dy
);
68 /*--------------------------------------*\
70 \*-------------------------------------*/
72 gpu::DomaineEcran
getCurrentDomaineSelection() const;
77 /*-------------------------------------*\
79 \*------------------------------------*/
83 gpu::DomaineEcran domaineSelection
;
86 bool isSelectionEnable
;
87 float ratio
; //ration de la taille de la selection proportionnel � l'image
93 /*----------------------------------------------------------------------*\
95 \*---------------------------------------------------------------------*/