Class vdPalette
- Namespace
- VectorDraw.Professional.vdObjects
- Assembly
- VectorDraw.Professional.dll
Represents a palette of colors used by the VectorDraw document/renderer.
public sealed class vdPalette : vdBaseObject, IDisposable, IVDSerialise, IEnumerable, IBaseObject
- Inheritance
-
vdPalette
- Implements
- Inherited Members
Remarks
The palette stores an array of vdColor items, by default 255 length, and a background color and exposes methods to convert to renderer-compatible palettes, serialize/deserialize and manage items.
Constructors
- vdPalette()
Initializes the vdPalette object and adds to the collection the default colors.
Properties
- Background
Get/Set the color used for background.
- Count
Get the item's count of the collection.
- Forground
Get/Set the Foreground color which is the color with index 6 as system color.
- this[int]
Get a vdColor object from the collection at a specified index.
- ItemType
Returns the Type of Items in the collection
Methods
- Add(object)
Adds an object to the end of the collection.
- AddItem(vdColor)
Adds a vdColor object to the palette.
- AddSystemColorItem(Color)
Adds a system color to the palette.
- AsGdiPalette()
Returns a new array of 256 System.Drawing.Color with RGB values.
- AsSystemPalette()
A palette used in vdRender engine.
- CopyFrom(vdPalette)
Copies all properties from a vdPalette object to this object.
- DeSerialize(DeSerializer, string, object)
This Function is called foreach field name of the vdPalette object when opening in vdml format.
- GetEnumerator()
Implements the "foreach" expression for the collection.
- GetTableDependecies(vdTableDependeciesArgs)
Fills the passed vdTableDependeciesArgs args with all the table references of this object (vdLayer, vdBlock, vdDimstyle, vdLineType, vdTextstyle, vdImageDef, vdHatchPattern etc).
- RemoveAll()
Removes all items from the palette.
- Serialize(Serializer)
This Function is called when saving the vdPalette object to vdml format.
- SetBkColorFixForground(Color)
Sets the background color and also fixes the foreground color to be the opposite.
- SetDefault()
Initializes the vdPalette by adding all default 255 colors and also a black background..
- SetForgroundFixBkColor(Color)
Sets the foreground color and also fixes the background color to be the opposite.
- ToString()
Gets a System.String that represents the count of the vdPalette Object.