IGridCanvas
public abstract class IGridCanvas
Namespace SharpCell.Grid · package SharpCell.Grid
What GridPainter paints on. Each UI framework implements it over its own drawing API; coordinates are device-independent pixels from the grid's top-left corner.
Methods
DrawLine(double, double, double, double, GridColor, double, GridDash)
public void DrawLine(double x1, double y1, double x2, double y2, GridColor color, double thickness = 1, GridDash dash = GridDash.Solid)
Draws a line, centred on the coordinates. One-pixel lines of the grid lie on pixel centres, such as x = 63.5.
DrawText(string, GridRect, GridTextAlignment, GridVerticalAlignment, GridColor, GridFont, bool)
public void DrawText(string text, GridRect bounds, GridTextAlignment alignment, GridVerticalAlignment verticalAlignment, GridColor color, GridFont font, bool wrap)
Draws text placed inside the bounds and cut off at them: one line, or wrapped onto as many lines as the width needs.
FillRectangle(GridRect, GridColor)
public void FillRectangle(GridRect rect, GridColor color)
Fills a rectangle.
StrokeRectangle(GridRect, GridColor, double)
public void StrokeRectangle(GridRect rect, GridColor color, double thickness)
Draws the outline of a rectangle, the stroke centred on its edges.