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

多个状态得图像,分布在相同的图片文件中 更多...

类 BUI::GImageIconSingle 继承关系图:

Public 成员函数

 GImageIconSingle ()
 ~GImageIconSingle ()
void SetFrames (UINT count)
void SetHorzLayout (BOOL is_horz)
void SetImage (GImage *img)
void SetStateIndex (UINT normal, UINT hot, UINT down, UINT disable)
GImageGetImage () const
BOOL IsEmpty () override
 判断是否为空
void ExtentSize (SIZE &sz, UINT paint_status, BOOL is_pixel_format=FALSE) override
 获得图像在状态(paint_status)下的尺寸
void ShellImageAttribute (const BeString &str_name, const BeString &str_value) override
 通过文本设置属性
void DoPaintImageEffect (ISurface *surface, UINT paint_status, int x, int y, GPathStorage *path, PathConvType conv, Transform2d *img_mtx, GrayConv gray_type, UINT effect_type, float *param, int param_len) override
 绘制位图到路径区域,带有滤镜效果
void DoPaintImage (ISurface *surface, UINT paint_status, int x, int y, GPathStorage *path, PathConvType conv, Transform2d *img_mtx=NULL, GrayConv gray_type=GrayNone) override
 绘制位图到路径区域
void DoPaintImageRect (ISurface *surface, UINT paint_status, const RECT &rect, double scale_x=1.0, double scale_y=1.0) override
 绘制位图到矩形区域
void DoPaintImageTextureRatioStyle (ISurface *surface, UINT paint_status, const RECT &rc_box, ImageRatioStyle ratio_type=none_style, double angle=0, double scale=1.0) override
 绘制位图到矩形区域
void DoPaintImageTextureEllipse (ISurface *surface, UINT paint_status, int x, int y, int rx, int ry, double angle=0, double scale=1.0) override
 绘制位图到椭圆区域
Public 成员函数 继承自 BUI::GImageIconInfo
 GImageIconInfo ()
virtual ~GImageIconInfo ()

Protected 属性

GImagem_image
BOOL m_is_horz
UINT m_frame_count
UINT m_state_index [UIS_COUNT]

详细描述

多个状态得图像,分布在相同的图片文件中

构造及析构函数说明

◆ GImageIconSingle()

BUI::GImageIconSingle::GImageIconSingle ( )

◆ ~GImageIconSingle()

BUI::GImageIconSingle::~GImageIconSingle ( )

成员函数说明

◆ DoPaintImage()

void BUI::GImageIconSingle::DoPaintImage ( ISurface * surface,
UINT paint_status,
int x,
int y,
GPathStorage * path,
PathConvType conv,
Transform2d * img_mtx = NULL,
GrayConv gray_type = GrayNone )
overridevirtual

绘制位图到路径区域

参数
surface:绘图引擎
paint_status:状态值。参考枚举ShowStatus
x: 目标位置X偏移
y: 目标位置Y偏移
path目标路径。比如矩形,椭圆,以及其他不规则闭合路径
conv路径转换类型。线条,曲线,贝塞尔等
img_mtx变换矩阵
gray_type灰度类型

实现了 BUI::GImageIconInfo.

◆ DoPaintImageEffect()

void BUI::GImageIconSingle::DoPaintImageEffect ( ISurface * surface,
UINT paint_status,
int x,
int y,
GPathStorage * path,
PathConvType conv,
Transform2d * img_mtx,
GrayConv gray_type,
UINT effect_type,
float * param,
int param_len )
overridevirtual

绘制位图到路径区域,带有滤镜效果

参数
surface:绘图引擎
paint_status:状态值。参考枚举ShowStatus
x: 目标位置X偏移
y: 目标位置Y偏移
path目标路径。比如矩形,椭圆,以及其他不规则闭合路径
conv路径转换类型。线条,曲线,贝塞尔等
img_mtx变换矩阵
gray_type灰度类型

实现了 BUI::GImageIconInfo.

◆ DoPaintImageRect()

void BUI::GImageIconSingle::DoPaintImageRect ( ISurface * surface,
UINT paint_status,
const RECT & rect,
double scale_x = 1.0,
double scale_y = 1.0 )
overridevirtual

绘制位图到矩形区域

参数
surface:绘图引擎
paint_status:状态值。参考枚举ShowStatus
rect:目标矩形区域
scale_x: X方向缩放比例
scale_y: Y方向缩放比例

实现了 BUI::GImageIconInfo.

◆ DoPaintImageTextureEllipse()

void BUI::GImageIconSingle::DoPaintImageTextureEllipse ( ISurface * surface,
UINT paint_status,
int x,
int y,
int rx,
int ry,
double angle = 0,
double scalex = 1.0 )
overridevirtual

绘制位图到椭圆区域

参数
surface: 绘图引擎
paint_status: 状态值。参考枚举ShowStatus
x: 椭圆中心X
y: 椭圆中心Y
rx: 椭圆水平半径
ry: 椭圆垂直半径
angle: 旋转弧度
scalex: x和y等比缩放值

实现了 BUI::GImageIconInfo.

◆ DoPaintImageTextureRatioStyle()

void BUI::GImageIconSingle::DoPaintImageTextureRatioStyle ( ISurface * surface,
UINT paint_status,
const RECT & rc_box,
ImageRatioStyle ratio_type = none_style,
double angle = 0,
double scale = 1.0 )
overridevirtual

绘制位图到矩形区域

参数
surface: 绘图引擎
paint_status:状态值。参考枚举ShowStatus
rc_box:目标矩形区域
ratio_type: 缩放模式
angle: 旋转弧度
scale: x和y等比缩放值

实现了 BUI::GImageIconInfo.

◆ ExtentSize()

void BUI::GImageIconSingle::ExtentSize ( SIZE & sz,
UINT paint_status,
BOOL is_pixel_format = FALSE )
overridevirtual

获得图像在状态(paint_status)下的尺寸

参数
sz: 引用类型,用于接收返回尺寸
paint_status: 状态值。参考枚举ShowStatus
is_pixel_format: 若isPixelFormat=FALSE,表示会自动适应系统缩放

实现了 BUI::GImageIconInfo.

◆ GetImage()

GImage * BUI::GImageIconSingle::GetImage ( ) const

◆ IsEmpty()

BOOL BUI::GImageIconSingle::IsEmpty ( )
overridevirtual

判断是否为空

返回
BOOL: 若返回TRUE,表示无效对象;若返回FALSE,表示有效

实现了 BUI::GImageIconInfo.

◆ SetFrames()

void BUI::GImageIconSingle::SetFrames ( UINT count)

◆ SetHorzLayout()

void BUI::GImageIconSingle::SetHorzLayout ( BOOL is_horz)

◆ SetImage()

void BUI::GImageIconSingle::SetImage ( GImage * img)

◆ SetStateIndex()

void BUI::GImageIconSingle::SetStateIndex ( UINT normal,
UINT hot,
UINT down,
UINT disable )

◆ ShellImageAttribute()

void BUI::GImageIconSingle::ShellImageAttribute ( const BeString & str_name,
const BeString & str_value )
overridevirtual

通过文本设置属性

参数
str_name:键
str_value:键值

实现了 BUI::GImageIconInfo.

类成员变量说明

◆ m_frame_count

UINT BUI::GImageIconSingle::m_frame_count
protected

◆ m_image

GImage* BUI::GImageIconSingle::m_image
protected

◆ m_is_horz

BOOL BUI::GImageIconSingle::m_is_horz
protected

◆ m_state_index

UINT BUI::GImageIconSingle::m_state_index[UIS_COUNT]
protected
鄂公网安备42018502007752 鄂ICP备2024082886
Copyright © 2026 · CBlueStudio 版权所有