Main Page | Class Hierarchy | Alphabetical List | Compound List | Compound Members

# IRdColorDisp Struct Reference

Inherits IDispatch.

List of all members.

## Public Member Functions
HRESULT | Clear (void)
HRESULT | GetRed ([out, retval] float *pVal)
HRESULT | SetRed ([in] float newVal)
HRESULT | GetGreen ([out, retval] float *pVal)
HRESULT | SetGreen ([in] float newVal)
HRESULT | GetBlue ([out, retval] float *pVal)
HRESULT | SetBlue ([in] float newVal)
HRESULT | GetAlpha ([out, retval] float *pVal)
HRESULT | SetAlpha ([in] float newVal)
HRESULT | GetRed8 ([out, retval] RtBYTE *pVal)
HRESULT | SetRed8 ([in] RtBYTE newVal)
HRESULT | GetGreen8 ([out, retval] RtBYTE *pVal)
HRESULT | SetGreen8 ([in] RtBYTE newVal)
HRESULT | GetBlue8 ([out, retval] RtBYTE *pVal)
HRESULT | SetBlue8 ([in] RtBYTE newVal)
HRESULT | GetAlpha8 ([out, retval] RtBYTE *pVal)
HRESULT | SetAlpha8 ([in] RtBYTE newVal)
HRESULT | SetColor ([in] float fRed,[in] float fGreen,[in] float fBlue,[in] float fAlpha)
HRESULT | GetColor ([out] float *fRed,[out] float *fGreen,[out] float *fBlue,[out] float *fAlpha)
HRESULT | SetColor32 ([in] ULONG dwColor)
HRESULT | GetColor32 ([out, retval] ULONG *pdwColor)
HRESULT | SetColorRGBA8 ([in] RtBYTE nRed,[in] RtBYTE nGreen,[in] RtBYTE nBlue,[in] RtBYTE nAlpha)
HRESULT | SetColorARGB8 ([in] RtBYTE nAlpha,[in] RtBYTE nRed,[in] RtBYTE nGreen,[in] RtBYTE nBlue)
HRESULT | GetColorRGBA8 ([out] RtBYTE *nRed,[out] RtBYTE *nGreen,[out] RtBYTE *nBlue,[out] RtBYTE *nAlpha)
HRESULT | SetColorRGB8 ([in] RtBYTE nRed,[in] RtBYTE nGreen,[in] RtBYTE nBlue)
HRESULT | SetColorArray ([in] FLOAT *pfColors)
HRESULT | GetColorArray ([out, retval] FLOAT *pfColors)
HRESULT | SetCOLORREF ([in] COLORREF dwNewValue)
HRESULT | GetCOLORREF ([out] COLORREF *dwValue)
HRESULT | SetColorHSL ([in] float fHue,[in] float fSat,[in] float fLum)
HRESULT | GetColorHSL ([out] float *fHue,[out] float *fSat,[out] float *fLum)
HRESULT | GetHue ([out, retval] float *pVal)
HRESULT | GetSat ([out, retval] float *pVal)
HRESULT | GetLum ([out, retval] float *pVal)

## Detailed Description

Warning:
  This interface has to be exact clone of IRdColor interface.

IRdColor is used to store colors. It has support for packed 32bit unsigned int value - RGBA in one DWORD and also supports High definition range colors - 4byte floats per one channel.

Floating point color rule is that value 1.0 means full color (just as 255 was for 8bit range) Values greater than 1.0 are allowed to support HDR. Values smaller than 0.0 are allowed too.

Conversion to packed 32bit DWORD clamps all values greater than 1.0 to 255. The storage has format BGRA (8bits per channel, B is in first 8 least significant bits, A is in 8 most significant bits).

## Member Function Documentation

HRESULT IRdColorDisp::Clear | ( | void |  | ) |

| Clear the contents of the color data (set all to zero) Returns: Standard HRESULT processing can be applied to the result.

HRESULT IRdColorDisp::GetRed | ( | [out, retval] float * | pVal | ) |

  | Get Red portion of the color Parameters:
  pVal | is filled with the color channel data.
Returns: Standard HRESULT processing can be applied to the result.

HRESULT IRdColorDisp::SetRed | ( | [in] float | newVal | ) |

  | Set Red portion of the color Parameters:
  newVal | specifies the new color channel data.
Returns: Standard HRESULT processing can be applied to the result.

HRESULT IRdColorDisp::GetGreen | ( | [out, retval] float * | pVal | ) |

  | Get Green portion of the color Parameters:
  pVal | is filled with the color channel data.
Returns: Standard HRESULT processing can be applied to the result.

HRESULT IRdColorDisp::SetGreen | ( | [in] float | newVal | ) |

  | Set Green portion of the color Parameters:
  newVal | specifies the new color channel data.
Returns: Standard HRESULT processing can be applied to the result.

HRESULT IRdColorDisp::GetBlue | ( | [out, retval] float * | pVal | ) |

  | Get Blue portion of the color Parameters:
  pVal | is filled with the color channel data.
Returns: Standard HRESULT processing can be applied to the result.

HRESULT IRdColorDisp::SetBlue | ( | [in] float | newVal | ) |

  | Set Blue portion of the color Parameters:
  newVal | specifies the new color channel data.
Returns: Standard HRESULT processing can be applied to the result.

HRESULT IRdColorDisp::GetAlpha | ( | [out, retval] float * | pVal | ) |

  | Get Alpha portion of the color Parameters:
  pVal | is filled with the color channel data.
Returns: Standard HRESULT processing can be applied to the result.

HRESULT IRdColorDisp::SetAlpha | ( | [in] float | newVal | ) |

  | Set Alpha portion of the color Parameters:
  newVal | specifies the new color channel data.
Returns: Standard HRESULT processing can be applied to the result.

HRESULT IRdColorDisp::GetRed8 | ( | [out, retval] RtBYTE * | pVal | ) |

  | Get Red portion of the color in 8bit unsigned format. Values in range 0.0 to 1.0 are mapped to range 0 to 255. Parameters:
  pVal | is filled with the color channel data.
Returns: Standard HRESULT processing can be applied to the result.

HRESULT IRdColorDisp::SetRed8 | ( | [in] RtBYTE | newVal | ) |

  | Set Red portion of the color in 8bit unsigned format. Values are mapped to range 0.0 to 1.0 Parameters:
  pVal | is filled with the color channel data.
Returns: Standard HRESULT processing can be applied to the result.

HRESULT IRdColorDisp::GetGreen8 | ( | [out, retval] RtBYTE * | pVal | ) |

  | Get Green portion of the color in 8bit unsigned format. Values in range 0.0 to 1.0 are mapped to range 0 to 255. Parameters:
  pVal | is filled with the color channel data.
Returns: Standard HRESULT processing can be applied to the result.

HRESULT IRdColorDisp::SetGreen8 | ( | [in] RtBYTE | newVal | ) |

  | Set Green portion of the color in 8bit unsigned format. Values are mapped to range 0.0 to 1.0 Parameters:
  pVal | is filled with the color channel data.
Returns: Standard HRESULT processing can be applied to the result.

HRESULT IRdColorDisp::GetBlue8 | ( | [out, retval] RtBYTE * | pVal | ) |

  | Get Blue portion of the color in 8bit unsigned format. Values in range 0.0 to 1.0 are mapped to range 0 to 255. Parameters:
  pVal | is filled with the color channel data.
Returns: Standard HRESULT processing can be applied to the result.

HRESULT IRdColorDisp::SetBlue8 | ( | [in] RtBYTE | newVal | ) |

  | Set Blue portion of the color in 8bit unsigned format. Values are mapped to range 0.0 to 1.0 Parameters:
  pVal | is filled with the color channel data.
Returns: Standard HRESULT processing can be applied to the result.

HRESULT IRdColorDisp::GetAlpha8 | ( | [out, retval] RtBYTE * | pVal | ) |

  | Get Alpha portion of the color in 8bit unsigned format. Values in range 0.0 to 1.0 are mapped to range 0 to 255. Parameters:
  pVal | is filled with the color channel data.
Returns: Standard HRESULT processing can be applied to the result.

HRESULT IRdColorDisp::SetAlpha8 | ( | [in] RtBYTE | newVal | ) |

  | Set Alpha portion of the color in 8bit unsigned format. Values are mapped to range 0.0 to 1.0 Parameters:
  pVal | is filled with the color channel data.
Returns: Standard HRESULT processing can be applied to the result.

HRESULT IRdColorDisp::SetColor | ( | [in] float | fRed,
|  | [in] float | fGreen,
|  | [in] float | fBlue,
|  | [in] float | fAlpha
| ) |

  | Set color from four values. Parameters:
  fRed | specifies the red portion.
  fGreen | specifies the green portion.
  fBlue | specifies the blue portion.
  fAlpha | specifies the alpha portion.
Returns: Standard HRESULT processing can be applied to the result.

HRESULT IRdColorDisp::GetColor | ( | [out] float * | fRed,
|  | [out] float * | fGreen,
|  | [out] float * | fBlue,
|  | [out] float * | fAlpha
| ) |

  | Get the color of all four channels. Parameters:
  fRed | is filled with the red portion if not NULL.
  fGreen | is filled with the green portion if not NULL.
  fBlue | is filled with the blue portion if not NULL.
  fAlpha | is filled with the alpha portion if not NULL.
Returns: Standard HRESULT processing can be applied to the result.

HRESULT IRdColorDisp::SetColor32 | ( | [in] ULONG | dwColor | ) |

  | Set color from single DWORD value. The storage format is ARGB (8bits per channel, B is in first 8 least significant bits, A is in 8 most significant bits) i.e. D3DCOLOR type. Parameters:
  dwColor | specifies the color value.
Returns: Standard HRESULT processing can be applied to the result.

HRESULT IRdColorDisp::GetColor32 | ( | [out, retval] ULONG * | pdwColor | ) |

  | Get the color in single DWORD value. Conversion to packed 32bit DWORD clamps all values greater than 1.0 to 255. The storage format is ARGB (8bits per channel, B is in first 8 least significant bits, A is in 8 most significant bits). Parameters:
  pdwColor | is filled with the color value.
Returns: Standard HRESULT processing can be applied to the result.

HRESULT IRdColorDisp::SetColorRGBA8 | ( | [in] RtBYTE | nRed,
|  | [in] RtBYTE | nGreen,
|  | [in] RtBYTE | nBlue,
|  | [in] RtBYTE | nAlpha
| ) |

  | Set color from four 8bit unsigned values. Parameters:
  nRed | specifies the red portion.
  nGreen | specifies the green portion.
  nBlue | specifies the blue portion.
  nAlpha | specifies the alpha portion.
Returns: Standard HRESULT processing can be applied to the result.

HRESULT IRdColorDisp::SetColorARGB8 | ( | [in] RtBYTE | nAlpha,
|  | [in] RtBYTE | nRed,
|  | [in] RtBYTE | nGreen,
|  | [in] RtBYTE | nBlue
| ) |

  | Set color from four 8bit unsigned values. Parameters:
  nAlpha | specifies the alpha portion.
  nRed | specifies the red portion.
  nGreen | specifies the green portion.
  nBlue | specifies the blue portion.
Returns: Standard HRESULT processing can be applied to the result.

HRESULT IRdColorDisp::GetColorRGBA8 | ( | [out] RtBYTE * | nRed,
|  | [out] RtBYTE * | nGreen,
|  | [out] RtBYTE * | nBlue,
|  | [out] RtBYTE * | nAlpha
| ) |

  | Return color in four 8bit unsigned values. Parameters:
  nRed | is filled with the red portion if not NULL.
  nGreen | is filled with the green portion if not NULL.
  nBlue | is filled with the blue portion if not NULL.
  nAlpha | is filled with the alpha portion if not NULL.
Returns: Standard HRESULT processing can be applied to the result.

HRESULT IRdColorDisp::SetColorRGB8 | ( | [in] RtBYTE | nRed,
|  | [in] RtBYTE | nGreen,
|  | [in] RtBYTE | nBlue
| ) |

  | Set color from three 8bit unsigned values. Alpha is set to 1.0 Parameters:
  nRed | specifies the red portion.
  nGreen | specifies the green portion.
  nBlue | specifies the blue portion.
Returns: Standard HRESULT processing can be applied to the result.

HRESULT IRdColorDisp::SetColorArray | ( | [in] FLOAT * | pfColors | ) |

  | Set color from the array of four consecutive floats. Parameters:
  pfColors | specifies the array in sequence R G B A.
Returns: Standard HRESULT processing can be applied to the result.

HRESULT IRdColorDisp::GetColorArray | ( | [out, retval] FLOAT * | pfColors | ) |

  | Return color in from the array of four consecutive floats. Parameters:
  pfColors | is filled with values in sequence R G B A.
Returns: Standard HRESULT processing can be applied to the result.

HRESULT IRdColorDisp::SetCOLORREF | ( | [in] COLORREF | dwNewValue | ) |

  | Set color from an COLORREF value. Parameters:
  dwNewValue | specifies new color value.
Returns: Standard HRESULT processing can be applied to the result.

HRESULT IRdColorDisp::GetCOLORREF | ( | [out] COLORREF * | dwValue | ) |

  | Return color values in an COLORREF value.. Parameters:
  dwValue | is filled with the color value.
Returns: Standard HRESULT processing can be applied to the result.

HRESULT IRdColorDisp::SetColorHSL | ( | [in] float | fHue,
|  | [in] float | fSat,
|  | [in] float | fLum
| ) |

  | Set color values in an HSL format. Parameters:
  fHue | specifies hue.
  fSat | specifies saturation.
  fLum | specifies luminance.
Returns: Standard HRESULT processing can be applied to the result.

HRESULT IRdColorDisp::GetColorHSL | ( | [out] float * | fHue,
|  | [out] float * | fSat,
|  | [out] float * | fLum
| ) |

  | Get color values in an HSL format. Parameters:
  fHue | is filled with the hue.
  fSat | is filled with the saturation.
  fLum | is filled with the luminance.
Returns: Standard HRESULT processing can be applied to the result.

HRESULT IRdColorDisp::GetHue | ( | [out, retval] float * | pVal | ) |

  | Get Hue part from HSL format. Parameters:
  pVal | is filled with the value.
Returns: Standard HRESULT processing can be applied to the result.

HRESULT IRdColorDisp::GetSat | ( | [out, retval] float * | pVal | ) |

  | Get Sat part from HSL format. Parameters:
  pVal | is filled with the value.
Returns: Standard HRESULT processing can be applied to the result.

HRESULT IRdColorDisp::GetLum | ( | [out, retval] float * | pVal | ) |

  | Get Lum part from HSL format. Parameters:
  pVal | is filled with the value.
Returns: Standard HRESULT processing can be applied to the result.