Back to Devexpress

GraphicsCache Class

windowsforms-devexpress-dot-utils-dot-drawing.md

latest6.1 KB
Original Source

GraphicsCache Class

Provides methods to paint on drawing surfaces in GDI+ and DirectX modes (see DirectX hardware acceleration). Provides storage for pens, fonts and brushes.

Namespace : DevExpress.Utils.Drawing

Assembly : DevExpress.Utils.v25.2.dll

NuGet Packages : DevExpress.Utils, DevExpress.Wpf.Core

Declaration

csharp
public class GraphicsCache :
    IGraphicsCache,
    IDisposable,
    ISkinProvider
vb
Public Class GraphicsCache
    Implements IGraphicsCache,
               IDisposable,
               ISkinProvider

The following members return GraphicsCache objects:

Show 26 links

Remarks

The GraphicsCache class provides methods to obtain pens, fonts and brushes with specified settings. When a method is called, it first checks whether the object with the requested parameters is already stored within an internal hash table. If so, the located object is returned. Otherwise a new object with the requested parameters is created and written to the corresponding hash table.

The GraphicsCache object maintains four hash tables used to store pens, fonts and solid and linear gradient brushes. You can obtain corresponding objects via the GraphicsCache.GetPen, GraphicsCache.GetFont, GraphicsCache.GetSolidBrush and GraphicsCache.GetGradientBrush methods respectively. Note that all mentioned hash tables are initially empty.

When DirectX hardware acceleration is activated, the methods provided by the GraphicsCache object allow you to paint various graphics primitives.

Inheritance

Object GraphicsCache

See Also

GraphicsCache Members

GetFont(Font, FontStyle)

GetPen

GetSolidBrush(Color)

GetGradientBrush

DirectX Hardware Acceleration

DevExpress.Utils.Drawing Namespace