Defines an object used to draw lines and curves. This class cannot be inherited.
Public Constructors | |
template<typename brush_t > | |
pen (const brush_t &brush) | |
Initializes a new instance of the xtd::drawing::pen class with the specified xtd::drawing::brush. | |
template<typename brush_t > | |
pen (const brush_t &brush, float width) | |
Initializes a new instance of the xtd::drawing::pen class with the specified xtd::drawing::brush. | |
pen (const xtd::drawing::color &color) | |
Initializes a new instance of the xtd::drawing::pen class with the specified xtd::drawing::color. | |
pen (const xtd::drawing::color &color, float width) | |
Initializes a new instance of the xtd::drawing::pen class with the specified xtd::drawing::color. | |
Public Properties | |
xtd::drawing::drawing_2d::pen_alignment | alignment () const noexcept |
Gets the alignment for this xtd::drawing::pen. | |
xtd::drawing::pen & | alignment (xtd::drawing::drawing_2d::pen_alignment value) |
Sets the alignment for this xtd::drawing::pen. | |
const xtd::uptr< xtd::drawing::brush > & | brush () const noexcept |
Gets the xtd::drawing::brush that determines attributes of this xtd::drawing::pen. | |
template<typename brush_t > | |
xtd::drawing::pen & | brush (const brush_t &value) |
Sets the xtd::drawing::brush that determines attributes of this xtd::drawing::pen. | |
const xtd::drawing::color & | color () const noexcept |
Gets the color of this xtd::drawing::pen. | |
xtd::drawing::pen & | color (const xtd::drawing::color &value) |
Sets the color of this xtd::drawing::pen. | |
std::vector< float > | dash_pattern () const noexcept |
Gets an array of custom dashes and spaces. | |
xtd::drawing::pen & | dash_pattern (const std::vector< float > &value) |
Sets an array of custom dashes and spaces. | |
xtd::drawing::drawing_2d::dash_style | dash_style () const noexcept |
Gets the style used for dashed lines drawn with this xtd::drawing::pen. | |
xtd::drawing::pen & | dash_style (drawing::drawing_2d::dash_style value) |
Sets the style used for dashed lines drawn with this xtd::drawing::pen. | |
xtd::drawing::drawing_2d::line_cap | end_cap () const noexcept |
Gets the cap style used at the end of lines drawn with this xtd::drawing::pen. | |
xtd::drawing::pen & | end_cap (xtd::drawing::drawing_2d::line_cap value) |
Sets the cap style used at the end of lines drawn with this xtd::drawing::pen. | |
intptr | handle () const noexcept |
Gets the handle of the pen. | |
xtd::drawing::drawing_2d::line_join | line_join () const noexcept |
Gets the join style for the ends of two consecutive lines drawn with this xtd::drawing::pen. | |
xtd::drawing::pen & | line_join (xtd::drawing::drawing_2d::line_join value) |
Sets the join style for the ends of two consecutive lines drawn with this xtd::drawing::pen. | |
float | miter_limit () const noexcept |
Gets the limit of the thickness of the join on a mitered corner. | |
xtd::drawing::pen & | miter_limit (float value) |
Sets the limit of the thickness of the join on a mitered corner. | |
xtd::drawing::drawing_2d::line_cap | start_cap () const noexcept |
Gets the cap style used at the beginning of lines drawn with this xtd::drawing::pen. | |
xtd::drawing::pen & | start_cap (xtd::drawing::drawing_2d::line_cap value) |
Sets the cap style used at the beginning of lines drawn with this xtd::drawing::pen. | |
xtd::drawing::drawing_2d::pen_type | type () const noexcept |
Gets the style of lines drawn with this xtd::drawing::pen. | |
float | width () const noexcept |
Gets the width of this xtd::drawing::pen, in units of the xtd::drawing::graphics object used for drawing. | |
xtd::drawing::pen & | width (float value) |
Sets the width of this xtd::drawing::pen, in units of the xtd::drawing::graphics object used for drawing. | |
Public Methods | |
bool | equals (const xtd::drawing::pen &value) const noexcept override |
xtd::string | to_string () const noexcept override |
Returns a xtd::string that represents the current object. | |
virtual bool | equals (const object &obj) const noexcept |
Determines whether the specified object is equal to the current object. | |
template<typename object_a_t , typename object_b_t > | |
static bool | equals (const object_a_t &object_a, const object_b_t &object_b) noexcept |
Determines whether the specified object instances are considered equal. | |
Additional Inherited Members | |
Public Member Functions inherited from xtd::object | |
object ()=default | |
Create a new instance of the ultimate base class object. | |
virtual size_t | get_hash_code () const noexcept |
Serves as a hash function for a particular type. | |
virtual type_object | get_type () const noexcept |
Gets the type of the current instance. | |
template<typename object_t > | |
xtd::uptr< object_t > | memberwise_clone () const |
Creates a shallow copy of the current object. | |
Public Member Functions inherited from xtd::iequatable< pen > | |
virtual bool | equals (const pen &) const noexcept=0 |
Indicates wheth er the current object is equal to another object of the same type. | |
Static Public Member Functions inherited from xtd::object | |
template<typename object_a_t , typename object_b_t > | |
static bool | equals (const object_a_t &object_a, const object_b_t &object_b) noexcept |
Determines whether the specified object instances are considered equal. | |
template<typename object_a_t , typename object_b_t > | |
static bool | reference_equals (const object_a_t &object_a, const object_b_t &object_b) noexcept |
Determines whether the specified object instances are the same instance. | |