GH_GDI_Util

public sealed class GH_GDI_Util
Contains some global function for filleting corners of GDI objects.

Methods

BoxUnion

#
public static List<Point[]> BoxUnion(IEnumerable<Rectangle> rectangles)
Create the outline of a set of boxes.
rectangles (IEnumerable<Rectangle>)Boxes to union.
A list of Point arrays, where each array describes the corners of each silhouette.

FilletBoxOutline

#
public static GraphicsPath FilletBoxOutline(IEnumerable<Rectangle> boxes, int radius)
Fillet all the corners of the combined outline of a set of rectangles.
boxes (IEnumerable<Rectangle>)Rectangles to outline.
radius (int)Radius of corner fillets.
GraphicsPath describing the filleted outline or null on failure.

FilletPolyline

#
public static GraphicsPath FilletPolyline(Point[] corners, int radius)
Fillet all the corners of a freeform outline.
corners (Point[])A list of corner points.
radius (int)Fillet to apply to all corners.
A graphics path describing the filleted shape, or Nothing on failure.

FilletPolyline

#
public static GraphicsPath FilletPolyline(PointF[] corners, float radius)
Fillet all the corners of a freeform outline.
corners (PointF[])A list of corner points.
radius (float)Fillet to apply to all corners.
A graphics path describing the filleted shape, or Nothing on failure.

FilletRectangle

#
public static GraphicsPath FilletRectangle(Rectangle box, int radius)
Create a rectangle with filleted corners.
box (Rectangle)Rectangle to fillet.
radius (int)Fillet radius, radius will be limited if too large.
GraphicsPath describing filletted rectangle.

Freeform_Blob

#
public static GraphicsPath Freeform_Blob(IEnumerable<RectangleF> content, int padding, double accuracy, FieldSolver solver, double section)
Create a meta-ball outline for a set of rectangles.
content (IEnumerable<RectangleF>)Rectangles to encompass.
padding (int)Number of units to add to each box.
accuracy (double)Pixel accuracy for isosurface outlines. 3 is a good value for 1:1 UI.
solver (GH_Context.FieldSolver)The falloff solver to use. GH_Util.MetaBall.GH_Context contains a bunch of predefined solvers.
section (double)Elevation of section plane.
A graphics path describing all iso-surfaces

Freeform_Blob

#
public static GraphicsPath Freeform_Blob(IEnumerable<RectangleF> content, int padding, double accuracy)
Create a meta-ball outline for a set of rectangles.
content (IEnumerable<RectangleF>)Rectangles to encompass.
padding (int)Number of units to add to each box.
accuracy (double)Pixel accuracy for isosurface outlines. 3 is a good value for 1:1 UI.
A graphics path describing all iso-surfaces.

SimplifyBoxes

#
public static Rectangle[] SimplifyBoxes(IEnumerable<Rectangle> boxes)
Create a simplified collection of Rectangles that describe the same union space as the supplied rectangles.
boxes (IEnumerable<Rectangle>)Rectangles to simplify.
An ordered collection of non-intersecting rectangles or null on failure.