Contents Up Previous Next 原文へのリンク

wxColour

色は、赤、緑、青(RGB)の強さの結合を表現するオブジェクトである。 そして、描画色を決定するのに使われる。 新しい色を作るかわりに、名前付けされた色が定義されているので、 wxColourDatabase を見なさい。

有効なRGB値は、0 から 255 の範囲です。

A colour is an object representing a combination of Red, Green, and Blue (RGB) intensity values, and is used to determine drawing colours. See the entry for wxColourDatabase for how a pointer to a predefined, named colour may be returned instead of creating a new colour.

Valid RGB values are in the range 0 to 255.

Derived from

wxObject

Include files

<wx/colour.h>

Predefined objects

Objects:

wxNullColour

Pointers:

wxBLACK
wxWHITE
wxRED
wxBLUE
wxGREEN
wxCYAN
wxLIGHT_GREY

See also

wxColourDatabase, wxPen, wxBrush, wxColourDialog

Members

wxColour::wxColour
wxColour::Blue
wxColour::GetPixel
wxColour::Green
wxColour::Ok
wxColour::Red
wxColour::Set
wxColour::operator =
wxColour::operator ==
wxColour::operator !=


wxColour::wxColour

wxColour()

デフォルトコンストラクタ
Default constructor.

wxColour(const unsigned char red, const unsigned char green, const unsigned char blue)

赤、緑、青の値から色を構築する
Constructs a colour from red, green and blue values.

wxColour(const wxString& colourNname)

wxTheColourDatabase の一覧にあるカラーネームで、カラーオブジェクトを構築する
Constructs a colour object using a colour name listed in wxTheColourDatabase.

wxColour(const wxColour& colour)

コピーコンストラクタ
Copy constructor.

Parameters

red

green

blue

colourName

colour

See also

wxColourDatabase

wxPython note: wxPython は以下によってコンストラクタをサポートしている

wxPython note: Constructors supported by wxPython are:


wxColour::Blue

unsigned char Blue() const

青の強さを返す
Returns the blue intensity.


wxColour::GetPixel

long GetPixel() const

プラットフォームに依存したピクセル値を返す。 Windowsでは、COLORREFが返される。 Xでは、割当てられたピクセル値が返される

ピクセルが無効(Xで、割当てられない)なら -1 が返される。

Returns a pixel value which is platform-dependent. On Windows, a COLORREF is returned. On X, an allocated pixel value is returned.

-1 is returned if the pixel is invalid (on X, unallocated).


wxColour::Green

unsigned char Green() const

緑の強さを返す
Returns the green intensity.


wxColour::Ok

bool Ok() const

カラーオブジェクトが有効(色が、RGB値によって初期化されている)なら TRUE を返す。
Returns TRUE if the colour object is valid (the colour has been initialised with RGB values).


wxColour::Red

unsigned char Red() const

赤の強さを返す
Returns the red intensity.


wxColour::Set

void Set(const unsigned char red, const unsigned char green, const unsigned char blue)

RGB値をセットする
Sets the RGB intensity values.


wxColour::operator =

wxColour& operator =(const wxColour& colour)

別のカラーオブジェクトをとる、代入演算子
Assignment operator, taking another colour object.

wxColour& operator =(const wxString& colourName)

colour database で発見されるカラーネームを使う、代入演算子
Assignment operator, using a colour name to be found in the colour database.

See also

wxColourDatabase


wxColour::operator ==

bool operator ==(const wxColour& colour)

個々の赤、緑、青の色を比較することによって、二つの色が等しいことをテストする
Tests the equality of two colours by comparing individual red, green blue colours.


wxColour::operator !=

bool operator !=(const wxColour& colour)

個々の赤、緑、青の色を比較することによって、二つの色が等しくないことをテストする
Tests the inequality of two colours by comparing individual red, green blue colours.