GridViewDrawingContext
Namespace: TagBites.WinSchedulers
Assembly: TagBites.WinSchedulers.dll
Product: TagBites.WinSchedulers v. 1.3.8
Describes visual content using draw commands.
public class GridViewDrawingContext : System.IDisposableInheritance: object → GridViewDrawingContext
Constructors
Section titled “Constructors”GridViewDrawingContext(GridViewWindow, DrawingContext, DrawingCache, GridViewStyle, Rect, Point)
Section titled “GridViewDrawingContext(GridViewWindow, DrawingContext, DrawingCache, GridViewStyle, Rect, Point)”Initializes a new instance of the GridViewDrawingContext class with the specified drawing context, style and caches.
public GridViewDrawingContext(GridViewWindow window, DrawingContext dc, DrawingCache cache, GridViewStyle gridStyle, Rect bounds, Point offset)Parameters
Section titled “Parameters”windowGridViewWindow
A GridViewWindow that represents the object with columns and rows.dcDrawingContext
A DrawingContext that represents the visual content to draw.cacheDrawingCache
A DrawingCache that represents the cache for drawing objects.gridStyleGridViewStyle
A GridViewStyle that represents the style of the drawing.boundsRect
A Rect that represents the drawing bounds.offsetPoint
A Point that represents the upper-left corner of the drawing region.
Properties
Section titled “Properties”Bounds
Section titled “Bounds”Gets the bounds in which to draw.
public Rect Bounds { get; }Property Value
Section titled “Property Value”The bounds in which to draw.
Gets the cache for drawing objects.
public DrawingCache Cache { get; }Property Value
Section titled “Property Value”The cache for drawing objects.
Gets the visual content to draw.
public DrawingContext Dc { get; }Property Value
Section titled “Property Value”The visual content to draw.
GridStyle
Section titled “GridStyle”Get the style of the drawing.
public GridViewStyle GridStyle { get; }Property Value
Section titled “Property Value”The style of the drawing.
RealBounds
Section titled “RealBounds”Gets the bounds including offset in which to draw.
public Rect RealBounds { get; }Property Value
Section titled “Property Value”The bounds including offset in which to draw.
Window
Section titled “Window”Gets the window with defined columns and rows.
public GridViewWindow Window { get; }Property Value
Section titled “Property Value”The window with defined columns and rows.
Methods
Section titled “Methods”Clip(Rect)
Section titled “Clip(Rect)”Creates a new instance and pushes the specified clip region onto the drawing context.
public GridViewDrawingContext Clip(Rect bounds)Parameters
Section titled “Parameters”boundsRect
The clip region to apply to subsequent drawing commands.
Returns
Section titled “Returns”A GridViewDrawingContextobject.
Create(Rect)
Section titled “Create(Rect)”Creates a new instance using the new bounds.
public GridViewDrawingContext Create(Rect newBounds)Parameters
Section titled “Parameters”newBoundsRect
The new bounds for drawing.
Returns
Section titled “Returns”A GridViewDrawingContextobject.
Dispose()
Section titled “Dispose()”public virtual void Dispose()DrawText(string, Color, Rect, AlignmentX, AlignmentY)
Section titled “DrawText(string, Color, Rect, AlignmentX, AlignmentY)”Draws the specified text within the specified bounds using the specified color and content alignments.
public void DrawText(string text, Color color, Rect rect, AlignmentX horizontalAlignment, AlignmentY verticAlignment)Parameters
Section titled “Parameters”textstring
The text to be drawn.colorColor
The Color to apply to the text.rectRect
The Rect that specifies the bounds in which to draw .horizontalAlignmentAlignmentX
One of the AlignmentX values that specifies the horizontal alignment of the drawing.verticAlignmentAlignmentY
One of the AlignmentY values that specifies the vertical alignment of the drawing.
DrawText(string, Color, Point, AlignmentX, AlignmentY)
Section titled “DrawText(string, Color, Point, AlignmentX, AlignmentY)”Draws the specified text at the specified location using the specified color and content alignments.
public void DrawText(string text, Color color, Point point, AlignmentX alignment, AlignmentY vertiacalAlignment)Parameters
Section titled “Parameters”textstring
The text to be drawn.colorColor
The Color to apply to the text.pointPoint
The location where the text is to be drawn.alignmentAlignmentX
One of the AlignmentX values that specifies the horizontal alignment of the drawing.vertiacalAlignmentAlignmentY
One of the AlignmentY values that specifies the vertical alignment of the drawing.
DrawTextCenter(string, Color, Rect)
Section titled “DrawTextCenter(string, Color, Rect)”Draws the specified text center at the specified bounds using the specified color.
public void DrawTextCenter(string text, Color color, Rect rect)