GraceFt v2.3
开源图形引擎 EGE(Easy Graphics Engine) 的高层封装库
 
载入中...
搜索中...
未找到
GFt::PenSet类 参考

画笔设置类 更多...

#include <PenSet.h>

Public 成员函数

 PenSet (const Color &color, int width=1)
 构造函数
 
 PenSet (const PenSet &other)
 复制构造
 
 PenSet (PenSet &&other)
 移动构造
 
 ~PenSet ()
 
CapStyle getCapStyle () const
 获取线帽样式
 
Color getColor () const
 获取颜色
 
CapStyle getEndCap () const
 获取终止线帽样式
 
JoinStyle getJoinStyle () const
 获取接点样式
 
LineStyle getPenStyle () const
 获取线型
 
int getPenWidth () const
 获取线宽
 
CapStyle getStartCap () const
 获取起始线帽样式
 
short getUserPenStyle () const
 获取用户自定义线型
 
PenSetoperator= (const PenSet &other)
 复制赋值
 
PenSetoperator= (PenSet &&other)
 移动赋值
 
void setCapStyle (CapStyle style)
 设置线帽样式
 
void setColor (const Color &color)
 设置颜色
 
void setEndCap (CapStyle style)
 设置终止线帽样式
 
void setJoinStyle (JoinStyle style, float limit=10.0f)
 设置接点样式
 
void setLineStyle (LineStyle style)
 设置线型
 
void setLineStyle (short style)
 设置用户自定义线型
 
void setLineWidth (int width)
 设置线宽
 
void setStartCap (CapStyle style)
 设置起始线帽样式
 

友元

class Graphics
 

详细描述

画笔设置类

用于设置画笔的各种属性,如线宽、线型、线帽、接点等。

构造及析构函数说明

◆ PenSet() [1/3]

GFt::PenSet::PenSet ( const Color & color,
int width = 1 )

构造函数

参数
color画笔颜色
width画笔宽度,默认为1

◆ PenSet() [2/3]

GFt::PenSet::PenSet ( const PenSet & other)

复制构造

◆ PenSet() [3/3]

GFt::PenSet::PenSet ( PenSet && other)

移动构造

◆ ~PenSet()

GFt::PenSet::~PenSet ( )

成员函数说明

◆ getCapStyle()

CapStyle GFt::PenSet::getCapStyle ( ) const

获取线帽样式

返回
线帽样式

此函数只会返回起始线帽的样式, 若两端线帽不同, 则应该分别调用 getStartCap()getEndCap()

◆ getColor()

Color GFt::PenSet::getColor ( ) const

获取颜色

返回
颜色

◆ getEndCap()

CapStyle GFt::PenSet::getEndCap ( ) const

获取终止线帽样式

返回
终止线帽样式

◆ getJoinStyle()

JoinStyle GFt::PenSet::getJoinStyle ( ) const

获取接点样式

返回
接点样式

◆ getPenStyle()

LineStyle GFt::PenSet::getPenStyle ( ) const

获取线型

返回
线型

◆ getPenWidth()

int GFt::PenSet::getPenWidth ( ) const

获取线宽

返回
线宽

◆ getStartCap()

CapStyle GFt::PenSet::getStartCap ( ) const

获取起始线帽样式

返回
起始线帽样式

◆ getUserPenStyle()

short GFt::PenSet::getUserPenStyle ( ) const

获取用户自定义线型

返回
用户自定义线型

此函数仅在线型为 LineStyle::UserDefined 时有效, 否则返回 0

◆ operator=() [1/2]

PenSet & GFt::PenSet::operator= ( const PenSet & other)

复制赋值

◆ operator=() [2/2]

PenSet & GFt::PenSet::operator= ( PenSet && other)

移动赋值

◆ setCapStyle()

void GFt::PenSet::setCapStyle ( CapStyle style)

设置线帽样式

参数
style线帽样式

◆ setColor()

void GFt::PenSet::setColor ( const Color & color)

设置颜色

参数
color颜色

◆ setEndCap()

void GFt::PenSet::setEndCap ( CapStyle style)

设置终止线帽样式

参数
style终止线帽样式

◆ setJoinStyle()

void GFt::PenSet::setJoinStyle ( JoinStyle style,
float limit = 10.0f )

设置接点样式

参数
style接点样式
limit接点尖角长度限制值,默认为10.0f

◆ setLineStyle() [1/2]

void GFt::PenSet::setLineStyle ( LineStyle style)

设置线型

参数
style线型

此函数指定 LineStyle::UserDefined 是无效的

◆ setLineStyle() [2/2]

void GFt::PenSet::setLineStyle ( short style)

设置用户自定义线型

参数
style用户自定义线型

调用此函数时, 会自动设置 LineStyle::UserDefined

◆ setLineWidth()

void GFt::PenSet::setLineWidth ( int width)

设置线宽

参数
width线宽

◆ setStartCap()

void GFt::PenSet::setStartCap ( CapStyle style)

设置起始线帽样式

参数
style起始线帽样式

友元及相关符号说明

◆ Graphics

friend class Graphics
friend