Table of Contents

Class vdColor

Namespace
VectorDraw.Professional.vdObjects
Assembly
VectorDraw.Professional.dll

Represents a color value used by VectorDraw objects and palettes.

public sealed class vdColor : vdBaseObject, IDisposable, IVDSerialise, ICloneable, IBaseObject
Inheritance
vdColor
Implements
Inherited Members

Remarks

This type encapsulates a variety of color semantics used throughout the VectorDraw product: true colors (RGB), palette index colors, and special values such as ByLayer, ByBlock, Foreground and Background. It also stores material properties (transparency, ambient/diffuse/specular, roughness, reflection/refraction, metallic) and an optional image/material matrix used for textured materials.

Constructors

vdColor()

Initializes the vdColor object.

vdColor(Color)

Initializes the vdColor object from a System.Drawing.Color object.

vdColor(Color, byte)

Initializes the vdColor object from a System.Drawing.Color object.

vdColor(ColorType)

Initializes the vdColor object from a vdColor.ColorType .

Properties

AlphaBlending

Specifies the amount of filtered transparency of a surface.

Ambient

Simulate the amount of the light that is scattered around the scene that does not come directly from a light source on a surface

Blue

Get/Set the Blue value fro the true color of the object.

ByBlock

Setting the Color to BYBLOCK means that an object assumes the foreground color until it is grouped into a block. Whenever the block is inserted, all objects inherit the block's color.

ByColorIndex

Get/Set the vdColor object to be by index color(vdColor.ColorType).

ByLayer

Setting the vdColor to BYLAYER means that an object assumes the Color that is assigned to the object's layer. If the object that has the color, belongs to a block and the block is inserted in Standard (Layer 0), then the object inherit the block's color.

ColorFlag

Get/Set the vdColor.ColorType of the vdColor object.

ColorIndex

Get/Set the index of the vdColor object to the palette.

Diffuse

Diffuse determines how much of the light that is seen comes directly from a light source on a surface.

Green

Get/Set the Green value fro the true color of the object.

IsBackGround

Get/Set the vdColor object to be a Background color(vdColor.ColorType).

IsColorIndexOrTrueColor

Get if the vdColor object is by index or true color (vdColor.ColorType).

IsForGround

Get/Set the vdColor object to be a Foreground color(vdColor.ColorType).

MaterialImage

Get/Set a vdImageDef object(image) to be applied as material for this vdColor object.

MaterialMatrix

Get/Set a Matrix used for transformations for the material(image) of the vdColor object.

Metallic

Specifies the amount of metallic finish for a surface.

OldColorIndex

This is used for compatibility with colors of version 5.

Palette

Get/Set the Palette of the vdColor object.If the vdColor object is in a Document then the Document's palette is returned.

PredefinedType

Get/Set predefined material types.

Red

Get/Set the Red value fro the true color of the object.

Reflection

Specifies the amount of mirrored finish for a surface.

Refraction

Specifies the blending of the ray of light passing throw a transparency surface.

Roughness

Specifies the amount of a spot light highlighting on a surface.

Specular

Specifies the saturation to the light source's color around the brightest area (center) of the highlight

SystemColor

Get/Set the vdColor object to get it's value from a system color.

Transmit

Specifies the amount of non-filtered light that is transmitted through a surface. AlphaBlending

TrueColor

Get/Set the true color(RGB) value of the vdColor object.

Methods

AsSystemColor()

Returns a system Color that represents this vdColor object.

Clone()

Creates and returns a new vdColor object as copy from this one.

CopyFrom(vdColor)

Copies all properties from a vdColor object to this object.

CopyToPenStyle(vdGdiPenStyle)

Set the properties of input vdGdiPenStyle pen object equal to the corresponding properties of this object.

DeSerialize(DeSerializer, string, object)

This Function is called foreach field name of the vdColor object when opening in vdml format.

Dispose()

Releases all resources used by this object.

Equals(Color)

Checks the Red, Green, Blue and Alpha values if they are equal.

Equals(object)

Checks if this vdColor object is equal to an object.

Equals(vdColor)

Checks if this vdColor object is equal to a vdColor object.

FromInt32(int)

Sets the color from an Int32 value.

FromRGB(byte, byte, byte)

Sets the TrueColor property from three byte values representing the Red,Green,Blue values of the true color.

FromRGB(int)

Creates a System.Drawing.Color structure from a 32-bit RGB value.

FromString(string)

Sets the vdColor.ColorType of the vdColor object with a string value.

FromSystemColor(Color)

Sets the TrueColor property from a System color.

GetHashCode()

Returns a 32-bit signed integer hash code for this object instance.

GetMaterialScale()

Get the scale that is tranformed by the material of this object.

GetTableDependecies(vdTableDependeciesArgs)

Fills the passed vdTableDependeciesArgs args with all the table references of this object (vdLayer, vdBlock, vdDimstyle, vdLineType, vdTextstyle, vdImageDef, vdHatchPattern etc).

Invalidate()

Invalidate the owner of the vdColor object.

IsMaterialValid()

Checks the existance of the material of the object.

IsTableObjectDependOn(vdPrimary)

Check if the table object is depend on this figure

RGBFromSystem(Color)

Gets the 32-bit RGB value of this System.Drawing.Color structure.

Serialize(Serializer)

This Function is called when saving the vdColor object to vdml format.

SetMaterialScale(double)

Sets the Material Matrix of this object in order to scale the material by a double value.

ToInt32()

Calculates an Int32 that represents the color value of the vdColor object.

ToString()

Gets a System.String that represents the vdColor Object.

Update()

Update the owner of the vdColor object.

Operators

operator ==(vdColor, vdColor)

Implements the == operator for vdColor objects.

operator !=(vdColor, vdColor)

Implements the != operator for vdColor objects.