VisimBox 1.0 VisimBox 3d simulation and visualisation ToolBox

- Main Page
- Packages
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes
VisiMath.ColorByte Struct Reference

Standard color structure. More...

List of all members.

## Public Member Functions
| ColorByte (byte r, byte g, byte b)
| ColorByte (byte r, byte g, byte b, byte a)
| ColorByte (float r, float g, float b, float a)
| Creates color from float values (0 to 1.0, will be clamped automatically)
| ColorByte (float r, float g, float b)
| Creates color from float values (0 to 1.0, will be clamped automatically)
| ColorByte (Int32 ARGB)
| Constructs color from ARGB values in int32.
| ColorByte (System.Xml.XmlReader reader)
| XML reader constructor.
Int32 | GetARGB ()
| Returns 32 bit representation of the color.
void | FromARGB (Int32 argb)
| Constructs color from 32 bit representation.
float[] | GetFloats ()
| Returns color value as array of floats 0.0-1.0.
override int | GetHashCode ()
override bool | Equals (object obj)
override string | ToString ()
bool | Equals (ColorByte other)
System.Xml.Schema.XmlSchema | GetSchema ()
| Reqired by IXMLserializable.
void | ReadXml (System.Xml.XmlReader reader)
| Deserializes object from XML.
void | WriteXml (System.Xml.XmlWriter writer, string RootName, bool withoutalpha=false)
| Serializes object to XML.
void | WriteXml (System.Xml.XmlWriter writer, bool withoutalpha=false)
| Serializes object to XML.
void | WriteXml (System.Xml.XmlWriter writer)
| Serializes object to XML.
## Static Public Member Functions
static bool | operator== (ColorByte left, ColorByte right)
static bool | operator!= (ColorByte left, ColorByte right)
## Public Attributes
byte | R
| Red channel.
byte | G
| Green channel.
byte | B
| Blue channel.
byte | A
| Alpha channel.
## Static Public Attributes
static ColorByte | Black = new ColorByte(0, 0, 0)
static ColorByte | White = new ColorByte(255, 255, 255)
static ColorByte | Red = new ColorByte(255, 0, 0)
static ColorByte | Green = new ColorByte(0, 255, 0)
static ColorByte | Blue = new ColorByte(0, 0, 255)

## Detailed Description

Standard color structure.

## Constructor & Destructor Documentation

VisiMath.ColorByte.ColorByte | ( | byte | r,
|  | byte | g,
|  | byte | b
| ) |  |

VisiMath.ColorByte.ColorByte | ( | byte | r,
|  | byte | g,
|  | byte | b,
|  | byte | a
| ) |  |

VisiMath.ColorByte.ColorByte | ( | float | r,
|  | float | g,
|  | float | b,
|  | float | a
| ) |  |

Creates color from float values (0 to 1.0, will be clamped automatically)

VisiMath.ColorByte.ColorByte | ( | float | r,
|  | float | g,
|  | float | b
| ) |  |

Creates color from float values (0 to 1.0, will be clamped automatically)

VisiMath.ColorByte.ColorByte | ( | Int32 | ARGB | ) |

Constructs color from ARGB values in int32.

Parameters:

  ARGB | Color as int32

VisiMath.ColorByte.ColorByte | ( | System.Xml.XmlReader | reader | ) |

XML reader constructor.

Parameters:

  reader | XML reader

## Member Function Documentation

override bool VisiMath.ColorByte.Equals | ( | object | obj | ) |

bool VisiMath.ColorByte.Equals | ( | ColorByte | other | ) |

void VisiMath.ColorByte.FromARGB | ( | Int32 | argb | ) |

Constructs color from 32 bit representation.

Parameters:

  argb | Int32 holding color value

Int32 VisiMath.ColorByte.GetARGB | ( |  | ) |

Returns 32 bit representation of the color.

Returns:
  Color as INT32

float [] VisiMath.ColorByte.GetFloats | ( |  | ) |

Returns color value as array of floats 0.0-1.0.

Returns:
  Float values

override int VisiMath.ColorByte.GetHashCode | ( |  | ) |

System.Xml.Schema.XmlSchema VisiMath.ColorByte.GetSchema | ( |  | ) |

Reqired by IXMLserializable.

Returns:
  Null

static bool VisiMath.ColorByte.operator!= | ( | ColorByte | left,
|  | ColorByte | right
| ) |  | `[static]`

static bool VisiMath.ColorByte.operator== | ( | ColorByte | left,
|  | ColorByte | right
| ) |  | `[static]`

void VisiMath.ColorByte.ReadXml | ( | System.Xml.XmlReader | reader | ) |

Deserializes object from XML.

Parameters:

  reader | XML reader

override string VisiMath.ColorByte.ToString | ( |  | ) |

void VisiMath.ColorByte.WriteXml | ( | System.Xml.XmlWriter | writer | ) |

Serializes object to XML.

Parameters:

  writer | XML writer to save values

void VisiMath.ColorByte.WriteXml | ( | System.Xml.XmlWriter | writer,
|  | bool | withoutalpha = `false`
| ) |  |

Serializes object to XML.

Parameters:

  writer | XML writer to save values
  withoutalpha | If true, alpha value won't be saved

void VisiMath.ColorByte.WriteXml | ( | System.Xml.XmlWriter | writer,
|  | string | RootName,
|  | bool | withoutalpha = `false`
| ) |  |

Serializes object to XML.

Parameters:

  writer | XML writer to save values
  RootName | Node to save color to
  withoutalpha | If true, alpha value won't be saved

## Member Data Documentation

byte VisiMath.ColorByte.A

Alpha channel.

byte VisiMath.ColorByte.B

Blue channel.

ColorByte VisiMath.ColorByte.Black = new ColorByte(0, 0, 0)`[static]`

ColorByte VisiMath.ColorByte.Blue = new ColorByte(0, 0, 255)`[static]`

byte VisiMath.ColorByte.G

Green channel.

ColorByte VisiMath.ColorByte.Green = new ColorByte(0, 255, 0)`[static]`

byte VisiMath.ColorByte.R

Red channel.

ColorByte VisiMath.ColorByte.Red = new ColorByte(255, 0, 0)`[static]`

ColorByte VisiMath.ColorByte.White = new ColorByte(255, 255, 255)`[static]`

The documentation for this struct was generated from the following file:

- Colors.cs

All Classes Namespaces Files Functions Variables Enumerations Properties Events