38 #ifndef DOXYGEN_SHOULD_SKIP_THIS
40 #include <visp3/core/vpConfig.h>
42 #if ( defined(VISP_HAVE_D3D9) )
44 #ifndef VPD3DRENDERER_HH
45 #define VPD3DRENDERER_HH
49 #include <visp3/gui/vpWin32Renderer.h>
50 #include <visp3/core/vpDisplayException.h>
62 class VISP_EXPORT vpD3DRenderer :
public vpWin32Renderer
68 IDirect3DDevice9 * pd3dDevice;
71 ID3DXSprite * pSprite;
75 IDirect3DTexture9 * pd3dText;
79 IDirect3DTexture9 * pd3dVideoText;
82 unsigned int textWidth;
98 bool init(HWND hwnd,
unsigned int width,
unsigned int height);
102 virtual ~vpD3DRenderer();
113 const vpColor &color,
unsigned int thickness,
int style=PS_SOLID);
116 unsigned int width,
unsigned int height,
117 const vpColor &color,
bool fill=
false,
118 unsigned int thickness=1);
120 void clear(
const vpColor &color);
122 void drawCircle(
const vpImagePoint ¢er,
unsigned int radius,
123 const vpColor &color,
bool fill=
false,
unsigned int thickness=1);
125 void drawText(
const vpImagePoint &ip,
const char * text,
128 void drawCross(
const vpImagePoint &ip,
unsigned int size,
129 const vpColor &color,
unsigned int thickness=1);
133 const vpColor &color,
unsigned int w,
unsigned int h,
unsigned int thickness=1);
141 void initView(
float,
float);
147 void subDrawCircle(
int i,
int j,
149 vpColor col,
unsigned char* buf,
150 unsigned int pitch,
unsigned int maxX,
unsigned int maxY);
152 void convert(
const vpImage<vpRGBa>& I,
unsigned char * imBuffer,
unsigned int pitch);
154 void convertROI(
const vpImage<vpRGBa>& I,
unsigned char * imBuffer,
unsigned int pitch,
155 int i_min,
int j_min,
int i_max,
int j_max);
157 int i_min,
int j_min,
int i_max,
int j_max);
170 inline void setBufferPixel(
unsigned char* buf,
unsigned int pitch,
173 unsigned int maxX,
unsigned int maxY)
177 c = colors[color.
id];
179 c = D3DCOLOR_ARGB(0xFF, color.
R, color.
G, color.
B);
182 if(x>=0 && y>=0 && x<= (
int)maxX && y<= (
int)maxY)
183 *(
unsigned long*)(buf + (y*pitch) + (x<<2)) = c;
194 inline void setBufferPixel(
unsigned char* buf,
unsigned int pitch,
200 c = colors[color.
id];
202 c = D3DCOLOR_ARGB(0xFF, color.
R, color.
G, color.
B);
205 *(
unsigned long*)(buf + (y*pitch) + (x<<2)) = c;
208 unsigned int supPowerOf2(
unsigned int n);
unsigned char B
Blue component.
Class to define colors available for display functionnalities.
unsigned char G
Green component.
unsigned char R
Red component.
Class that defines a 2D point in an image. This class is useful for image processing and stores only ...