3 #include "EventImage.h"
10 /*----------------------------------------------------------------------*\
12 \*---------------------------------------------------------------------*/
14 /*--------------------------------------*\
16 \*-------------------------------------*/
18 /*--------------------------------------*\
20 \*-------------------------------------*/
22 /*----------------------------------------------------------------------*\
24 \*---------------------------------------------------------------------*/
26 /*--------------------------------------*\
28 \*-------------------------------------*/
30 EventImage::EventImage(unsigned int w
, unsigned int h
) :
36 EventImage::~EventImage(void)
38 delete ptrKeyListener
;
39 delete ptrMouseListener
;
42 /*--------------------------------------*\
44 \*-------------------------------------*/
49 * call periodicly by the api
51 void EventImage::fillImageGL(uchar4
* ptrTabPixels
, int w
, int h
)
58 * call periodicly by the api
60 void EventImage::animationStep(bool& isNeedUpdateView
)
67 * call periodicly by the api
69 void EventImage::paintPrimitives(Graphic2Ds
& graphic2D
)
71 const Font_A
* ptrFont
= graphic2D
.getFont(TIMES_ROMAN_24
);
76 graphic2D
.setColorRGB(r
, g
, b
);
80 graphic2D
.drawTitleBottom("API Image : Click on the windows, and look message in the console", ptrFont
);
84 /*--------------------------------------*\
86 \*-------------------------------------*/
88 void EventImage::control(void)
90 this->ptrKeyListener
= new SimpleKeyListener();
91 this->ptrMouseListener
= new SimpleMouseListener();
93 setKeyListener(ptrKeyListener
);
94 setMouseListener(ptrMouseListener
);
97 /*----------------------------------------------------------------------*\
99 \*---------------------------------------------------------------------*/