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

CDesktop Class Reference

Provides a set of basic drawing primitives. More...

#include <CDesktop.h>

List of all members.

Public Types

typedef unsigned int TColor

Static Public Member Functions

TColor GetNearestColor (unsigned int aR, unsigned int aG, unsigned int aB)
 Returns the nearest TColor to given RGB values.

void PutPixel (MFrameBuffer &aFrameBuffer, unsigned int aX, unsigned int aY, TColor aColor)
 Puts the pixel with given color to given coordinates.

TColor GetPixel (MFrameBuffer &aFrameBuffer, unsigned int aX, unsigned int aY)
 Reads the pixel value for pixel with given coordinates.

void HLine (MFrameBuffer &aFrameBuffer, unsigned int aXFrom, unsigned int aY, unsigned int aXTo, TColor aColor)
 Draws a horizontal line.

void VLine (MFrameBuffer &aFrameBuffer, unsigned int aX, unsigned int aYFrom, unsigned int aYTo, TColor aColor)
 Draws a vertical line.

void Line (MFrameBuffer &aFrameBuffer, unsigned int aXFrom, unsigned int aYFrom, unsigned int aXTo, unsigned int aYTo, TColor aColor)
 Draws a line.

void Rect (MFrameBuffer &aFrameBuffer, unsigned int aXFrom, unsigned int aYFrom, unsigned int aXTo, unsigned int aYTo, TColor aColor)
 Draws a rectangle.

void RectFill (MFrameBuffer &aFrameBuffer, unsigned int aXFrom, unsigned int aYFrom, unsigned int aXTo, unsigned int aYTo, TColor aColor, unsigned int aRounding)
 Draws a filled rectangle with or without rounded corners.


Static Public Attributes

const TColor ColorBlack
const TColor ColorWhite
const TColor ColorLightGray
const TColor ColorDarkGray
const TColor ColorYellow
const TColor ColorVeryLightBlue
const TColor ColorLightBlue
const TColor ColorCyan
const TColor ColorRed
const TColor ColorGreen
const TColor ColorBrown
const TColor ColorLightGreen
const TColor ColorBlue
const TColor ColorPink
const TColor ColorDarkPink
const TColor ColorOrange


Detailed Description

Provides a set of basic drawing primitives.

The common parameters of all methos are as follows:

The beginning of coordinate system (the (0,0) point) is the top left corner of the screen

Warning:
CDesktop checks whether given coordinates are in valid range. If they are not, the library asserts and the application is terminated


Member Typedef Documentation

typedef unsigned int CDesktop::TColor
 

Color definition


Member Function Documentation

CDesktop::TColor CDesktop::GetNearestColor unsigned int  aR,
unsigned int  aG,
unsigned int  aB
[inline, static]
 

Returns the nearest TColor to given RGB values.

The return value depends from the color depth of the screen of current device.

Warning:
Currently only 16bpp is implemented

void CDesktop::Line MFrameBuffer aFrameBuffer,
unsigned int  aXFrom,
unsigned int  aYFrom,
unsigned int  aXTo,
unsigned int  aYTo,
TColor  aColor
[static]
 

Draws a line.

It's advisory to use HLine() and VLine() for drawing horizontal and vertical lines because they are more efficient

void CDesktop::RectFill MFrameBuffer aFrameBuffer,
unsigned int  aXFrom,
unsigned int  aYFrom,
unsigned int  aXTo,
unsigned int  aYTo,
TColor  aColor,
unsigned int  aRounding
[static]
 

Draws a filled rectangle with or without rounded corners.

Parameters:
aFrameBuffer A reference to a MFrameBuffer to draw on
aXFrom X coordinate to draw the rectangle from
aYFrom Y coordinate to draw the rectangle from
aXTo X coordinate to draw the rectangle to
aYTo Y coordinate to draw the rectangle to
aColor Color to fill the rectangle with
aRounding Defines the radius for rounding corners. Should be in range from 0 (no rounding) to 4


Member Data Documentation

const TColor CDesktop::ColorBlack [static]
 

Standard color definitions


The documentation for this class was generated from the following file:
Generated on Fri Jul 15 16:46:44 2005 for TomTom GO User Interface library by doxygen 1.3.5