2#ifndef _aspose_drawing_texture_brush_h
3#define _aspose_drawing_texture_brush_h
8#include "drawing2d/wrap_mode.h"
9#include "drawing2d/matrix.h"
10#include "drawing2d/matrix_order.h"
12#include "rectangle_f.h"
13#include "imaging/image_attributes.h"
14#include "drawing2d/wrap_mode.h"
18#ifdef ASPOSECPPLIB_BEING_BUILT
19#include "core/SkShader.h"
23ASPOSECPP_3RD_PARTY_CLASS(SkBitmap);
25ASPOSECPP_3RD_PARTY_CLASS(SkMatrix);
27ASPOSECPP_3RD_PARTY_CLASS(SkPaint);
29ASPOSECPP_3RD_PARTY_CLASS(SkShader);
32namespace System {
namespace Drawing {
A base class for classes that represent fillers used to fill the interiors of graphical shapes....
Definition: brush.h:18
Represents a drawing surface. Objects of this class should only be allocated using System::MakeObject...
Definition: graphics.h:68
Represents a rectangular area of an image defined as single-precision floating point X and Y coordina...
Definition: rectangle_f.h:15
Represents a rectangular area of an image defined as integer X and Y coordinates of its upper left co...
Definition: rectangle.h:19
Represents a brush that uses an image to fill the interior of a shape. Objects of this class should o...
Definition: texture_brush.h:38
void InitBrushSettings(const SharedPtr< Image > &image, Drawing2D::WrapMode wrap_mode, Rectangle dst_rect)
Initializes a newly created TextureBrush object.
void set_WrapMode(Drawing2D::WrapMode wrap_mode)
Sets a value that specifies how the brush represented by the current object is tiled.
void ScaleTransform(float sx, float sy, Drawing2D::MatrixOrder order=Drawing2D::MatrixOrder::Prepend)
Scales the local geometric transformation by the specified factors in the specified order.
TextureBrush(const SharedPtr< Image > &image, Drawing2D::WrapMode wrap_mode, Rectangle dst_rect)
Constructs a new instance of TextureBrush class that uses the specified image.
void MultiplyTransform(const SharedPtr< Drawing2D::Matrix > &matrix, Drawing2D::MatrixOrder order=Drawing2D::MatrixOrder::Prepend)
Multiplies current object's transform matrix by the specified matrix.
void TranslateTransform(float dx, float dy, Drawing2D::MatrixOrder order=Drawing2D::MatrixOrder::Prepend)
Translates the local geometric transformation by the specified dimensions in the specified order.
TextureBrush(const SharedPtr< Image > &image, Drawing2D::WrapMode wrap_mode, RectangleF dst_rect)
Constructs a new instance of TextureBrush class that uses the specified image.
System::SharedPtr< Drawing2D::Matrix > get_Transform()
Returns a copy of a Matrix object that specifies the geometrical transformations for the brush repres...
SharedPtr< Image > get_Image()
Returns an image used by the current TextureBrush object.
TextureBrush(const SharedPtr< Image > &image, Drawing2D::WrapMode wrap_mode=Drawing2D::WrapMode::Tile)
Constructs a new instance of TextureBrush class that uses the specified image.
virtual void Apply(SkPaint &paint, const SharedPtr< Drawing2D::Matrix > &matrix, bool apply_shift) override
Sets the properties of the current brush on the specified SkPaint object.
void ResetTransform()
Resets the current object's transform matrix so that it becomes an identity matrix.
virtual SharedPtr< Brush > Clone() override
Creates a copy of the current object.
void set_Transform(const System::SharedPtr< Drawing2D::Matrix > &matrix)
Sets a Matrix object that specifies the geometrical transformations for the brush represneted by the ...
Rectangle m_texture_rect
The bounding rectangle of this TextureBrush object.
Definition: texture_brush.h:131
Drawing2D::WrapMode get_WrapMode()
Returns a value that specifies how the brush represented by the current object is tiled.
TextureBrush(const SharedPtr< Image > &image, RectangleF dst_rect, const SharedPtr< Imaging::ImageAttributes > &image_attrs=nullptr)
Constructs a new instance of TextureBrush class that uses the specified image.
SharedPtr< Image > m_image
An image used by the current object.
Definition: texture_brush.h:127
std::unique_ptr< SkBitmap > m_brush_bitmap
Brush bitmap.
Definition: texture_brush.h:136
void RotateTransform(float angle, Drawing2D::MatrixOrder order=Drawing2D::MatrixOrder::Prepend)
Rotates the local geometric transformation by the specified angle in the specified order.
virtual ~TextureBrush()
Destructor.
TextureBrush(const SharedPtr< Image > &image, Rectangle dst_rect, const SharedPtr< Imaging::ImageAttributes > &image_attrs=nullptr)
Constructs a new instance of TextureBrush class that uses the specified image.
Pointer class to wrap types being allocated on heap. Use it to manage memory for classes inheriting O...
Definition: smart_ptr.h:180
MatrixOrder
Specifies the order of matrix transform operations.
Definition: matrix_order.h:7
@ Prepend
The new operation is applied before the old operation.
WrapMode
Specifies how a texture or a gradient is tiled when it is smaller than the area being filled.
Definition: wrap_mode.h:9
@ Tile
Tiles the gradient or texture.
Definition: db_command.h:9