CBlueUI  
C++ 跨平台跨框架的数据可视化工具
载入中...
搜索中...
未找到
GColor类 参考

包含rgba分量的颜色 更多...

Public 成员函数

 GColor ()
 GColor (ULONG color)
 GColor (ULONG color, UINT8 alpha)
 GColor (UINT8 ir, UINT8 ig, UINT8 ib, UINT8 ia=255)
 GColor (const GColor &other, float p=1.0)
 ~GColor ()
const GColoroperator= (const GColor &other)
bool operator== (const GColor &other) const
bool operator!= (const GColor &other) const
GColor ToAlphaSoild (int a)
 转换透明度到实色
GColor ToGray ()
 转换为灰度值
COLORREF ToDWORD () const
 打包为占4字节的整数
GColor ToComplementaryColor () const
 互补色
GColor DistanceColorWithHSV (float dh, float ds=0.0, float dv=0.0) const
 邻近色
void ToHsvColor (float &h, float &s, float &v)
 转换颜色为HSV顺序
GColor PreMultiplyAlpha (float alpha) const
 预乘透明通道

Public 属性

UINT8 r
UINT8 g
UINT8 b
UINT8 a

详细描述

包含rgba分量的颜色

构造及析构函数说明

◆ GColor() [1/5]

GColor::GColor ( )

◆ GColor() [2/5]

GColor::GColor ( ULONG color)

◆ GColor() [3/5]

GColor::GColor ( ULONG color,
UINT8 alpha )

◆ GColor() [4/5]

GColor::GColor ( UINT8 ir,
UINT8 ig,
UINT8 ib,
UINT8 ia = 255 )

◆ GColor() [5/5]

GColor::GColor ( const GColor & other,
float p = 1.0 )

◆ ~GColor()

GColor::~GColor ( )

成员函数说明

◆ DistanceColorWithHSV()

GColor GColor::DistanceColorWithHSV ( float dh,
float ds = 0.0,
float dv = 0.0 ) const

邻近色

◆ operator!=()

bool GColor::operator!= ( const GColor & other) const

◆ operator=()

const GColor & GColor::operator= ( const GColor & other)

◆ operator==()

bool GColor::operator== ( const GColor & other) const

◆ PreMultiplyAlpha()

GColor GColor::PreMultiplyAlpha ( float alpha) const

预乘透明通道

◆ ToAlphaSoild()

GColor GColor::ToAlphaSoild ( int a)

转换透明度到实色

参数
a: 透明度[0-255],0代表全透明
返回
GColor&

◆ ToComplementaryColor()

GColor GColor::ToComplementaryColor ( ) const

互补色

◆ ToDWORD()

COLORREF GColor::ToDWORD ( ) const

打包为占4字节的整数

◆ ToGray()

GColor GColor::ToGray ( )

转换为灰度值

◆ ToHsvColor()

void GColor::ToHsvColor ( float & h,
float & s,
float & v )

转换颜色为HSV顺序

类成员变量说明

◆ a

UINT8 GColor::a

◆ b

UINT8 GColor::b

◆ g

UINT8 GColor::g

◆ r

UINT8 GColor::r
鄂公网安备42018502007752 鄂ICP备2024082886
Copyright © 2026 · CBlueStudio 版权所有