Webmaster  |  Imprint 
Platinum
Platinum C++ Framework
Main  |  License  |  Documentation  |  Download  |  Support 

Pt::Gfx Namespace Reference

Graphics and Imaging. More...


Classes

struct  ARgb8888
 An empty structure used for tagging packed 32-bit ARGB color class. More...
class  Color< ARgb8888 >
 Packed 32-bit ARGB color class. More...
struct  ARgb
 An empty structure used for tagging 64-bit ARGB color class. More...
class  Color< ARgb >
 64-Bit ARGB color class. More...
struct  ARgbF
 An empty structure used for tagging floated ARGB color class. More...
class  Color< ARgbF >
 Floated ARGB color class. More...
class  Brush
class  BrushData
class  ClipLine
 Line clipper. More...
class  ClipPolygon
 Polygon clipper. More...
class  InvalidFont
class  Font
class  FontMetrics
struct  EqualElements
struct  EqualElements< NEqualMin, NEqualMin, ArrayT >
struct  EqualElements< 0, 0, ArrayT >
struct  NotEqualElements
struct  NotEqualElements< NEqualMin, NEqualMin, ArrayT >
struct  NotEqualElements< 0, 0, ArrayT >
struct  IncrementElements
struct  IncrementElements< NEqualMin, NEqualMin, ArrayT >
struct  IncrementElements< 0, 0, ArrayT >
struct  DecrementElements
struct  DecrementElements< NEqualMin, NEqualMin, ArrayT >
struct  DecrementElements< 0, 0, ArrayT >
struct  AddElements
struct  AddElements< NEqualMin, NEqualMin, ArrayA, ArrayB, ElemT >
struct  AddElements< 0, 0, ArrayA, ArrayB, ElemT >
struct  SubElements
struct  SubElements< NEqualMin, NEqualMin, ArrayT, ElemT >
struct  SubElements< 0, 0, ArrayT, ElemT >
struct  AddAssignElements
struct  AddAssignElements< NEqualMin, NEqualMin, ArrayT, ElemT >
struct  AddAssignElements< 0, 0, ArrayT, ElemT >
struct  AssignElements
struct  AssignElements< NEqualMin, NEqualMin, ArrayA, ArrayB >
struct  AssignElements< 0, 0, ArrayA, ArrayB >
struct  SubAssignElements
struct  SubAssignElements< NEqualMin, NEqualMin, ArrayT, ElemT >
struct  SubAssignElements< 0, 0, ArrayT, ElemT >
class  ImagePainter
 A painter to draw on an ARgbImage. More...
class  InterleavedImage
 Interleaved image class. More...
class  InterleavedImage_PixelIterator
class  InterleavedImage_ConstPixelIterator
class  InterleavedSubImage
 Subimage class. More...
class  InterleavedSubImage_PixelIterator
class  InterleavedSubImage_ConstPixelIterator
class  Painter
 A generic painter interface which provides methods to draw graphical primitives to surfaces. More...
class  Pen
 A pen which contains of attributes (size, color) for the drawing of outlines. More...
class  PenData
class  ARgbConstColorRef
class  ARgbColorRef
class  ARgbColorPtr
class  ARgbConstColorPtr
struct  PlanarARgb
class  PlanarImage
 Planar image class. More...
class  PlanarConstColorRef
class  PlanarColorRef
class  PlanarColorPtr
class  PlanarConstColorPtr
class  PlanarPixelIterator
class  PlanarImageView
 View of planar images. More...
struct  PlanarYuv
 Color model for planar YUV images. More...
class  BasicRect
 A generic Rect class. More...
class  Region
struct  Rgb555
 An empty structure used for tagging packed 15-bit RGB color class. More...
class  Color< Rgb555 >
 Packed 15-bit RGB color class. More...
struct  Rgb565
 An empty structure used for tagging packed 16-bit RGB color class. More...
class  Color< Rgb565 >
 Packed 16-bit RGB color class. More...
struct  Rgb888
 An empty structure used for tagging packed 32-bit RGB color class. More...
class  Color< Rgb888 >
 Packed 32-bit RGB color class. More...
struct  Yuv
class  YuvColor
class  YuvConstColorRef
class  YuvColorRef
class  YuvColorPtr
class  YuvConstColorPtr

Typedefs

typedef Color< ARgb8888ARgb8888Color
 Convenience access to the 32-Bit ARGB color model.
typedef InterleavedImage
< ARgb8888Color
ARgb8888InterleavedImage
 Standard interleaved ARgb8888 image class.
typedef InterleavedSubImage
< ARgb8888InterleavedImage
ARgb8888InterleavedSubImage
 Standard interleaved ARgb8888 subimage class.
typedef ARgb8888InterleavedImage ARgb8888Image
typedef ARgb8888InterleavedSubImage ARgb8888SubImage
typedef Color< ARgbARgbColor
 Convenience access to the 64-Bit ARGB color model.
typedef Color< ARgbFARgbFColor
 Convenience access to the Floated ARGB color model.
typedef InterleavedImage
< ARgbFColor
ARgbFInterleavedImage
 Standard interleaved ARgbF image class.
typedef InterleavedSubImage
< ARgbFInterleavedImage
ARgbFInterleavedSubImage
 Standard interleaved ARgbF subimage class.
typedef ARgbFInterleavedImage ARgbFImage
typedef ARgbFInterleavedSubImage ARgbFSubImage
typedef InterleavedImage
< ARgbColor
ARgbInterleavedImage
 Interleaved ARgb image class.
typedef ARgbInterleavedImage ARgbImage
typedef InterleavedSubImage
< ARgbInterleavedImage
ARgbInterleavedSubImage
 Interleaved ARgb subimage class.
typedef ARgbInterleavedSubImage ARgbSubImage
typedef PlanarImageView
< PlanarARgb, 1, 1 > 
PlanarARgbView
typedef PlanarImage
< PlanarARgbView
PlanarARgbImage
typedef Color< Rgb888Rgb888Color
 Convenience access to the 32-Bit ARGB color model.
typedef Color< Rgb565Rgb565Color
 Convenience access to the 32-Bit ARGB color model.
typedef Color< Rgb555Rgb555Color
 Convenience access to the 32-Bit ARGB color model.
typedef Color< ARgbProxy > ARgbColorProxy
typedef Color< ARgbFProxy > ARgbFColorProxy
typedef Color< ARgb8888Proxy > ARgb8888ColorProxy
typedef Color< Rgb888Proxy > Rgb888ColorProxy
typedef Color< Rgb565Proxy > Rgb565ColorProxy
typedef Color< Rgb555Proxy > Rgb555ColorProxy
typedef InterleavedImage
< Rgb888Color
Rgb888InterleavedImage
 Standard interleaved Rgb888 image class.
typedef InterleavedImage
< Rgb565Color
Rgb565InterleavedImage
 Standard interleaved Rgb565 image class.
typedef InterleavedImage
< Rgb555Color
Rgb555InterleavedImage
 Standard interleaved Rgb555 image class.
typedef InterleavedSubImage
< Rgb888InterleavedImage
Rgb888InterleavedSubImage
 Standard interleaved Rgb888 subimage class.
typedef InterleavedSubImage
< Rgb565InterleavedImage
Rgb565InterleavedSubImage
 Standard interleaved Rgb565 subimage class.
typedef InterleavedSubImage
< Rgb555InterleavedImage
Rgb555InterleavedSubImage
 Standard interleaved Rgb555 subimage class.
typedef PlanarImage
< PlanarImageModel< ARgbProxy, 1, 1 > > 
ARgbPlanarImage
typedef PlanarSubImage
< ARgbPlanarImage
ARgbPlanarSubImage
typedef Rgb888InterleavedImage Rgb888Image
typedef Rgb565InterleavedImage Rgb565Image
typedef Rgb555InterleavedImage Rgb555Image
typedef Rgb888InterleavedSubImage Rgb888SubImage
typedef Rgb565InterleavedSubImage Rgb565SubImage
typedef Rgb555InterleavedSubImage Rgb555SubImage
typedef BasicRect< Pt::ssize_t,
Pt::size_t > 
Rect
typedef BasicRect< double, double > RectF
typedef PlanarImageView
< PlanarYuv, 2, 2 > 
Yv12View
typedef PlanarImage< Yv12ViewYv12Image

Functions

template<typename InIteratorT, typename OutIteratorT, typename OperationT>
OperationT transform (InIteratorT begin, InIteratorT end, OutIteratorT dest, OperationT op)
 Transform one sequence into another.
template<typename IteratorT, typename OperationT>
OperationT transform (IteratorT begin, IteratorT end, OperationT op)
 Transform one sequence into another.
const Color< ARgb > & toARgb (Color< ARgb > &to, const Color< ARgb8888 > &from)
 Convert a Color<ARgb8888> to a Color<ARgb>.
void fromARgb (Color< ARgb8888 > &to, const Color< ARgb > &from)
 Convert a Color<ARgb> to a Color<ARgb8888>.
void assign (Color< ARgb8888 > &to, const Color< ARgb > &from)
 Assign a Color<ARgb> to a Color<ARgb8888>.
void assign (Color< ARgb > &to, const Color< ARgb8888 > &from)
 Assign a Color<ARgb8888> to a Color<ARgb>.
void assign (Color< ARgbF > &to, const Color< ARgb8888 > &from)
 Assign a Color<ARgb8888> to an Color<ARgbF>.
bool operator== (const Color< ARgb8888 > &c1, const Color< ARgb8888 > &c2)
 Equality operator for Color<ARgb8888> comparison.
bool operator< (const Color< ARgb8888 > &c1, const Color< ARgb8888 > &c2)
 Less-than operator for Color<ARgb8888> comparison.
bool operator> (const Color< ARgb8888 > &c1, const Color< ARgb8888 > &c2)
 Greater-than operator for Color<ARgb8888> comparison.
Color< ARgb8888 > & greyscale (Color< ARgb8888 > &to, const Color< ARgb8888 > &from)
 Make the greyscale version of the source Color<ARgb8888> color.
void mixColor (Color< ARgb8888 > &dst, const Color< ARgb8888 > &src, uint8_t factor)
 Mix two Color<ARgb8888>s using the given mixing factor.
const Color< ARgb > & toARgb (Color< ARgb > &to, const Color< ARgb > &from)
 Convert a Color<ARgb> to a Color<ARgb>.
void fromARgb (Color< ARgb > &to, const Color< ARgb > &from)
 Convert a Color<ARgb> to a Color<ARgb>.
bool operator== (const Color< ARgb > &c1, const Color< ARgb > &c2)
 Equality operator for Color<ARgb> comparison.
bool operator< (const Color< ARgb > &c1, const Color< ARgb > &c2)
 Less-than operator for Color<ARgb> comparison.
bool operator> (const Color< ARgb > &c1, const Color< ARgb > &c2)
 Greater-than operator for Color<ARgb> comparison.
Color< ARgb > & greyscale (Color< ARgb > &to, const Color< ARgb > &from)
 Make the greyscale version of the source Color<ARgb>.
void blend (Color< ARgb > &dst, const Color< ARgb > &src, uint16_t factor)
 Mix two Color<ARgb>s using the given mixing factor.
PT_GFX_API void operator>>= (const SerializationInfo &si, Gfx::Color< Pt::Gfx::ARgb > &x)
PT_GFX_API void operator<<= (SerializationInfo &si, const Gfx::Color< Pt::Gfx::ARgb > &x)
const Color< ARgb > & toARgb (Color< ARgb > &to, const Color< ARgbF > &from)
 Convert a Color<ARgbF> to a Color<ARgb>.
void fromARgb (Color< ARgbF > &to, const Color< ARgb > &from)
 Convert a Color<ARgb> to a Color<ARgbF>.
void assign (Color< ARgbF > &to, const Color< ARgb > &from)
 Assign a Color<ARgb> to a Color<ARgbF>.
void assign (Color< ARgb > &to, const Color< ARgbF > &from)
 Assign a Color<RgbF> to a Color<ARgb>.
bool operator== (const Color< ARgbF > &c1, const Color< ARgbF > &c2)
 Equality operator for Color<ARgbF> comparison.
bool operator< (const Color< ARgbF > &c1, const Color< ARgbF > &c2)
 Less-than operator for Color<ARgbF> comparison.
bool operator> (const Color< ARgbF > &c1, const Color< ARgbF > &c2)
 Greater-than operator for Color<ARgbF> comparison.
Color< ARgbF > & greyscale (Color< ARgbF > &to, const Color< ARgbF > &from)
 Make the greyscale version of the source Color<ARgbF> color.
void mixColor (Color< ARgbF > &dst, const Color< ARgbF > &src, float factor)
 Mix two Color<ARgbF>s using the given mixing factor.
PT_GFX_API void operator>>= (const SerializationInfo &si, Gfx::Brush &x)
PT_GFX_API void operator<<= (SerializationInfo &si, const Gfx::Brush &x)
template<typename TagT>
bool operator> (const Color< TagT > &c1, const Color< TagT > &c2)
 Greater-than operator for any color model comparison.
template<typename TagT>
bool operator!= (const Color< TagT > &c1, const Color< TagT > &c2)
 Inequality operator for any color model comparison.
template<typename TagT>
bool operator<= (const Color< TagT > &c1, const Color< TagT > &c2)
 Less-than-or-equal operator for any color model comparison.
template<typename TagT>
bool operator>= (const Color< TagT > &c1, const Color< TagT > &c2)
 Greater-than-or-equal operator for color comparison.
template<typename TagT>
const Color< TagT > & operator+ (const Color< TagT > &c1, const Color< TagT > &c2)
 Addition operator for any color model mathematics (beware of overflow).
template<typename TagT>
const Color< TagT > & operator- (const Color< TagT > &c1, const Color< TagT > &c2)
 Addition operator for any color model mathematics (beware of underflow).
template<typename DstTagT, typename SrcTagT>
void assign (Color< DstTagT > &to, const Color< SrcTagT > &from)
 Assign a color model to another color model.
template<typename TagT>
void assign (Color< TagT > &to, const Color< TagT > &from)
 Partial specialization of assign() if both the color models are the same.
template<typename TagT>
Color< TagT > & greyscale (Color< TagT > &to, const Color< TagT > &from)
 Make the greyscale version of the source color.
template<typename TagT>
Color< TagT > & greyscale (Color< TagT > &c)
 Make the given color become greyscale.
bool operator== (const Font &a, const Font &b)
bool operator< (const Font &a, const Font &b)
PT_GFX_API void operator>>= (const SerializationInfo &si, Gfx::Font &x)
PT_GFX_API void operator<<= (SerializationInfo &si, const Gfx::Font &x)
template<size_t N, size_t Min, typename ArrayT>
bool equalElements (const ArrayT &a, const ArrayT &b)
template<size_t N, size_t Min, typename ArrayT>
bool notEqualElements (const ArrayT &a, const ArrayT &b)
template<size_t N, size_t Min, typename ArrayT>
void incrementElements (ArrayT &array)
template<size_t N, size_t Min, typename ArrayT>
void decrementElements (ArrayT &array)
template<size_t N, size_t Min, typename ArrayA, typename ArrayB, typename ElemT>
void addElements (ArrayA &to, const ArrayB &from, const ElemT &val)
template<size_t N, size_t Min, typename ArrayT, typename ElemT>
void subElements (ArrayT &to, const ArrayT &from, const ElemT &val)
template<size_t N, size_t Min, typename ArrayT, typename ElemT>
void addAssignElements (ArrayT &to, const ElemT &val)
template<size_t N, size_t Min, typename ArrayA, typename ArrayB>
void assignElements (ArrayA &to, const ArrayB &from)
template<size_t N, size_t Min, typename ArrayT, typename ElemT>
void subAssignElements (ArrayT &to, const ElemT &val)
template<typename InputIteratorT, typename OutputIteratorT>
OutputIteratorT assign (InputIteratorT begin, InputIteratorT end, OutputIteratorT to)
 Assign one iterator range to another.
template<typename ColorA, typename ColorB>
void assign (InterleavedImage< ColorA > &to, const InterleavedImage< ColorB > &from)
 Assign an image to another image with a different color model.
template<typename ColorT>
void assign (InterleavedImage< ColorT > &to, const InterleavedImage< ColorT > &from)
 Partial specialization of assign() if both the color models are the same.
template<typename InIteratorT, typename OutIteratorT>
void greyscale (InIteratorT begin, InIteratorT end, OutIteratorT to)
 Greyscale a pixel range using iterators.
template<typename IteratorT>
void greyscale (IteratorT begin, IteratorT end)
 Greyscales an image using its iterators.
template<typename ImageT>
void greyscale (ImageT &image)
 Greyscales an image using its iterators.
template<typename InIteratorT, typename OutIteratorT>
void blockScale (InIteratorT from, uint fromWidth, uint fromHeight, OutIteratorT to, uint toWidth, uint toHeight)
 Block-scale a pixel range.
template<typename InIteratorT, typename OutIteratorT>
void blockScale (InIteratorT from, InIteratorT fromEnd, OutIteratorT to, OutIteratorT toEnd)
 Block-scale a pixel range.
PT_GFX_API void operator>>= (const SerializationInfo &si, Gfx::Pen &p)
PT_GFX_API void operator<<= (SerializationInfo &si, const Gfx::Pen &p)
template<typename ColorPtrT, typename ViewT>
void set (ColorPtrT &color, ViewT &view, size_t xpos, size_t ypos)
template<typename ColorPtrT, typename ViewT>
void increment (ColorPtrT &color, ViewT &view, size_t xpos, size_t ypos)
template<typename ColorPtrT, typename ViewT>
void advance (ColorPtrT &color, size_t n, ViewT &view, size_t xpos, size_t ypos)
const Color< ARgb > & toARgb (Color< ARgb > &to, const Color< Rgb555 > &from)
 Convert a Color<Rgb555> to a Color<ARgb>.
void fromARgb (Color< Rgb555 > &to, const Color< ARgb > &from)
 Convert a Color<ARgb> to a Color<Rgb555>.
void assign (Color< Rgb555 > &to, const Color< ARgb > &from)
 Assign a Color<ARgb> to a Color<Rgb555>.
void assign (Color< ARgb > &to, const Color< Rgb555 > &from)
 Assign a Color<Rgb555> to a Color<ARgb>.
void assign (Color< ARgbF > &to, const Color< Rgb555 > &from)
 Assign a Color<Rgb555> to a Color<ARgbF>.
bool operator== (const Color< Rgb555 > &c1, const Color< Rgb555 > &c2)
 Equality operator for Color<Rgb555> comparison.
bool operator< (const Color< Rgb555 > &c1, const Color< Rgb555 > &c2)
 Less-than operator for Color<Rgb555> comparison.
bool operator> (const Color< Rgb555 > &c1, const Color< Rgb555 > &c2)
 Greater-than operator for Color<Rgb555> comparison.
Color< Rgb555 > & greyscale (Color< Rgb555 > &to, const Color< Rgb555 > &from)
 Make the greyscale version of the source Color<Rgb555> color.
void mixColor (Color< Rgb555 > &dst, const Color< Rgb555 > &src, uint8_t factor)
 Mix two Color<Rgb555>s using the given mixing factor.
const Color< ARgb > & toARgb (Color< ARgb > &to, const Color< Rgb565 > &from)
 Convert a Color<Rgb565> to a Color<ARgb>.
void fromARgb (Color< Rgb565 > &to, const Color< ARgb > &from)
 Convert a Color<ARgb> to a Color<Rgb565>.
void assign (Color< Rgb565 > &to, const Color< ARgb > &from)
 Assign a Color<ARgb> to a Color<Rgb565>.
void assign (Color< ARgb > &to, const Color< Rgb565 > &from)
 Assign a Color<Rgb565> to a Color<ARgb>.
void assign (Color< ARgbF > &to, const Color< Rgb565 > &from)
 Assign an Color<Rgb565> to an Color<ARgbF>.
bool operator== (const Color< Rgb565 > &c1, const Color< Rgb565 > &c2)
 Equality operator for Color<Rgb565> comparison.
bool operator< (const Color< Rgb565 > &c1, const Color< Rgb565 > &c2)
 Less-than operator for Color<Rgb565> comparison.
bool operator> (const Color< Rgb565 > &c1, const Color< Rgb565 > &c2)
 Greater-than operator for Color<Rgb565> comparison.
Color< Rgb565 > & greyscale (Color< Rgb565 > &to, const Color< Rgb565 > &from)
 Make the greyscale version of the source Color<Rgb565> color.
void mixColor (Color< Rgb565 > &dst, const Color< Rgb565 > &src, uint8_t factor)
 Mix two Color<Rgb565>s using the given mixing factor.
const Color< ARgb > & toARgb (Color< ARgb > &to, const Color< Rgb888 > &from)
 Convert a Color<Rgb888> to a Color<ARgb>.
void fromARgb (Color< Rgb888 > &to, const Color< ARgb > &from)
 Convert a Color<ARgb> to a Color<Rgb888>.
void assign (Color< Rgb888 > &to, const Color< ARgb > &from)
 Assign a Color<ARgb> to a Color<Rgb888>.
void assign (Color< ARgb > &to, const Color< Rgb888 > &from)
 Assign a Color<Rgb888> to a Color<ARgb>.
void assign (Color< ARgbF > &to, const Color< Rgb888 > &from)
 Assign an Color<Rgb888> to an Color<ARgbF>.
bool operator== (const Color< Rgb888 > &c1, const Color< Rgb888 > &c2)
 Equality operator for Color<Rgb888> comparison.
bool operator< (const Color< Rgb888 > &c1, const Color< Rgb888 > &c2)
 Less-than operator for Color<Rgb888> comparison.
bool operator> (const Color< Rgb888 > &c1, const Color< Rgb888 > &c2)
 Greater-than operator for Color<Rgb888> comparison.
Color< Rgb888 > & greyscale (Color< Rgb888 > &to, const Color< Rgb888 > &from)
 Make the greyscale version of the source Color<Rgb888> color.
void mixColor (Color< Rgb888 > &dst, const Color< Rgb888 > &src, uint8_t factor)
 Mix two Color<Rgb888>s using the given mixing factor.

Variables

class PT_GFX_API
Pt::Gfx::Color< ARgb8888
PT_PACKED
 Packed 32-bit ARGB color class.


Detailed Description

A 2D painting API is provided that can be implemented to draw on different output targets with an implementation to draw on off-screen images. Image classes support planar and interleaved images and algortihms to manipulate them.

Typedef Documentation

This is the master interleaved image model

This is the master interleaved subimage model


Function Documentation

void Pt::Gfx::assign ( InterleavedImage< ColorT > &  to,
const InterleavedImage< ColorT > &  from 
)

This function will just copy the value from the source to the destiantion.

void Pt::Gfx::assign ( InterleavedImage< ColorA > &  to,
const InterleavedImage< ColorB > &  from 
)

An image classes implementor should specialize this function as needed if faster implementation for the two classes is exist.

void Pt::Gfx::assign ( Color< TagT > &  to,
const Color< TagT > &  from 
)

This function will just copy the value from the source to the destiantion.

void Pt::Gfx::assign ( Color< DstTagT > &  to,
const Color< SrcTagT > &  from 
)

A color models implementor should specialize this function as needed if the faster implementation for the two colors is exist.

void Pt::Gfx::blockScale ( InIteratorT  from,
InIteratorT  fromEnd,
OutIteratorT  to,
OutIteratorT  toEnd 
)

Parameters:
from Begin of the source range
to Begin of the destination range
fromEnd End of the source range
toEnd End of the destination range
This algorithm block-scales the source range [from, fromEnd] to the destination range [to, toEnd].

void Pt::Gfx::blockScale ( InIteratorT  from,
uint  fromWidth,
uint  fromHeight,
OutIteratorT  to,
uint  toWidth,
uint  toHeight 
)

Parameters:
from Begin of the source range
fromWidth Width of the source range
fromHeight Height of the source range
to Begin of the destination range
fromWidth Width of the destination range
fromHeight Height of the destination range
This algorithm block-scales the source range to the destination range (both ranges are specified using an input iterator, width and height).

void Pt::Gfx::fromARgb ( Color< ARgb > &  to,
const Color< ARgb > &  from 
)

This function is implemented just for the sake of completeness.

Color<TagT>& Pt::Gfx::greyscale ( Color< TagT > &  to,
const Color< TagT > &  from 
)

This is a fallback version in case the color model implementor does not implement the specific version of greyscale() for the color model.

A color implementor must not rely on this function since this function will cause some overhead because of the conversion to and from ARgbColor.

bool Pt::Gfx::operator!= ( const Color< TagT > &  c1,
const Color< TagT > &  c2 
)

Note that by default, this function will call operator==().

A color model implementor can implement the full specialization of this function if better performance can be achieved by doing so.

const Color<TagT>& Pt::Gfx::operator+ ( const Color< TagT > &  c1,
const Color< TagT > &  c2 
)

Note that by default, this function will call operator=() and operator+=().

A color model implementor can implement the full specialization of this function if better performance can be achieved by doing so.

const Color<TagT>& Pt::Gfx::operator- ( const Color< TagT > &  c1,
const Color< TagT > &  c2 
)

Note that by default, this function will call operator=() and operator-=().

A color model implementor can implement the full specialization of this function if better performance can be achieved by doing so.

bool Pt::Gfx::operator<= ( const Color< TagT > &  c1,
const Color< TagT > &  c2 
)

Note that by default, this function will call operator==() and operator<().

A color model implementor can implement the full specialization of this function if better performance can be achieved by doing so.

bool Pt::Gfx::operator> ( const Color< TagT > &  c1,
const Color< TagT > &  c2 
)

Note that by default, this function will use operator==() and operator<().

A color model implementor should implement the full specialization of this function for better performance.

bool Pt::Gfx::operator>= ( const Color< TagT > &  c1,
const Color< TagT > &  c2 
)

Note that by default, this function will call operator<().

A color model implementor can implement the full specialization of this function if better performance can be achieved by doing so.

const Color<ARgb>& Pt::Gfx::toARgb ( Color< ARgb > &  to,
const Color< ARgb > &  from 
)

This function is implemented just for the sake of completeness.


Variable Documentation

class PT_GFX_API Pt::Gfx::Color< Rgb888 > PT_PACKED

Packed 32-bit RGB color class.

Packed 16-bit RGB color class.

Packed 15-bit RGB color class.

Floated ARGB color class.

64-Bit ARGB color class.

This class is exist so that the raw memory buffer of an image implementation which use this color model could be casted directly to hardware image buffer with format AAAAAAAARRRRRRRRGGGGGGGGBBBBBBBB.

Valid range of the color components for this color model:
Alpha 0 to 255 (0xFF)
Red 0 to 255 (0xFF)
Green 0 to 255 (0xFF)
Blue 0 to 255 (0xFF)

This is the master color model for Pt::Gfx, since it is used by the Painter interface. Each channel has 16 bit.

This is the temporary color model for Pt::Gfx.

Valid range of the color components for this color model:
Alpha 0.0f to 1.0f
Red 0.0f to 1.0f
Green 0.0f to 1.0f
Blue 0.0f to 1.0f
However, values <0.0f and >1.0f are allowed exist for temporal calculation results.

Complex color algorithms such as cubic-scale, dithering, etc. are suggested to use this color model to minimize rounding error propagation.

This class is exist so that the raw memory buffer of an image implementation which use this color model could be casted directly to hardware image buffer with format XRRRRRGGGGGBBBBB

Valid range of the color components for this color model:
Red 0 to 31 (0x1F)
Green 0 to 31 (0x1F)
Blue 0 to 31 (0x1F)

This class is exist so that the raw memory buffer of an image implementation which use this color model could be casted directly to hardware image buffer with format RRRRRGGGGGGBBBBB

Valid range of the color components for this color model:
Red 0 to 31 (0x1F)
Green 0 to 63 (0x3F)
Blue 0 to 31 (0x1F)

This class is exist so that the raw memory buffer of an image implementation which use this color model could be casted directly to hardware image buffer with format XXXXXXXXRRRRRRRRGGGGGGGGBBBBBBBB.

Valid range of the color components for this color model:
Red 0 to 255 (0xFF)
Green 0 to 255 (0xFF)
Blue 0 to 255 (0xFF)

Copyright © 2003-2007 The Pt Development Team
Pt 1.0