42 #ifndef DOXYGEN_SHOULD_SKIP_THIS
44 #include <visp/vpConfig.h>
46 #if ( defined(VISP_HAVE_D3D9) )
48 #ifndef VPD3DRENDERER_HH
49 #define VPD3DRENDERER_HH
53 #include <visp/vpWin32Renderer.h>
54 #include <visp/vpDisplayException.h>
66 class VISP_EXPORT vpD3DRenderer :
public vpWin32Renderer
72 IDirect3DDevice9 * pd3dDevice;
75 ID3DXSprite * pSprite;
79 IDirect3DTexture9 * pd3dText;
83 IDirect3DTexture9 * pd3dVideoText;
86 unsigned int textWidth;
102 bool init(HWND hwnd,
unsigned int width,
unsigned int height);
106 virtual ~vpD3DRenderer();
117 const vpColor &color,
unsigned int thickness,
int style=PS_SOLID);
120 unsigned int width,
unsigned int height,
121 const vpColor &color,
bool fill=
false,
122 unsigned int thickness=1);
124 void clear(
const vpColor &color);
126 void drawCircle(
const vpImagePoint ¢er,
unsigned int radius,
127 const vpColor &color,
bool fill=
false,
unsigned int thickness=1);
129 void drawText(
const vpImagePoint &ip,
const char * text,
132 void drawCross(
const vpImagePoint &ip,
unsigned int size,
133 const vpColor &color,
unsigned int thickness=1);
137 const vpColor &color,
unsigned int w,
unsigned int h,
unsigned int thickness=1);
145 void initView(
float,
float);
151 void subDrawCircle(
int i,
int j,
153 vpColor col,
unsigned char* buf,
154 unsigned int pitch,
unsigned int maxX,
unsigned int maxY);
168 inline void setBufferPixel(
unsigned char* buf,
unsigned int pitch,
171 unsigned int maxX,
unsigned int maxY)
175 c = colors[color.
id];
177 c = D3DCOLOR_ARGB(0xFF, color.
R, color.
G, color.
B);
180 if(x>=0 && y>=0 && x<= (
int)maxX && y<= (
int)maxY)
181 *(
unsigned long*)(buf + (y*pitch) + (x<<2)) = c;
192 inline void setBufferPixel(
unsigned char* buf,
unsigned int pitch,
198 c = colors[color.
id];
200 c = D3DCOLOR_ARGB(0xFF, color.
R, color.
G, color.
B);
203 *(
unsigned long*)(buf + (y*pitch) + (x<<2)) = c;
206 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 ...