The direct2d resource cache of a render target.
DxBrushCache
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
02 Methods
| Name | Overloads | Summary |
|---|---|---|
| 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
Color)get or create a solid color brush of the given color
Brush)convert a gdi+ style brush object into a direct2d brush
Pen)does the pen describe a plain solid stroke line?
Pen)get or create the direct2d stroke style of the given pen object
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.
Font)get or create the directwrite text format of the given font
String, Font, Single)measure the text size through the directwrite text layout api