DisplayExtensionMethods
Methods
Draw a plane without any clipping issues, using the C-plane grid spacing as sizing.
Draw a plane without any clipping issues.
Draw a plane without any clipping issues.
public static void DrawPoint(this Graphics graphics, PointF point, float scale, params DisplayPointAttributes[] sequence)
Draw a point symbol at the given location.
Parameters:
| graphics (Graphics) | Graphics object to draw with. |
| point (PointF) | Location of point. |
| scale (float) | Scale factor. |
| sequence (params DisplayPointAttributes[]) | Sequence of fallback attributes. |
public static void DrawPoints(this Graphics graphics, IEnumerable<PointF> points, float scale, params DisplayPointAttributes[] sequence)
Draw a point symbol at the given location.
Parameters:
| graphics (Graphics) | Graphics object to draw with. |
| points (IEnumerable<PointF>) | Points to draw. |
| scale (float) | Scale factor. |
| sequence (params DisplayPointAttributes[]) | Sequence of fallback attributes. |
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.
Parameters:
| 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. |
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.
Parameters:
| 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. |