Class RenderContextExtensions
Extension methods for RenderContext.
Added in ATAS 8.0.15.
public static class RenderContextExtensions
- Inheritance
-
objectRenderContextExtensions
Fields
TooltipStringFormat
Format for tooltip text rendering.
public static readonly RenderStringFormat TooltipStringFormat
Field Value
Methods
DrawCrossIcon(RenderContext, Rectangle, RenderPen, int)
Draws a close-style cross (two diagonals) inside the rectangle. An even-sized rectangle keeps the diagonals' crossing on an integer pixel center, so the icon stays crisp.
public static void DrawCrossIcon(this RenderContext g, Rectangle rectangle, RenderPen pen, int inset = 4)
Parameters
gRenderContextRender context.
rectangleRectangleBounds of the cross icon.
penRenderPenPen used for the diagonals.
insetintDistance from the rectangle edges to the diagonal ends.
DrawDashedBorder(RenderContext, Rectangle, Color)
Draws a one-pixel dashed border inside physical pixel bounds, matching filled rectangle edges.
<p>Not in ATAS 8.0.15 yet: available from the next version.</p>
public static void DrawDashedBorder(this RenderContext g, Rectangle rectangle, Color color)
Parameters
gRenderContextrectangleRectanglecolorColor
DrawToolTip(RenderContext, in TooltipInfo)
Draws a tooltip using TooltipInfo struct.
public static void DrawToolTip(this RenderContext g, in TooltipInfo info)
Parameters
gRenderContextRender context.
infoTooltipInfoTooltip information.
DrawToolTip(RenderContext, string, int, int, Color, RenderFont, Color, bool, int, int, Color)
Draws a tooltip with text, background, border and pointer triangle.
public static void DrawToolTip(this RenderContext g, string text, int x, int y, Color color, RenderFont font, Color background, bool right, int yOffset, int xOffset, Color textColor)
Parameters
gRenderContextRender context.
textstringTooltip text.
xintX coordinate of the pointer.
yintY coordinate of the pointer.
colorColorBorder and pointer color.
fontRenderFontText font.
backgroundColorBackground color.
rightboolIf true, tooltip is rendered to the right of the pointer; otherwise to the left.
yOffsetintVertical offset from the pointer.
xOffsetintHorizontal offset from the pointer.
textColorColorText color.
DrawWarningIcon(RenderContext, Rectangle, Color)
Draws a rounded warning triangle with a solid stem and a separate round dot.
<p>Not in ATAS 8.0.15 yet: available from the next version.</p>
public static void DrawWarningIcon(this RenderContext g, Rectangle rectangle, Color color)
Parameters
gRenderContextrectangleRectanglecolorColor