Table of Contents

Class RenderContextExtensions

Namespace
OFT.Rendering.Context
Assembly
OFT.Rendering.dll

Extension methods for RenderContext.

Added in ATAS 8.0.15.

public static class RenderContextExtensions
Inheritance
object
RenderContextExtensions

Fields

TooltipStringFormat

Format for tooltip text rendering.

public static readonly RenderStringFormat TooltipStringFormat

Field Value

RenderStringFormat

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

g RenderContext

Render context.

rectangle Rectangle

Bounds of the cross icon.

pen RenderPen

Pen used for the diagonals.

inset int

Distance 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

g RenderContext
rectangle Rectangle
color Color

DrawToolTip(RenderContext, in TooltipInfo)

Draws a tooltip using TooltipInfo struct.

public static void DrawToolTip(this RenderContext g, in TooltipInfo info)

Parameters

g RenderContext

Render context.

info TooltipInfo

Tooltip 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

g RenderContext

Render context.

text string

Tooltip text.

x int

X coordinate of the pointer.

y int

Y coordinate of the pointer.

color Color

Border and pointer color.

font RenderFont

Text font.

background Color

Background color.

right bool

If true, tooltip is rendered to the right of the pointer; otherwise to the left.

yOffset int

Vertical offset from the pointer.

xOffset int

Horizontal offset from the pointer.

textColor Color

Text 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

g RenderContext
rectangle Rectangle
color Color