DisplayExtensionMethods

public static class DisplayExtensionMethods

Methods

DrawPlane

#Example
public static void DrawPlane(this DisplayPipeline pipeline, Plane plane, Color xColour, int xStroke, Color yColour, int yStroke, Color gColour, int gStroke, int gridCount)
Draw a plane without any clipping issues, using the C-plane grid spacing as sizing.
pipeline (DisplayPipeline)
plane (Plane)
xColour (Color)
xStroke (int)
yColour (Color)
yStroke (int)
gColour (Color)
gStroke (int)
gridCount (int)

DrawPlane

#Example
public static void DrawPlane(this DisplayPipeline pipeline, Plane plane, double unit, double minSize, double maxSize, Color xColour, int xStroke, Color yColour, int yStroke, Color gColour, int gStroke, int gridCount)
Draw a plane without any clipping issues.
pipeline (DisplayPipeline)
plane (Plane)
unit (double)
minSize (double)
maxSize (double)
xColour (Color)
xStroke (int)
yColour (Color)
yStroke (int)
gColour (Color)
gStroke (int)
gridCount (int)

DrawPlane

#Example
public static void DrawPlane(this DisplayPipeline pipeline, Plane plane, double unit, double minSize, double maxSize, Color xColour, int xStroke, Color yColour, int yStroke, Color gColour, int gStroke, int gridCount)
Draw a plane without any clipping issues.
pipeline (DisplayPipeline)
plane (Plane)
unit (double)
minSize (double)
maxSize (double)
xColour (Color)
xStroke (int)
yColour (Color)
yStroke (int)
gColour (Color)
gStroke (int)
gridCount (int)

DrawPoint

#Example
public static void DrawPoint(this Graphics graphics, PointF point, float scale, params DisplayPointAttributes[] sequence)
Draw a point symbol at the given location.
graphics (Graphics)Graphics object to draw with.
point (PointF)Location of point.
scale (float)Scale factor.
sequence (params DisplayPointAttributes[])Sequence of fallback attributes.

DrawPoints

#Example
public static void DrawPoints(this Graphics graphics, IEnumerable<PointF> points, float scale, params DisplayPointAttributes[] sequence)
Draw a point symbol at the given location.
graphics (Graphics)Graphics object to draw with.
points (IEnumerable<PointF>)Points to draw.
scale (float)Scale factor.
sequence (params DisplayPointAttributes[])Sequence of fallback attributes.

DrawVectorArrow

#Example
public static void DrawVectorArrow(this DisplayPipeline pipeline, Line vector, double headSize, Color colour, float width)
Draw a Grasshopper 2 style vector arrow. The head is drawn as a single filled polygon whose outline is that of a mitred, flat-capped stroke. It is more accurate than other arrow drawing methods in that the tip of the drawn arrow lands exactly on the end of the line, the tip is always sharp, and the head is resized to never be too small or large.
pipeline (DisplayPipeline)Pipeline to draw with.
vector (Line)Vector shaft to draw.
headSize (double)Size of the head as a factor of arrow length. 0.1 would be a decent size.
colour (Color)Colour of arrow geometry.
width (float)Width of arrow geometry. Note that the shaft is draw using a method which only supports integer thicknesses and the arrow head is drawn thicker to counter the human perception of seeing angled lines thinner than they really are.

DrawVectorArrow

#Example
public static void DrawVectorArrow(this DisplayPipeline pipeline, Line vector, double headSize, Color colour, float width)
Draw a Grasshopper 2 style vector arrow. The head is drawn as a single filled polygon whose outline is that of a mitred, flat-capped stroke. It is more accurate than other arrow drawing methods in that the tip of the drawn arrow lands exactly on the end of the line, the tip is always sharp, and the head is resized to never be too small or large. Also note this method already takes into account logical pixel scaling.
pipeline (DisplayPipeline)Pipeline to draw with.
vector (Line)Vector shaft to draw.
headSize (double)Size of the head as a factor of arrow length. 0.1 would be a decent size.
colour (Color)Colour of arrow geometry.
width (float)Width of arrow geometry. Note that the shaft is draw using a method which only supports integer thicknesses and the arrow head is drawn thicker to counter the human perception of seeing angled lines thinner than they really are.

ToDashPattern

#Example
public static float[] ToDashPattern(this Dashes dashes, float pixelScaling)
dashes (Dashes)
pixelScaling (float)