DisplayPen

References
public class DisplayPen
Pen used to define stroke applied to several DisplayPipeline draw functions

Properties

CapStyle

#Since v8.0
How caps are drawn at the ends of open curves
public LineCapStyle CapStyle { get; set; }

Color

#Since v8.0
Color applied to stroke
public Color Color { get; set; }

HaloColor

#Since v8.0
Halos are blended colors drawn around a curve for purposes like selection
public Color HaloColor { get; set; }

HaloThickness

#Since v8.0
Halos are blended colors drawn around a curve for purposes like selection
public float HaloThickness { get; set; }

JoinStyle

#Since v8.0
How corners of curves are joined
public LineJoinStyle JoinStyle { get; set; }

PatternAutoscale

#Since v9.0
Scale pattern in detail views
public bool PatternAutoscale { get; set; }

PatternBySegment

#Since v8.0
Restart patterns at corners in a curve
public bool PatternBySegment { get; set; }

PatternLengthInWorldUnits

#Since v8.0
If true, lengths in pattern definition are interpreted to be in world units. If false, screen pixel distances are used.
public bool PatternLengthInWorldUnits { get; set; }

PatternOffset

#Since v8.0
Offset to apply to pattern. If RhinoMath.UnsetSingle, then pattern is centered to keep even dash lengths at ends
public float PatternOffset { get; set; }

PatternScale

#Since v9.0
Scale applied to the pattern, use 0.0 to let Rhino apply global scale.
public float PatternScale { get; set; }

Thickness

#Since v8.0
Thickness for stroke
public float Thickness { get; set; }

ThicknessSpace

#Since v8.0
Coordinate system for the pen's thickness
public CoordinateSystem ThicknessSpace { get; set; }

Methods

Duplicate

#Since v8.0
Create a duplicate of this display pen.
public DisplayPen Duplicate()
An exact duplicate of this display pen.

FromLinetype

#Since v8.0
Create a display pen that matches a linetype definition
public static DisplayPen FromLinetype(
linetype,
color,
patternScale
scale to be applied to linetype dash pattern. Typically this is 1.0.
)

FromLinetype

#Since v9.0
Create a display pen that matches a linetype definition on any viewport.
public static DisplayPen FromLinetype(
linetype,
color
)

PatternAsArray

#Since v8.0
Get the pattern for this pen as an array of dash,gap,dash,gap... values
public float[] PatternAsArray()

SetPattern

#Since v8.0
Set pattern to apply for a stroke.
public void SetPattern(
dashesAndGaps
Lengths of dashes and gaps for a pattern. Dash is always assumed the first item. There is a limit to 8 dashes and gaps total
)
ArgumentOutOfRangeExceptionthrown when dashes and gaps have more than 8 items

SetTaper

#Since v8.0
Positions and thickness at those positions along a curve that define a taper.
public void SetTaper(
startThickness,
endThickness,
taperPoint
)

TaperAsArray

#Since v8.0
Collection of positions and thicknesses at those positions to define a taper Rhino currently only supports either no taper or a single taper. An array is used here in case Rhino supports multiple taper values in the future.
public Point2f[] TaperAsArray()