Texture Brush Functions

Windows GDI+ exposes a flat API that consists of about 600 functions, which are implemented in Gdiplus.dll and declared in Gdiplusflat.h. The functions in the GDI+ flat API are wrapped by a collection of about 40 C++ classes. It is recommended that you do not directly call the functions in the flat API. Whenever you make calls to GDI+, you should do so by calling the methods and functions provided by the C++ wrappers. Microsoft Product Support Services will not provide support for code that calls the flat API directly. For more information on using these wrapper methods, see GDI+ Flat API.

The following flat API functions are wrapped by the TextureBrush C++ class.

TextureBrush Functions and Corresponding Wrapper Methods

Flat function Wrapper method Remarks
GpStatus WINGDIPAPI GdipCreateTexture(GpImage *image, GpWrapMode wrapmode, GpTexture **texture)
TextureBrush::TextureBrush(IN Image* image, IN WrapMode wrapMode = WrapModeTile)
Creates a TextureBrush object based on an image and a wrap mode. The size of the brush defaults to the size of the image, so the entire image is used by the brush.
GpStatus WINGDIPAPI GdipCreateTexture2(GpImage *image, GpWrapMode wrapmode, REAL x, REAL y, REAL width, REAL height, GpTexture **texture)
TextureBrush::TextureBrush(IN Image* image, IN WrapMode wrapMode, IN REAL dstX, IN REAL dstY, IN REAL dstWidth, IN REAL dstHeight)
Creates a TextureBrush object based on an image, a wrap mode, and a defining set of coordinates.
GpStatus WINGDIPAPI GdipCreateTextureIA(GpImage *image, GDIPCONST GpImageAttributes *imageAttributes, REAL x, REAL y, REAL width, REAL height, GpTexture **texture)
TextureBrush::TextureBrush(IN Image *image, IN const RectF &dstRect, IN const ImageAttributes *imageAttributes = NULL)
Creates a TextureBrush object based on an image, a defining rectangle, and a set of image properties.
The x, y, width, and height parameters of the flat function define a rectangle that corresponds to the dstRect parameter of the wrapper method.
GpStatus WINGDIPAPI GdipCreateTexture2I(GpImage *image, GpWrapMode wrapmode, INT x, INT y, INT width, INT height, GpTexture **texture)
TextureBrush::TextureBrush(IN Image* image, IN WrapMode wrapMode, IN INT dstX, IN INT dstY, IN INT dstWidth, IN INT dstHeight)
Creates a TextureBrush object based on an image, a wrap mode, and a defining set of coordinates.
GpStatus WINGDIPAPI GdipCreateTextureIAI(GpImage *image, GDIPCONST GpImageAttributes *imageAttributes, INT x, INT y, INT width, INT height, GpTexture **texture)
TextureBrush::TextureBrush(IN Image *image, IN const Rect &dstRect, IN const ImageAttributes *imageAttributes = NULL)
Creates a TextureBrush object based on an image, a defining rectangle, and a set of image properties.
The x, y, width, and height parameters of the flat function define a rectangle that corresponds to the dstRect parameter of the wrapper method.
GpStatus WINGDIPAPI GdipGetTextureTransform(GpTexture *brush, GpMatrix *matrix)
StatusTextureBrush::GetTransform(OUT Matrix* matrix) const
Gets the transformation matrix of this texture brush.
GpStatus WINGDIPAPI GdipSetTextureTransform(GpTexture *brush, GDIPCONST GpMatrix *matrix)
StatusTextureBrush::SetTransform(IN const Matrix* matrix)
Sets the transformation matrix of this texture brush.
GpStatus WINGDIPAPI GdipResetTextureTransform(GpTexture* brush)
Status TextureBrush::ResetTransform()
Resets the transformation matrix of this texture brush to the identity matrix. This means that no transformation takes place.
GpStatus WINGDIPAPI GdipMultiplyTextureTransform(GpTexture* brush, GDIPCONST GpMatrix *matrix, GpMatrixOrder order)
Status TextureBrush::MultiplyTransform(IN const Matrix* matrix, IN MatrixOrder order = MatrixOrderPrepend)
Updates this brush's transformation matrix with the product of itself and another matrix.
GpStatus WINGDIPAPI GdipTranslateTextureTransform(GpTexture* brush, REAL dx, REAL dy, GpMatrixOrder order)
Status TextureBrush::TranslateTransform(IN REAL dx, IN REAL dy, IN MatrixOrder order = MatrixOrderPrepend)
Updates this brush's current transformation matrix with the product of itself and a translation matrix.
GpStatus WINGDIPAPI GdipScaleTextureTransform(GpTexture* brush, REAL sx, REAL sy, GpMatrixOrder order)
Status TextureBrush::ScaleTransform(IN REAL sx, IN REAL sy, IN MatrixOrder order = MatrixOrderPrepend)
Updates this texture brush's current transformation matrix with the product of itself and a scaling matrix.
GpStatus WINGDIPAPI GdipRotateTextureTransform(GpTexture* brush, REAL angle, GpMatrixOrder order)
Status TextureBrush::RotateTransform(IN REAL angle, IN MatrixOrder order = MatrixOrderPrepend)
Updates this texture brush's current transformation matrix with the product of itself and a rotation matrix.
GpStatus WINGDIPAPI GdipSetTextureWrapMode(GpTexture *brush, GpWrapMode wrapmode)
Status TextureBrush::SetWrapMode(IN WrapMode wrapMode)
Sets the wrap mode of this texture brush.
GpStatus WINGDIPAPI GdipGetTextureWrapMode(GpTexture *brush, GpWrapMode *wrapmode)
WrapMode TextureBrush::GetWrapMode() const
Gets the wrap mode currently set for this texture brush.
GpStatus WINGDIPAPI GdipGetTextureImage(GpTexture *brush, GpImage **image)
Image * TextureBrush::GetImage() const
Gets a pointer to the Image object that is defined by this texture brush.