Functions | |
| BOOL | CreatePaintableImage (CVD3D d3d, long lDimension, long Width, long Height, IMG &Img) |
| The function creates a CVB image located in the GPU memory. | |
| HRESULT | D3DGetObjectDC (CVD3DOBJECT d3dObject, HDC &hDC) |
| This function returns a DC to the given CVD3DOBJECT object. | |
| HRESULT | D3DPresentBackbuffer (CVD3D d3d) |
| The function displays the actual content of the backbuffer in the window attached to CVD3D context. | |
| HRESULT | D3DReleaseObjectDC (CVD3DOBJECT d3dObject, HDC &hDC) |
| Releases a DC to the given CVD3DOBJECT object that was allocated using D3DGetObjectDC. | |
| HRESULT | D3DRenderText (CVD3DOBJECT d3dObject, const char *lpText, long x, long y, COLORREF color, float fAlpha) |
| This function renders a given text string to a given destination texture using a default font and a given colour and alpha value. | |
| BOOL | GetImageDC (IMG img, HDC &dc) |
| Returns a DC to the given CVB image object. | |
| BOOL | ReleaseImageDC (IMG img, HDC dc) |
| The function releases a DC allocated by GetImageDC. | |
| BOOL CreatePaintableImage | ( | CVD3D | d3d, |
| long | lDimension, | ||
| long | Width, | ||
| long | Height, | ||
| IMG & | Img | ||
| ) |
The function creates a CVB image located in the GPU memory.
It supports monochrome (lDimension = 1) or colour images (lDimension = 3). It's possible to get a DC to the image to use standard GDI functions to paint into the image e.g., to create synthetic images.
ShareObject and ReleaseObject functions of the Image Manager. To finally free the object use ReleaseObject. | [in] | d3d | The D3D context. |
| [in] | lDimension | The dimension of the image (maximum value is 4 for RGBA images). |
| [in] | Width | The width of the image which has to be less or equal to the maximum width of the D3D context. |
| [in] | Height | The height of the image which has to be less or equal to the maximum height of the D3D context. |
| [out] | Img | Handle to the newly created CVB image object. |
TRUE on success, FALSE otherwise. | HRESULT D3DGetObjectDC | ( | CVD3DOBJECT | d3dObject, |
| HDC & | hDC | ||
| ) |
This function returns a DC to the given CVD3DOBJECT object.
Using the DC you can write destructive overlays to the image.
| [in] | d3dObject | The source object. |
| [out] | hDC | Handle to the newly created DC. |
0 if no error occurred, otherwise a value != 0 indicates the error code. | HRESULT D3DPresentBackbuffer | ( | CVD3D | d3d | ) |
The function displays the actual content of the backbuffer in the window attached to CVD3D context.
The backbuffer always represents the result of the last render operation. The backbuffer will be stretched to match the width and the height of the window. To preserve the aspect ratio of the original image make sure that the aspect ratio of the windows matches the aspect ratio of the image.
| [in] | d3d | Handle to the object to be processed. |
0 if no error occurred, otherwise a value != 0 indicates the error code. | HRESULT D3DReleaseObjectDC | ( | CVD3DOBJECT | d3dObject, |
| HDC & | hDC | ||
| ) |
Releases a DC to the given CVD3DOBJECT object that was allocated using D3DGetObjectDC.
Using the DC you can write destructive overlays to the image. You can only get a DC to a texture source.
| [in] | d3dObject | The source object. |
| [in] | hDC | The DC to be released. |
0 if no error occurred, otherwise a value != 0 indicates the error code. | HRESULT D3DRenderText | ( | CVD3DOBJECT | d3dObject, |
| const char * | lpText, | ||
| long | x, | ||
| long | y, | ||
| COLORREF | color, | ||
| float | fAlpha | ||
| ) |
This function renders a given text string to a given destination texture using a default font and a given colour and alpha value.
| RenderText to Backbuffer | ok |
| RenderText to SurfaceEntrance | not applicable |
| RenderText to Surface | not applicable |
| RenderText to TextureEntrance | not applicable |
| RenderText to Texture ok | ok |
| [in] | d3dObject | The texture. |
| [in] | lpText | The text to be rendered. |
| [in] | x | X-position of the string in the texture specified by its top, left position in pixel. |
| [in] | y | Y-position of the string in the texture specified by its top, left position in pixel. |
| [in] | color | RGB colour to be used. |
| [in] | fAlpha | The alpha value to be used. A value of 1.0 indicates no transparency of the overlay. A value of 0.5 will end up in 50% of the colour value of the overlay plus 50% of the colour value of the texture. |
0 if no error occurred, otherwise a value != 0 indicates the error code. | BOOL GetImageDC | ( | IMG | img, |
| HDC & | dc | ||
| ) |
Returns a DC to the given CVB image object.
Using the DC you can write destructive overlays to the image.
| [in] | img | The source image. |
| [out] | dc | Handle to the newly created DC. |
TRUE on success, FALSE otherwise. | BOOL ReleaseImageDC | ( | IMG | img, |
| HDC | dc | ||
| ) |
The function releases a DC allocated by GetImageDC.
| [in] | img | The image to be used. |
| [in] | dc | The DC to be released. |
TRUE on success, FALSE otherwise.