Skip to main content

GraphicsCache.Clear() Method

Clears the internal hash tables that store the pens, fonts and, solid and linear gradient brushes that have recently been used.

Namespace: DevExpress.Utils.Drawing

Assembly: DevExpress.Utils.v24.1.dll

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

Declaration

public virtual void Clear()

Remarks

The GraphicsCache class maintains internal collections of pens, fonts and brushes that have recently been used. The corresponding objects can be obtained from the collection and added to the collection using the methods provided by the GraphicsCache class (for instance, GraphicsCache.GetPen, GraphicsCache.GetFont, etc). The Clear method clears these collections. So after this method is called the GraphicsCache.GetPen and other methods will have to create new objects with the specified settings in corresponding collections.

See Also