C
Qul::PlatformInterface::Rgba32 Struct
struct Qul::PlatformInterface::Rgba32Rgba32クラスは、RGBAカラーの記憶領域を提供します。詳細...
| Header: | #include <Platforminterface/rgba32.h> |
| Since: | Qt Quick Ultralite (Platform) 1.5 |
パブリック関数
| Rgba32(uint32_t value = 0) | |
| Rgba32(float r, float g, float b, float a = 1.f) | |
| Rgba32(uint32_t r, uint32_t g, uint32_t b, uint32_t a = 255u) | |
| uint32_t | alpha() const |
| uint32_t | blue() const |
| uint32_t | green() const |
| bool | invisible() const |
| Qul::PlatformInterface::Rgba32 | premultiplied() const |
| uint32_t | red() const |
| void | setAlpha(uint32_t value) |
| void | setBlue(uint32_t value) |
| void | setGreen(uint32_t value) |
| void | setRed(uint32_t value) |
関連する非メンバー
| bool | operator!=(const Qul::PlatformInterface::Rgba32 &a, const Qul::PlatformInterface::Rgba32 &b) |
| bool | operator==(const Qul::PlatformInterface::Rgba32 &a, const Qul::PlatformInterface::Rgba32 &b) |
詳細な説明
色は通常、RGBA(赤、緑、青、アルファ)成分で指定します。Rgba32コンストラクタは、RGBA値に基づいて色を作成します。RGBA値の格納形式は0xAARRGGBBです。色成分は、red()/setRed()、blue()/setBlue()、green()/setGreen()、alpha()/setAlpha()で個別に取得・設定できる。
メンバー関数ドキュメント
Rgba32::Rgba32(uint32_t value = 0)
value から Rgba32 オブジェクトを構築する。 このクラスはvalue が 0xAARRGGBB フォーマットであると仮定する。value のデフォルト値は 0。
setRed()、setGreen()、setBlue()、setAlpha()も参照 。
[explicit] Rgba32::Rgba32(float r, float g, float b, float a = 1.f)
個々の色成分r g b およびa から Rgba32 オブジェクトを構築する。アルフ ァ チ ャ ン ネル のデフ ォ ル ト 値は 1.0 で、 完全に不透明です。
与えられた個々の色成分の値は、0.0-1.0の範囲でなければなりません。値が範囲外の と き は、 変換後の整数値は範囲 0 ~ 255 にクランプ さ れます。負の値は正の値に変換されます。
setRed(),setGreen(),setBlue(),setAlpha()も参照 。
[explicit] Rgba32::Rgba32(uint32_t r, uint32_t g, uint32_t b, uint32_t a = 255u)
個々の色成分r g b a から Rgba32 オブジェクトを構築します。アルフ ァ チ ャ ン ネル のデフ ォ ル ト 値は 255 であ り 、 完全に不透明です。
与えられたコンポーネント値の下位 8 ビットのみが使用されます。
setRed()、setGreen()、setBlue() およびsetAlpha()も参照 。
uint32_t Rgba32::alpha() const
現在の色値のアルファ成分を返します。
setAlpha()、green()、blue() およびred()も参照 。
uint32_t Rgba32::blue() const
現在の色値の青成分を返します。
setBlue()、green()、red() およびalpha()も参照 。
uint32_t Rgba32::green() const
現在の色値の緑成分を返します。
setGreen(),red(),blue(),alpha()も参照 。
bool Rgba32::invisible() const
色が不可視、すなわちアルファ成分の値が0の場合、true を返す。
Qul::PlatformInterface::Rgba32 Rgba32::premultiplied() const
現在のRgba32を事前乗算されたRgba32に変換する。
uint32_t Rgba32::red() const
現在の色値の赤成分を返します。
setRed()、green()、blue() およびalpha()も参照 。
void Rgba32::setAlpha(uint32_t value)
現在の色値のアルファ成分を設定する。value の下位 8 ビットのみが使用される。
alpha(),setGreen(),setBlue(),setRed()も参照 。
void Rgba32::setBlue(uint32_t value)
現在の色値の青成分を設定する。value の下位 8 ビットのみが使用される。
blue(),setGreen(),setRed(),setAlpha()も参照 。
void Rgba32::setGreen(uint32_t value)
現在の色値の緑成分を設定する。value の下位 8 ビットのみが使用される。
green(),setRed(),setBlue(),setAlpha()も参照 。
void Rgba32::setRed(uint32_t value)
現在の色値の赤成分を設定する。value の下位 8 ビットのみが使用される。
関連する非会員
bool operator!=(const Qul::PlatformInterface::Rgba32 &a, const Qul::PlatformInterface::Rgba32 &b)
a とb の引数が等しくない場合、true を返す。
bool operator==(const Qul::PlatformInterface::Rgba32 &a, const Qul::PlatformInterface::Rgba32 &b)
a とb の引数が等しい場合、true を返します。