nuget server logo nuget api documents
↑

API Docs / Microsoft.VisualBasic.Drawing.DirectX / DxBrushCache

DxBrushCache

Full name Microsoft.VisualBasic.Drawing.DirectX.DxBrushCache Assembly Microsoft.VisualBasic.Drawing.DirectX Members 6

The direct2d resource cache of a render target.

00 Remarks

Creating a direct2d brush / text format / stroke style object is a relatively expensive com operation, drawing a large amount of the polygon primitives with the same color should reuse the same brush object instead of creating a new one for each primitive.

01 Syntax

Microsoft.VisualBasic.Drawing.DirectX.DxBrushCache

02 Methods

NameOverloadsSummary
GetBrush 2 convert a gdi+ style brush object into a direct2d brush
IsDefaultStroke 1 does the pen describe a plain solid stroke line?
GetStrokeStyle 1 get or create the direct2d stroke style of the given pen object
GetTextFormat 1 get or create the directwrite text format of the given font
MeasureText 1 measure the text size through the directwrite text layout api

03 Members

method GetBrush overload 2 #
GetBrush(Color)

get or create a solid color brush of the given color

method GetBrush #
GetBrush(Brush)

convert a gdi+ style brush object into a direct2d brush

method IsDefaultStroke #
IsDefaultStroke(Pen)

does the pen describe a plain solid stroke line?

method GetStrokeStyle #
GetStrokeStyle(Pen)

get or create the direct2d stroke style of the given pen object

Remarks

a default pen (solid line, butt cap and miter join) does not require a stroke style object at all, so that the fastest path is taken for the most common case.

method GetTextFormat #
GetTextFormat(Font)

get or create the directwrite text format of the given font

method MeasureText #
MeasureText(String, Font, Single)

measure the text size through the directwrite text layout api