Table of Contents

Class DiscreteQuantityColorGuide

Namespace
Hi.Coloring
Assembly
HiMech.dll

A color guide that assigns colors based on discrete quantity values.

public class DiscreteQuantityColorGuide : IColorGuide, IMakeXmlSource, IGetColorGuide
Inheritance
DiscreteQuantityColorGuide
Implements
Inherited Members
Extension Methods

Constructors

DiscreteQuantityColorGuide()

Initializes a new instance of the DiscreteQuantityColorGuide class.

public DiscreteQuantityColorGuide()

DiscreteQuantityColorGuide(string)

Initializes a new instance of the DiscreteQuantityColorGuide class with a specified quantity key.

public DiscreteQuantityColorGuide(string quantityKey)

Parameters

quantityKey string

The key used to retrieve quantity values.

DiscreteQuantityColorGuide(XElement)

Initializes a new instance of the DiscreteQuantityColorGuide class from XML.

public DiscreteQuantityColorGuide(XElement src)

Parameters

src XElement

The XML element containing the color guide data.

Properties

QuantityKey

Gets or sets the key used to retrieve the quantity value.

public string QuantityKey { get; set; }

Property Value

string

XName

Name for XML IO.

public static string XName { get; }

Property Value

string

Methods

GetColorGuide()

public IColorGuide GetColorGuide()

Returns

IColorGuide

IColorGuide

GetRgb(object)

Get rgb bystep.

public Vec3d GetRgb(object step)

Parameters

step object

step

Returns

Vec3d

rgb

GetRgbWithPriority(object, out Vec3d, out double)

Get color with the showing priority if the showing area overlapped by shrinking. Only effect on CubeTree.

public void GetRgbWithPriority(object step, out Vec3d rgb, out double attachmentPriority)

Parameters

step object

step

rgb Vec3d

rgb

attachmentPriority double

priority

MakeXmlSource(string, string)

Creates an XML representation of the object. This method may also generate additional resources such as related files.

public XElement MakeXmlSource(string baseDirectory, string relFile)

Parameters

baseDirectory string

The base directory for resolving relative paths

relFile string

The relative file path for the XML source

Returns

XElement

An XML element representing the object's state