• Skip to content
  • Skip to link menu
KDE 3.5 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

kviewshell

GPixel Struct Reference

Color pixel as a RGB triple. More...

#include <GPixmap.h>

List of all members.


Public Attributes

unsigned char b
unsigned char g
unsigned char r

Static Public Attributes

Predefined colors.
static const GPixel BLACK = { 0, 0, 0 }
static const GPixel BLUE = { 255, 0, 0 }
static const GPixel GREEN = { 0, 255, 0 }
static const GPixel RED = { 0, 0, 255 }
static const GPixel WHITE = { 255, 255, 255 }

Friends

unsigned int hash (const GPixel &p)
int operator!= (const GPixel &p1, const GPixel &p2)
int operator== (const GPixel &p1, const GPixel &p2)

Detailed Description

Color pixel as a RGB triple.

The colors are represented using three bytes named r#, g# and b#. The value of these bytes represent additive amounts of light. Color white is represented by setting all three bytes to #255#. Color black is represented by setting all three bytes to #0#. This convention should not be confused with the convention adopted for class {GBitmap} where the pixel values represent an ink level.

Definition at line 109 of file GPixmap.h.


Friends And Related Function Documentation

unsigned int hash ( const GPixel &  p  )  [friend]

Returns a hash code for the color.

Definition at line 451 of file GPixmap.h.

int operator!= ( const GPixel &  p1,
const GPixel &  p2 
) [friend]

Returns true iff colors are different.

Definition at line 445 of file GPixmap.h.

int operator== ( const GPixel &  p1,
const GPixel &  p2 
) [friend]

Returns true iff colors are identical.

Definition at line 439 of file GPixmap.h.


Member Data Documentation

unsigned char GPixel::b

Blue component.

Definition at line 112 of file GPixmap.h.

const GPixel GPixel::BLACK = { 0, 0, 0 } [static]

GPixel::BLACK is initialized to rgb:0/0/0#.

Definition at line 128 of file GPixmap.h.

const GPixel GPixel::BLUE = { 255, 0, 0 } [static]

GPixel::BLUE is initialized to rgb:0/0/255#.

Definition at line 130 of file GPixmap.h.

unsigned char GPixel::g

Green component.

Definition at line 114 of file GPixmap.h.

const GPixel GPixel::GREEN = { 0, 255, 0 } [static]

GPixel::GREEN is initialized to rgb:0/255/0#.

Definition at line 132 of file GPixmap.h.

unsigned char GPixel::r

Red component.

Definition at line 116 of file GPixmap.h.

const GPixel GPixel::RED = { 0, 0, 255 } [static]

GPixel::RED is initialized to rgb:255/0/0#.

Definition at line 134 of file GPixmap.h.

const GPixel GPixel::WHITE = { 255, 255, 255 } [static]

GPixel::WHITE is initialized to rgb:255/255/255#.

Definition at line 126 of file GPixmap.h.


The documentation for this struct was generated from the following files:
  • GPixmap.h
  • GPixmap.cpp

kviewshell

Skip menu "kviewshell"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members

API Reference

Skip menu "API Reference"
  • kviewshell
Generated for API Reference by doxygen 1.5.9
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal