2#ifndef _aspose_drawing_pen_h_
3#define _aspose_drawing_pen_h_
5#include "drawing/color.h"
6#include "drawing/brush.h"
7#include "drawing/drawing2d/line_cap.h"
8#include "drawing/drawing2d/line_join.h"
9#include "drawing/drawing2d/dash_cap.h"
10#include "drawing/drawing2d/dash_style.h"
11#include "drawing/drawing2d/pen_alignment.h"
12#include "drawing/drawing2d/matrix.h"
13#include "drawing/drawing2d/matrix_order.h"
14#include "drawing/drawing2d/pen_type.h"
15#include "system/exceptions.h"
18#ifdef ASPOSECPPLIB_BEING_BUILT
19#include "core/SkColor.h"
20#include "core/SkPath.h"
21#include "core/SkPathEffect.h"
25ASPOSECPP_3RD_PARTY_TYPEDEF(SkColor, std::uint32_t);
27ASPOSECPP_3RD_PARTY_CLASS(SkPaint);
29ASPOSECPP_3RD_PARTY_CLASS(SkPath);
31ASPOSECPP_3RD_PARTY_CLASS(SkPathEffect);
33ASPOSECPP_3RD_PARTY_TYPEDEF(SkScalar,
float);
35template <
typename T>
class sk_sp;
37namespace System {
namespace Drawing {
39namespace Drawing2D {
class CustomLineCap; }
40namespace Drawing2D {
class GraphicsPath; }
41namespace Details {
namespace Skia {
class SkPaints; } }
56 ASPOSECPP_SHARED_API
Pen(
const Color & color,
float width);
200 bool is_closed_path =
false);
211 Details::Skia::SkPaints MakeCustomCaps(
const SkPaint& base_paint,
float& start_cap_inset,
float& end_cap_inset,
212 float scale_x,
float scale_y)
const;
216 float phase,
float start_cap_inset,
float end_cap_inset,
217 bool is_closed_path)
const;
219 Details::Skia::SkPaints MakeCompoundEffect(
const SkPaint& base_paint, sk_sp<SkPathEffect> dash_path_effect)
const;
232 void ApplyOutlineEffect(
const SkPath* src_path, SkPath* dest_path)
const;
236 bool IsApplyDashCaps(
bool is_closed_path)
const;
244 float m_sk_miter_limit = 10.0f;
245 float m_dash_offset = 0;
Represents a color. This type should be allocated on stack and passed to functions by value or by ref...
Definition: color.h:24
Represents a set of connected lines and curves. Objects of this class should only be allocated using ...
Definition: graphics_path.h:80
Represents a drawing surface. Objects of this class should only be allocated using System::MakeObject...
Definition: graphics.h:68
Represents properties such as color, width etc. of the lines and curves being drawn....
Definition: pen.h:48
SharedPtr< Drawing2D::Matrix > get_Transform()
Returns a copy of a Matrix object that specifies the geometrical transformations for the pen represne...
Pen(const SharedPtr< Brush > &brush)
Constructs a new Pen object and initializes it with the specified Brush object.
void set_EndCap(Drawing2D::LineCap value)
Sets the ending line cap of the current Pen object.
void SetLineCap(Drawing2D::LineCap startCap, Drawing2D::LineCap endCap, Drawing2D::DashCap dashCap)
NOT IMPLEMENTED.
void set_DashCap(Drawing2D::DashCap value)
Sets a value that specifies the cap used at the both ends of a dashed line.
float get_MiterLimit() const
Returns the limit of the thickness of the join on a mitered corner.
void set_Brush(const SharedPtr< Brush > &brush)
Sets this pen's Brush object.
void ResetTransform()
Resets the current object's transform matrix so that it becomes an identity matrix.
void set_Transform(const SharedPtr< Drawing2D::Matrix > &value)
Sets a Matrix object that specifies the geometrical transformations for the pen represneted by the cu...
void set_Color(const Color &color)
Sets this pen's color.
void MultiplyTransform(const SharedPtr< Drawing2D::Matrix > &matrix, Drawing2D::MatrixOrder order=Drawing2D::MatrixOrder::Prepend)
Multiplies current object's transform matrix by the specified matrix.
void Dispose()
Releases all operating resources acquired by the current object.
Definition: pen.h:189
void set_DashOffset(float value)
Sets the distance from the start of a line to the beginning of a dash pattern.
float get_DashOffset() const
Returns the distance from the start of a line to the beginning of a dash pattern.
System::ArrayPtr< float > get_CompoundArray() const
Returns an array of values that specifies a compound pen.
SharedPtr< Brush > get_Brush()
Returns this pen's Brush object.
virtual void Apply(SkPaint &paint, const SharedPtr< Drawing2D::Matrix > &matrix, bool antialiased=false, bool is_closed_path=false)
Sets the properties of the current pen on the specified SkPaint object.
void set_DashStyle(Drawing2D::DashStyle value)
Sets a value that specifies the dash style of the current Pen object.
void set_MiterLimit(float value)
Sets the limit of the thickness of the join on a mitered corner.
void set_CustomStartCap(const SharedPtr< Drawing2D::CustomLineCap > &value)
Sets the custom start line cap.
Pen(const Color &color, float width)
Constructs a new Pen object representing the specified color and width.
void RotateTransform(float angle, Drawing2D::MatrixOrder order=Drawing2D::MatrixOrder::Prepend)
Rotates the local geometric transformation by the specified angle in the specified order.
void set_CompoundArray(const System::ArrayPtr< float > &value)
Sets an array of values that specifies a compound pen.
void set_LineJoin(Drawing2D::LineJoin value)
Sets a value that specifies how the lines drawn by this Pen object are joined.
void set_Alignment(Drawing2D::PenAlignment value)
Sets the alignment of the current Pen object.
void set_Width(float value)
Sets the width of the current Pen object.
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.
Drawing2D::PenType get_PenType() const
NOT IMPLEMENTED.
Color get_Color() const
Returns this pen's color.
Drawing2D::LineJoin get_LineJoin() const
Returns a value that indicates how the lines drawn by this Pen object are joined.
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.
void set_StartCap(Drawing2D::LineCap value)
Sets the starting line cap of the current Pen object.
Pen(const SharedPtr< Brush > &brush, float width)
Constructs a new Pen object and initializes it with the specified Brush object.
SharedPtr< Pen > Clone()
Returns a copy of the current object.
Drawing2D::LineCap get_StartCap() const
Returns a value that indicates the starting line cap of the current Pen object.
System::ArrayPtr< float > get_DashPattern() const
Returns an array indicating custom dash pattern in a dashed line.
void set_DashPattern(const System::ArrayPtr< float > &value)
Sets an array specifying custom dash pattern in a dashed line. The array consists of numbers that spe...
Drawing2D::LineCap get_EndCap() const
Returns a value that indicates the ending line cap of the current Pen object.
Drawing2D::DashStyle get_DashStyle() const
Returns a value that indicates the dash style of the current Pen object.
float get_Width() const
Returns the width of the current Pen object.
Drawing2D::PenAlignment get_Alignment() const
Returns a value that indicates the alignment of the current Pen object.
void set_CustomEndCap(const SharedPtr< Drawing2D::CustomLineCap > &value)
Sets the custom end line cap.
Drawing2D::DashCap get_DashCap() const
Returns a value that indicates the cap used at the both ends of a dashed line.
Pen(const Color &color)
Constructs a new Pen object representing the specified color.
Base class that enables using methods available for System.Object class in C#. All non-trivial classe...
Definition: object.h:62
Pointer class to wrap types being allocated on heap. Use it to manage memory for classes inheriting O...
Definition: smart_ptr.h:180
DashCap
Specifies the type of a cap used at the both ends of a dash in a dashed line.
Definition: dash_cap.h:9
LineCap
Indicates the available cap styles with which a Pen object can end a line.
Definition: line_cap.h:9
PenType
Specifies a type of a fill Pen object uses.
Definition: pen_type.h:8
DashStyle
Specifies the style of a dashed line.
Definition: dash_style.h:9
LineJoin
Specifies how consequent lines or curves are joined.
Definition: line_join.h:9
PenAlignment
Specifies the alignment of a Pen object relative to an abstract reference 0-width line.
Definition: pen_alignment.h:7
MatrixOrder
Specifies the order of matrix transform operations.
Definition: matrix_order.h:7
@ Prepend
The new operation is applied before the old operation.
Definition: db_command.h:9