CGpTextureBrush.GetImagemethod
Gets a pointer to the **Image** object that is defined by this brush.
Syntax
FUNCTION GetImage (BYVAL pImage AS CGpImage PTR) AS GpStatus
Parameters
| Name | Description | |
|---|---|---|
pImage | Pointer to a variable that will receive a pointer to the Image object that is defined by this texture brush. |
Return value
This method returns the number of preset colors currently specified for this path gradient brush.
If the function succeeds, it returns Ok, which is an element of the GpStatus enumeration.
If the function fails, it returns one of the other elements of the GpStatus enumeration.
Description
Gets a pointer to the Image object that is defined by this texture brush.
Example
' ======================================================================================== ' The following example creates a texture brush and uses it to fill an ellipse. The code ' then gets the brush's image and draws it. ' ======================================================================================== SUB Example_GetImage (BYVAL hdc AS HDC)
' // Create a graphics object from the window device context DIM graphics AS CGpGraphics = hdc ' // Set the scale transform graphics.ScaleTransformForDpi
' // Create a texture brush, and use it to fill an ellipse. DIM pImage AS CGpImage = "HouseAndTree.gif" DIM textureBrush AS CGpTextureBrush = @pImage graphics.FillEllipse(@textureBrush, 0, 0, 200, 200)
' // Get the brush's image, and draw that image DIM pImage2 AS CGpImage textureBrush.GetImage(@pImage2) graphics.DrawImage(@pImage2, 10, 150)
END SUB ' ========================================================================================
Reference
- Include file
CGpBrush.inc - Defined in AfxNova/CGpBrush.inc:258
- Documented in Graphics/GdiPlus Classes/CGpBrush Classes.md
- Topic: CGpBrush Class