CodePorting.Translator Cs2Cpp
CodePorting.Translator.Cs2Cpp.Framework
hatch_brush.h
1
2#ifndef _aspose_drawing_drawing2d_hatch_brush_h_
3#define _aspose_drawing_drawing2d_hatch_brush_h_
4
5#include "fwd.h"
6#include "drawing/bitmap.h"
7#include "drawing/brush.h"
8#include "drawing/color.h"
9#include "drawing/drawing2d/hatch_style.h"
10#include "system/exceptions.h"
11
13ASPOSECPP_3RD_PARTY_CLASS(SkPaint);
15ASPOSECPP_3RD_PARTY_CLASS(SkBitmap);
16
17namespace System { namespace Drawing { namespace Drawing2D {
22class ASPOSECPP_SHARED_CLASS HatchBrush: public Brush
23{
25 RTTI_INFO(System::Drawing::Drawing2D::HatchBrush, ::System::BaseTypesInfo<System::Drawing::Brush>);
26
27public:
28
34 ASPOSECPP_SHARED_API HatchBrush(HatchStyle hatch_style, Color fore_color, Color back_color = Color::FromArgb(0xFF000000));
35
37 virtual ASPOSECPP_SHARED_API SharedPtr<Brush> Clone() override;
38
40 ASPOSECPP_SHARED_API HatchStyle get_HatchStyle() const;
42 ASPOSECPP_SHARED_API Color get_ForegroundColor() const;
44 ASPOSECPP_SHARED_API Color get_BackgroundColor() const;
45
46protected:
51 virtual void Apply(SkPaint& paint, const SharedPtr<Drawing2D::Matrix>& matrix, bool apply_shift) override;
52
53private:
55 HatchBrush(const HatchBrush& brush);
56 MEMBER_FUNCTION_MAKE_OBJECT(HatchBrush, CODEPORTING_ARGS(const HatchBrush& brush), CODEPORTING_ARGS(brush));
57
59 HatchStyle m_hatch_style;
60
62 Color m_fore_color;
63
65 Color m_back_color;
66
68 std::unique_ptr<SkBitmap> m_brush_bitmap;
69};
70
71}}}
72
73
74#endif // _aspose_drawing_drawing2d_hatch_brush_h_
A base class for classes that represent fillers used to fill the interiors of graphical shapes....
Definition: brush.h:18
Represents a color. This type should be allocated on stack and passed to functions by value or by ref...
Definition: color.h:24
static Color FromArgb(int argb)
Constructs an instance of Color class that reprsents the specfied color.
Represents a rectangular brush with a hatch style, a foreground color, and a background color....
Definition: hatch_brush.h:23
virtual SharedPtr< Brush > Clone() override
Creates an exact copy of the current object.
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.
Color get_BackgroundColor() const
Returns a value that indicates the background color of this brush.
HatchStyle get_HatchStyle() const
Returns a value that indicates the hatch style of this brush.
Color get_ForegroundColor() const
Returns a value that indicates the foreground color of this brush.
HatchBrush(HatchStyle hatch_style, Color fore_color, Color back_color=Color::FromArgb(0xFF000000))
Constructs a new instance of HatchBrush class that represents a brush with the specified hatch style,...
Pointer class to wrap types being allocated on heap. Use it to manage memory for classes inheriting O...
Definition: smart_ptr.h:180
HatchStyle
Specifies patterns of HatchBrush brush.
Definition: hatch_style.h:9
Definition: db_command.h:9