NShape Reference
ToolCache

<< Click to Display Table of Contents >>

Navigation:  Class Reference > Namespace Dataweb.NShape.Advanced >

NShape Reference
ToolCache

Previous pageReturn to chapter overviewNext page

Manages objects of the drawing library.

Syntax

public static class ToolCache

Description

The ToolCache manages objects needed for drawing. For every style there is exactly one corresponding GDI+ object used for drawing it. If a style changes, the ToolCache has to be notified about the change. All GDI+ objects are disposed and deleted in this case.

If a GDI+ object is requested that does not exist in the ToolCache yet, it is created and stored for future use.

Public Methods

Name

Description

Clear

Disposes and deletes all objects contained in the ToolCache.

GetBrush

Returns a GDI+ brush for the given color style / fill style / GDI+ image

GetCapBounds

Returns the bounds of the (transformed) cap bounds for the given cap style and line style.

GetCapPoints

Fills the given point array with the points defining the line cap.

GetFont

Gets a GDI+ font for the given character style.

GetStringFormat

Gets a GDI+ string format for the given paragraph style.

GetTransformedBrush

Gets a transformed brush for the given fill style.

NotifyStyleChanged

Disposes and deletes all cached objects representing the given style.

RemoveStyleSetTools

Removes all objects depending on styles of the given style set.

Requirements

Namespace: Dataweb.NShape.Advanced

Assembly: Dataweb.NShape