gml_TColor_HLS_FFF Class Reference

#include <gml_HLSColor.h>

Collaboration diagram for gml_TColor_HLS_FFF:

Collaboration graph
[legend]
List of all members.

Detailed Description

A union type used to represent HLS-encoded color pixels. HLS is Metrick's Hue, Lightness, Saturation colorspace.

Some of this code is adapted from section 15.3.5 of "Computer Graphics: Principles and Practice", by J.D. Foley and A. van Dam.


Public Member Functions

 gml_TColor_HLS_FFF (UInt8 const r, UInt8 const g, UInt8 const b)
 Convert a 24-bit RGB triplet into HLS and fill in the object.
 gml_TColor_HLS_FFF (const void *const ptr)
 Fill the structure from data in memory.
 gml_TColor_HLS_FFF ()
 Leave the structure `as is'. I.e. probably zero.
void Print ()
 Dump a representation of the pixel to stdout: channels in hex and in degrees, percent, percent format.
void Store (void *const ptr)
 Place the structure's data in memory.
void Convert (UInt8 &r, UInt8 &g, UInt8 &b)
 Convert the HLS data in this object to a 24 bit RGB triplet.
UInt16 Distance (const gml_TColor_HLS_FFF other)
 Compute the 16-bit distance to another HLS pixel. The euclidian distance in the hue, saturation disc is used.

Public Attributes

struct {
   Float32   H
 < structure for transparent channel access hue channel
   Float32   L
 saturation channel
   Float32   S
 value channel
GML_PACKED

Member Function Documentation

void Print (  )  [inline]

Dump a representation of the pixel to stdout: channels in hex and in degrees, percent, percent format.

Warning:
no newline appended !


The documentation for this class was generated from the following file:
Generated on Tue Jun 12 14:03:28 2007 for gml by Doxygen 1.5.2.