SDXFrameWork 0.09 SDXFrameWork

- Main Page
- Related Pages
- Classes

- Class List
- Class Hierarchy
- Class Members

All Classes Namespaces Functions Variables Enumerations Enumerator Pages
Public Member Functions | Static Public Attributes | List of all members
SDX::Color Class Reference

色を表すクラス. More...

`#include <Color.h>`

## Public Member Functions
| Color (int 赤, int 緑, int 青, int 透過率=255)
| RGB値から色に変換. More...
void | SetColor (int 赤, int 緑, int 青, int 透過率=255)
int | GetRed () const
| 赤の要素を取得. More...
int | GetGreen () const
| 緑の要素を取得. More...
int | GetBlue () const
| 青の要素を取得. More...
int | GetAlpha () const
| 透明度を取得. More...
| operator ColorData ()
bool | operator== (Color 比較色)

## Static Public Attributes
static const Color | Black
static const Color | Dilver
static const Color | Gray
static const Color | White
static const Color | Maroon
static const Color | Red
static const Color | Purple
static const Color | Fuchsia
static const Color | Green
static const Color | Lime
static const Color | Olive
static const Color | Yellow
static const Color | Navy
static const Color | Blue
static const Color | Teal
static const Color | Aqua

## Detailed Description

色を表すクラス.

//©SDXFramework http://sourceforge.jp/projects/dxframework/
bool SampleColor()
{
using namespace SDX;
System::Initialise("sample", 600, 400);
while (System::Update())
{
//赤い線を描画、普通に指定する
Drawing::Line({10, 10}, {200, 10} , Color(255,0,0), 3);
//緑の四角を描画、省略してみる
Drawing::Rect({10, 100, 200, 200}, { 0, 255, 0 }, true);
//青い●を描画、定数を使う
Drawing::Circle({ 110, 300, 50 }, Color::Blue, true);
if (Input::key.Return.on) break;//Enterで終了
}
System::End();
return true;
}

## Constructor & Destructor Documentation

SDX::Color::Color | ( | int | 赤,
|  | int | 緑,
|  | int | 青,
|  | int | 透過率 = `255`
| ) |  |

RGB値から色に変換.

赤、緑、青の各要素は0～255で指定する

## Member Function Documentation

int SDX::Color::GetRed | ( |  | ) | const

赤の要素を取得.

int SDX::Color::GetGreen | ( |  | ) | const

緑の要素を取得.

int SDX::Color::GetBlue | ( |  | ) | const

青の要素を取得.

int SDX::Color::GetAlpha | ( |  | ) | const

透明度を取得.