Class QuantityColorGuide
A color guide that maps numeric quantities to colors using a range color rule.
public class QuantityColorGuide : IColorGuide, IMakeXmlSource, IGetColorGuide, IGetRangeColorRule
- Inheritance
-
QuantityColorGuide
- Implements
- Inherited Members
- Extension Methods
Constructors
QuantityColorGuide()
Initializes a new instance of the QuantityColorGuide class.
public QuantityColorGuide()
QuantityColorGuide(string, RangeColorRule)
Initializes a new instance of the QuantityColorGuide class with specified quantity key and range color rule.
public QuantityColorGuide(string quantityKey, RangeColorRule rangeColorRule)
Parameters
quantityKey
stringThe key used to retrieve quantity values.
rangeColorRule
RangeColorRuleThe rule that maps numeric values to colors.
QuantityColorGuide(XElement)
Initializes a new instance of the QuantityColorGuide class from XML.
public QuantityColorGuide(XElement src)
Parameters
src
XElementThe 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
RangeColorRule
Gets or sets the rule that maps numeric values to colors.
public RangeColorRule RangeColorRule { get; set; }
Property Value
XName
Name for XML IO.
public static string XName { get; }
Property Value
Methods
GetColorGuide()
Get IColorGuide.
public IColorGuide GetColorGuide()
Returns
GetRangeColorRule()
Gets the range color rule.
public RangeColorRule GetRangeColorRule()
Returns
- RangeColorRule
The range color rule.
GetRgb(object)
Get rgb bystep
.
public Vec3d GetRgb(object step)
Parameters
step
objectstep
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
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
stringThe base directory for resolving relative paths
relFile
stringThe relative file path for the XML source
Returns
- XElement
An XML element representing the object's state