This class is used to create your own custom imagery for a linecap.
It is also a base class for the
AdjustableArrowCap.
You can specify the BaseCap on which the custom
cap is based. You should pick the cap most similar to the one you are
about to draw. The BaseInset allows you to move
the relative position of the end of the line and the endcap. The
StrokeJoin is used to specify the join-style of
the line segments in the cap, and the WidthScale
is used to specify how the cap should be scaled as the line width
changes.
The actual shape of the cap is specified at construction time, by
specifying two GraphicsPath objects: one to make
the outline (the stroke path) and the other to make the fill (the
fill path).
Note that a defect in the current version of the GDI+ rendering
engine means that the framework does not correctly calculate the
bounds of a path using a custom endcap, if that endcap has radically
different proportions to its BaseCap.
public class CustomLineCap : MarshalByRefObject : ICloneable, IDisposable {
// Public Constructors
public CustomLineCap(GraphicsPath fillPath, GraphicsPath strokePath);
public CustomLineCap(GraphicsPath fillPath, GraphicsPath strokePath, LineCap baseCap);
public CustomLineCap(GraphicsPath fillPath, GraphicsPath strokePath, LineCap baseCap, float baseInset);
// Public Instance Properties
public LineCap BaseCap{set; get; }
public float BaseInset{set; get; }
public LineJoin StrokeJoin{set; get; }
public float WidthScale{set; get; }
// Public Instance Methods
public object Clone(); // implements ICloneable
public void Dispose(); // implements IDisposable
public void GetStrokeCaps(out LineCap startCap, out LineCap endCap);
public void SetStrokeCaps(LineCap startCap, LineCap endCap);
// Protected Instance Methods
protected virtual void Dispose(bool disposing);
protected override void Finalize(); // overrides object
}