xtd 0.2.0
Loading...
Searching...
No Matches

◆ dash_pattern() [2/2]

xtd::drawing::pen & xtd::drawing::pen::dash_pattern ( const std::vector< float > &  value)

Sets an array of custom dashes and spaces.

Parameters
valueAn array of real numbers that specifies the lengths of alternating dashes and spaces in dashed lines.
Remarks
Assigning a value other than empty to this property will set the xtd::drawing::pen::dash_style property for this xtd::drawing::pen to xtd::drawing:drawing_2d::dash_style::custom.
The elements in the dash_pattern array set the length of each dash and space in the dash pattern. The first element sets the length of a dash, the second element sets the length of a space, the third element sets the length of a dash, and so on. Consequently, each element should be a non-zero positive number.
The length of each dash and space in the dash pattern is the product of the element value in the array and the width of the xtd::drawing::pen.