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

KHTML

WebCore::Color

WebCore::Color Class Reference

#include <Color.h>

List of all members.


Public Member Functions

int alpha () const
Color blend (const Color &) const
Color blendWithWhite () const
int blue () const
 Color (const char *)
 Color (const String &)
 Color (int r, int g, int b, int a)
 Color (int r, int g, int b)
 Color (RGBA32 col)
 Color ()
Color dark () const
void getRGBA (double &r, double &g, double &b, double &a) const
void getRGBA (float &r, float &g, float &b, float &a) const
int green () const
bool hasAlpha () const
bool isValid () const
Color light () const
String name () const
int red () const
RGBA32 rgb () const
void setNamedColor (const String &)
void setRGB (RGBA32 rgb)
void setRGB (int r, int g, int b)

Static Public Member Functions

static bool parseHexColor (const String &name, RGBA32 &rgb)

Static Public Attributes

static const RGBA32 black = 0xFF000000
static const RGBA32 darkGray = 0xFF808080
static const RGBA32 gray = 0xFFA0A0A0
static const RGBA32 lightGray = 0xFFC0C0C0
static const RGBA32 transparent = 0x00000000
static const RGBA32 white = 0xFFFFFFFF

Detailed Description

Definition at line 64 of file Color.h.


Constructor & Destructor Documentation

WebCore::Color::Color (  )  [inline]

Definition at line 66 of file Color.h.

WebCore::Color::Color ( RGBA32  col  )  [inline]

Definition at line 67 of file Color.h.

WebCore::Color::Color ( int  r,
int  g,
int  b 
) [inline]

Definition at line 68 of file Color.h.

WebCore::Color::Color ( int  r,
int  g,
int  b,
int  a 
) [inline]

Definition at line 69 of file Color.h.

WebCore::Color::Color ( const String &  name  )  [explicit]

Definition at line 135 of file Color.cpp.

WebCore::Color::Color ( const char *  name  )  [explicit]

Definition at line 143 of file Color.cpp.


Member Function Documentation

int WebCore::Color::alpha (  )  const [inline]

Definition at line 83 of file Color.h.

Color WebCore::Color::blend ( const Color &  source  )  const

Definition at line 245 of file Color.cpp.

Color WebCore::Color::blendWithWhite (  )  const

Definition at line 261 of file Color.cpp.

int WebCore::Color::blue (  )  const [inline]

Definition at line 82 of file Color.h.

Color WebCore::Color::dark (  )  const

Definition at line 212 of file Color.cpp.

void WebCore::Color::getRGBA ( double &  r,
double &  g,
double &  b,
double &  a 
) const

Definition at line 291 of file Color.cpp.

void WebCore::Color::getRGBA ( float &  r,
float &  g,
float &  b,
float &  a 
) const

Definition at line 283 of file Color.cpp.

int WebCore::Color::green (  )  const [inline]

Definition at line 81 of file Color.h.

bool WebCore::Color::hasAlpha (  )  const [inline]

Definition at line 78 of file Color.h.

bool WebCore::Color::isValid (  )  const [inline]

Definition at line 76 of file Color.h.

Color WebCore::Color::light (  )  const

Definition at line 187 of file Color.cpp.

String WebCore::Color::name (  )  const

Definition at line 155 of file Color.cpp.

bool WebCore::Color::parseHexColor ( const String &  name,
RGBA32 &  rgb 
) [static]

Definition at line 103 of file Color.cpp.

int WebCore::Color::red (  )  const [inline]

Definition at line 80 of file Color.h.

RGBA32 WebCore::Color::rgb (  )  const [inline]

Definition at line 85 of file Color.h.

void WebCore::Color::setNamedColor ( const String &  name  ) 

Definition at line 179 of file Color.cpp.

void WebCore::Color::setRGB ( RGBA32  rgb  )  [inline]

Definition at line 87 of file Color.h.

void WebCore::Color::setRGB ( int  r,
int  g,
int  b 
) [inline]

Definition at line 86 of file Color.h.


Member Data Documentation

const RGBA32 WebCore::Color::black = 0xFF000000 [static]

Definition at line 118 of file Color.h.

const RGBA32 WebCore::Color::darkGray = 0xFF808080 [static]

Definition at line 120 of file Color.h.

const RGBA32 WebCore::Color::gray = 0xFFA0A0A0 [static]

Definition at line 121 of file Color.h.

const RGBA32 WebCore::Color::lightGray = 0xFFC0C0C0 [static]

Definition at line 122 of file Color.h.

const RGBA32 WebCore::Color::transparent = 0x00000000 [static]

Definition at line 123 of file Color.h.

const RGBA32 WebCore::Color::white = 0xFFFFFFFF [static]

Definition at line 119 of file Color.h.


The documentation for this class was generated from the following files:
  • Color.h
  • Color.cpp

KHTML

Skip menu "KHTML"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • Kross
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.5.7
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