X-Git-Url: http://git.euphorik.ch/?a=blobdiff_plain;f=WCudaMSE%2FAPI_Bilat_Image_GL_Cuda%2FINC%2Fgpu%2FGLImageSelections_GPU.h;fp=WCudaMSE%2FAPI_Bilat_Image_GL_Cuda%2FINC%2Fgpu%2FGLImageSelections_GPU.h;h=9fe201674eb1a683d042e06eaa109141dc6eefbe;hb=8d08c12b29c2a14684f35c023ee39e694bb80d25;hp=0000000000000000000000000000000000000000;hpb=226de81f7e1f1fbf4ac79d0d089e8a05ec7159a0;p=GPU.git diff --git a/WCudaMSE/API_Bilat_Image_GL_Cuda/INC/gpu/GLImageSelections_GPU.h b/WCudaMSE/API_Bilat_Image_GL_Cuda/INC/gpu/GLImageSelections_GPU.h new file mode 100755 index 0000000..9fe2016 --- /dev/null +++ b/WCudaMSE/API_Bilat_Image_GL_Cuda/INC/gpu/GLImageSelections_GPU.h @@ -0,0 +1,96 @@ +#ifndef GLIMAGE_SELECTIONS_GPU_H +#define GLIMAGE_SELECTIONS_GPU_H + +#include "envGLImageCudas.h" +#include "GLImages_GPU.h" +#include "DomaineEcran_GPU.h" + +/*----------------------------------------------------------------------*\ + |* Declaration *| + \*---------------------------------------------------------------------*/ + +/*--------------------------------------*\ + |* Public *| + \*-------------------------------------*/ + +namespace gpu + { + class CBI_GLIMAGE_CUDA GLImageSelections: public gpu::GLImages + { + + /*--------------------------------------*\ + |* Constructor *| + \*-------------------------------------*/ + + public: + + GLImageSelections(gpu::ImageMOOs_A* ptrImageCudaMOO, bool isAnimationEnable = true); + + virtual ~GLImageSelections(); + + /*--------------------------------------*\ + |* Methodes *| + \*-------------------------------------*/ + + public: + + /** + * Override + */ + virtual void display(Panel_A &panel); + + /** + * Override + */ + virtual void onMouseMoved(const MouseEvent &event); + + /** + * Override + */ + virtual void onMousePressed(const MouseEvent &event); + + /** + * Override + */ + virtual void onMouseReleased(const MouseEvent &event); + + protected: + + /** + * Ovveride + * then selection is performed with the mouse, 3 arguments : + * 1) selected domaine in frame coordinate + * 2) dx is the screen width in pixLa clel + * 3) dy is the screen height in pixel + **/ + virtual void selectionPerformed(const gpu::DomaineEcran& domaineEcran, int dx, int dy); + + /*--------------------------------------*\ + |* Get *| + \*-------------------------------------*/ + + gpu::DomaineEcran getCurrentDomaineSelection() const; + + private: + void drawSelection(); + + /*-------------------------------------*\ + |* Attributs *| + \*------------------------------------*/ + private: + + //Input + gpu::DomaineEcran domaineSelection; + + //Tools + bool isSelectionEnable; + float ratio; //ration de la taille de la selection proportionnel � l'image + }; + } + +#endif + +/*----------------------------------------------------------------------*\ + |* End *| + \*---------------------------------------------------------------------*/ +