Stroke.h
1 // Copyright 2001-2020 Aspose Pty Ltd. All Rights Reserved.
3 //
4 // This file is part of Aspose.Words. The source code in this file
5 // is only intended as a supplement to the documentation, and is provided
6 // "as is", without warranty of any kind, either expressed or implied.
9 #pragma once
10 
11 #include <system/shared_ptr.h>
12 #include <system/object.h>
13 #include <system/array.h>
14 #include <drawing/color.h>
15 
16 #include "Aspose.Words.Cpp/Model/Drawing/ShapeLineStyle.h"
17 #include "Aspose.Words.Cpp/Model/Drawing/JoinStyle.h"
18 #include "Aspose.Words.Cpp/Model/Drawing/EndCap.h"
19 #include "Aspose.Words.Cpp/Model/Drawing/DashStyle.h"
20 #include "Aspose.Words.Cpp/Model/Drawing/ArrowWidth.h"
21 #include "Aspose.Words.Cpp/Model/Drawing/ArrowType.h"
22 #include "Aspose.Words.Cpp/Model/Drawing/ArrowLength.h"
23 #include "Aspose.Words.Cpp/aspose_words_api_defs.h"
24 
25 namespace Aspose { namespace Words { namespace ApsBuilder { namespace Shapes { class PenFactory; } } } }
26 namespace Aspose { namespace Words { namespace ApsBuilder { namespace Shapes { class InternalColorResolver; } } } }
27 namespace Aspose { namespace Words { namespace RW { namespace Html { namespace Writer { class HtmlImageWriter; } } } } }
28 namespace Aspose { namespace Words { namespace Drawing { class Shape; } } }
29 namespace Aspose { namespace Words { namespace ApsBuilder { namespace Shapes { class ShapeApsBuilder; } } } }
30 namespace Aspose { namespace Words { namespace ApsBuilder { namespace Shapes { class ShapeBoundsFinder; } } } }
31 namespace Aspose { namespace Words { namespace ApsBuilder { namespace Shapes { class ShapeInfo; } } } }
32 namespace Aspose { namespace Words { namespace RW { namespace Html { namespace Css { namespace New { class CssBorderNew; } } } } } }
33 namespace Aspose { namespace Words { namespace Drawing { namespace Core { enum class LineFillType; } } } }
34 namespace Aspose { namespace Drawing { class DrColor; } }
35 namespace Aspose { namespace Drawing { class DrLineCapsStyle; } }
36 namespace Aspose { namespace Words { namespace Drawing { namespace Core { class IStroke; } } } }
37 namespace Aspose { namespace Drawing { enum class DrLineEndType; } }
38 namespace Aspose { namespace Drawing { enum class DrLineEndSize; } }
39 namespace Aspose { namespace Drawing { enum class DrLineEndingCapType; } }
40 
41 namespace Aspose {
42 
43 namespace Words {
44 
45 namespace Drawing {
46 
55 class Stroke : public System::Object
56 {
57  typedef Stroke ThisType;
58  typedef System::Object BaseType;
59 
60  typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
61  ASPOSE_WORDS_SHARED_RTTI_INFO_DECL();
62 
63  FRIEND_FUNCTION_System_MakeObject;
64  friend class Aspose::Words::ApsBuilder::Shapes::PenFactory;
65  friend class Aspose::Words::ApsBuilder::Shapes::InternalColorResolver;
66  friend class Aspose::Words::RW::Html::Writer::HtmlImageWriter;
67  friend class Aspose::Words::Drawing::Shape;
68  friend class Aspose::Words::ApsBuilder::Shapes::ShapeApsBuilder;
69  friend class Aspose::Words::ApsBuilder::Shapes::ShapeBoundsFinder;
70  friend class Aspose::Words::ApsBuilder::Shapes::ShapeInfo;
71  friend class Aspose::Words::RW::Html::Css::New::CssBorderNew;
72 
73 public:
74 
81  ASPOSE_WORDS_SHARED_API bool get_On();
82 
84  ASPOSE_WORDS_SHARED_API void set_On(bool value);
85 
92  ASPOSE_WORDS_SHARED_API double get_Weight();
93 
95  ASPOSE_WORDS_SHARED_API void set_Weight(double value);
96 
104  ASPOSE_WORDS_SHARED_API System::Drawing::Color get_Color();
105 
107  ASPOSE_WORDS_SHARED_API void set_Color(System::Drawing::Color value);
108 
116  ASPOSE_WORDS_SHARED_API System::Drawing::Color get_Color2();
117 
119  ASPOSE_WORDS_SHARED_API void set_Color2(System::Drawing::Color value);
120 
128 
130  ASPOSE_WORDS_SHARED_API void set_DashStyle(Aspose::Words::Drawing::DashStyle value);
131 
139 
141  ASPOSE_WORDS_SHARED_API void set_JoinStyle(Aspose::Words::Drawing::JoinStyle value);
142 
149  ASPOSE_WORDS_SHARED_API Aspose::Words::Drawing::EndCap get_EndCap();
150 
152  ASPOSE_WORDS_SHARED_API void set_EndCap(Aspose::Words::Drawing::EndCap value);
153 
161 
163  ASPOSE_WORDS_SHARED_API void set_LineStyle(Aspose::Words::Drawing::ShapeLineStyle value);
164 
172 
174  ASPOSE_WORDS_SHARED_API void set_StartArrowType(Aspose::Words::Drawing::ArrowType value);
175 
183 
185  ASPOSE_WORDS_SHARED_API void set_EndArrowType(Aspose::Words::Drawing::ArrowType value);
186 
194 
196  ASPOSE_WORDS_SHARED_API void set_StartArrowWidth(Aspose::Words::Drawing::ArrowWidth value);
197 
205 
207  ASPOSE_WORDS_SHARED_API void set_StartArrowLength(Aspose::Words::Drawing::ArrowLength value);
208 
216 
218  ASPOSE_WORDS_SHARED_API void set_EndArrowWidth(Aspose::Words::Drawing::ArrowWidth value);
219 
227 
229  ASPOSE_WORDS_SHARED_API void set_EndArrowLength(Aspose::Words::Drawing::ArrowLength value);
230 
237  ASPOSE_WORDS_SHARED_API double get_Opacity();
238 
240  ASPOSE_WORDS_SHARED_API void set_Opacity(double value);
241 
245  ASPOSE_WORDS_SHARED_API System::ArrayPtr<uint8_t> get_ImageBytes();
246 
247 protected:
248 
250  void set_ColorInternal(System::SharedPtr<Aspose::Drawing::DrColor> value);
251  System::SharedPtr<Aspose::Drawing::DrColor> get_Color2Internal();
252  void set_Color2Internal(System::SharedPtr<Aspose::Drawing::DrColor> value);
253  Aspose::Words::Drawing::Core::LineFillType get_LineFillType();
254  void set_LineFillType(Aspose::Words::Drawing::Core::LineFillType value);
256  bool get_IsLineCapEnabled();
257 
259 
260  ASPOSE_WORDS_SHARED_API System::Object::shared_members_type GetSharedMembers() override;
261 
262 private:
263 
265  bool get_IsVmlOutline();
266 
270 
271  void BuildCapsStyle();
272  static Aspose::Drawing::DrLineEndType ToDrLineEndType(Aspose::Words::Drawing::ArrowType type);
273  static Aspose::Drawing::DrLineEndSize ToDrLineEndSizeFromWidth(Aspose::Words::Drawing::ArrowWidth width);
274  static Aspose::Drawing::DrLineEndSize ToDrLineEndSizeFromLength(Aspose::Words::Drawing::ArrowLength length);
275  static Aspose::Drawing::DrLineEndingCapType ToDrLineEndingCapType(Aspose::Words::Drawing::EndCap endCap);
276 
277 };
278 
279 }
280 }
281 }
Aspose::Words::Drawing::DashStyle get_DashStyle()
Specifies the dot and dash pattern for a stroke.
void set_EndCap(Aspose::Words::Drawing::EndCap value)
Setter for Aspose::Words::Drawing::Stroke::get_EndCap.
@ Shape
A drawing object, such as an OfficeArt shape, image or an OLE object.
void set_Weight(double value)
Setter for Aspose::Words::Drawing::Stroke::get_Weight.
Aspose::Words::Drawing::ArrowLength get_EndArrowLength()
Defines the arrowhead length for the end of a stroke.
System::Details::SharedMembersType shared_members_type
Aspose::Words::Drawing::JoinStyle get_JoinStyle()
Defines the join style of a polyline.
@ Html
double get_Opacity()
Defines the amount of transparency of a stroke. Valid range is from 0 to 1.
@ Shapes
Module that renders ordinary shapes.
void set_StartArrowWidth(Aspose::Words::Drawing::ArrowWidth value)
Setter for Aspose::Words::Drawing::Stroke::get_StartArrowWidth.
void set_EndArrowWidth(Aspose::Words::Drawing::ArrowWidth value)
Setter for Aspose::Words::Drawing::Stroke::get_EndArrowWidth.
void set_EndArrowType(Aspose::Words::Drawing::ArrowType value)
Setter for Aspose::Words::Drawing::Stroke::get_EndArrowType.
System::Drawing::Color get_Color2()
Defines a second color for a stroke.
bool get_On()
Defines whether the path will be stroked.
Defines a stroke for a shape.
Definition: Stroke.h:56
void set_Opacity(double value)
Setter for Aspose::Words::Drawing::Stroke::get_Opacity.
Aspose::Words::Drawing::ArrowWidth get_StartArrowWidth()
Defines the arrowhead width for the start of a stroke.
System::ArrayPtr< uint8_t > get_ImageBytes()
Defines the image for a stroke image or pattern fill.
ShapeLineStyle
Specifies the compound line style of a Shape.
Definition: ShapeLineStyle.h:29
System::Drawing::Color get_Color()
Defines the color of a stroke.
void set_Color(System::Drawing::Color value)
Setter for Aspose::Words::Drawing::Stroke::get_Color.
ArrowLength
Length of the arrow at the end of a line.
Definition: ArrowLength.h:30
@ Words
void set_DashStyle(Aspose::Words::Drawing::DashStyle value)
Setter for Aspose::Words::Drawing::Stroke::get_DashStyle.
void set_On(bool value)
Setter for Aspose::Words::Drawing::Stroke::get_On.
Aspose::Words::Drawing::ArrowLength get_StartArrowLength()
Defines the arrowhead length for the start of a stroke.
@ New
Other document is used as a base during comparison.
Aspose::Words::Drawing::ArrowType get_EndArrowType()
Defines the arrowhead for the end of a stroke.
Aspose::Words::Drawing::ArrowWidth get_EndArrowWidth()
Defines the arrowhead width for the end of a stroke.
void set_LineStyle(Aspose::Words::Drawing::ShapeLineStyle value)
Setter for Aspose::Words::Drawing::Stroke::get_LineStyle.
double get_Weight()
Defines the brush thickness that strokes the path of a shape in points.
Represents an object in the drawing layer, such as an AutoShape, textbox, freeform,...
Definition: Shape.h:145
void set_StartArrowLength(Aspose::Words::Drawing::ArrowLength value)
Setter for Aspose::Words::Drawing::Stroke::get_StartArrowLength.
ArrowType
Specifies the type of an arrow at a line end.
Definition: ArrowType.h:30
JoinStyle
Line join style.
Definition: JoinStyle.h:28
ArrowWidth
Width of the arrow at the end of a line.
Definition: ArrowWidth.h:30
Aspose::Words::Drawing::ShapeLineStyle get_LineStyle()
Defines the line style of the stroke.
Aspose::Words::Drawing::EndCap get_EndCap()
Defines the cap style for the end of a stroke.
void set_Color2(System::Drawing::Color value)
Setter for Aspose::Words::Drawing::Stroke::get_Color2.
DashStyle
Dashed line style.
Definition: DashStyle.h:29
Aspose::Words::Drawing::ArrowType get_StartArrowType()
Defines the arrowhead for the start of a stroke.
EndCap
Specifies line cap style.
Definition: EndCap.h:29
void set_StartArrowType(Aspose::Words::Drawing::ArrowType value)
Setter for Aspose::Words::Drawing::Stroke::get_StartArrowType.
void set_JoinStyle(Aspose::Words::Drawing::JoinStyle value)
Setter for Aspose::Words::Drawing::Stroke::get_JoinStyle.
void set_EndArrowLength(Aspose::Words::Drawing::ArrowLength value)
Setter for Aspose::Words::Drawing::Stroke::get_EndArrowLength.