Egrome
 
载入中...
搜索中...
未找到
Painter类 参考final

它用于视图绘制 更多...

#include <Painter.h>

类 Painter 继承关系图:
Object

Public 成员函数

 Painter (const Painter &other)=delete
 
Painteroperator= (const Painter &other)=delete
 
 Painter (Painter &&other)=delete
 
Painteroperator= (Painter &&other)=delete
 
void enabbleAntiAliasing (bool enable) noexcept
 是否启用抗锯齿,默认启用
 
void setPenColor (const Color &color) noexcept
 
void setPenWidth (int width) noexcept
 
void setBrushColor (const Color &color) noexcept
 
void setFontFamily (const String &fontName) noexcept
 
void setFontSize (int size) noexcept
 
void setFontWeight (int weight) noexcept
 
void setFontItalic (bool italic) noexcept
 
void setFontUnderline (bool underline) noexcept
 
void setFontStrikeOut (bool strikeOut) noexcept
 
void clear (const Color &color) noexcept
 使用指定颜色清楚当前绘制器所指示的区域
 
Rect rect () const noexcept
 当前绘制器所指示的区域
 
void drawPixel (const Point &pos) noexcept
 
void drawLine (const Point &p1, const Point &p2) noexcept
 
void drawRect (const Rect &rect) noexcept
 
void drawPolygon (const std::vector< Point > &points) noexcept
 
void drawPolyline (const std::vector< Point > &points) noexcept
 
void drawArc (const Rect &rect, float startAngle, float range) noexcept
 
void drawEllipse (const Rect &rect) noexcept
 
void drawCircle (const Point &o, float radius) noexcept
 
void drawPie (const Rect &rect, float startAngle, float range) noexcept
 
void drawBezier (const Point &p1, const Point &c1, const Point &p2, const Point &c2) noexcept
 
void drawFillRect (const Rect &rect) noexcept
 
void drawFillPolygon (const std::vector< Point > &points) noexcept
 
void drawFillEllipse (const Rect &rect) noexcept
 
void drawFillCircle (const Point &o, float radius) noexcept
 
void drawFillPie (const Rect &rect, float startAngle, float range) noexcept
 
void drawText (const Point &pos, const String &text) noexcept
 
void drawText (const Rect &rect, const String &text, TextAligns aligns=TextAlign::Left|TextAlign::Top) noexcept
 
void drawPixmap (const Point &pos, const PixelMap &pixmap, BlendMode mode=BlendMode::S) noexcept
 
void drawPixmap (const Rect &rect, const PixelMap &pixmap, BlendMode mode=BlendMode::S) noexcept
 
- Public 成员函数 继承自 Object
 Object () noexcept
 构造函数
 
virtual ~Object () noexcept
 析构函数
 

友元

class PaintEvent
 
class PixelMap
 
void * getTarget (Painter *painter)
 
Point transfrom (Painter *painter, const Point &pos)
 

详细描述

它用于视图绘制

成员函数说明

◆ clear()

void Painter::clear ( const Color & color)
noexcept

使用指定颜色清楚当前绘制器所指示的区域

参数
color指定颜色

◆ enabbleAntiAliasing()

void Painter::enabbleAntiAliasing ( bool enable)
noexcept

是否启用抗锯齿,默认启用

参数
enabletrue启用,false禁用

◆ rect()

Rect Painter::rect ( ) const
noexcept

当前绘制器所指示的区域

返回
区域

它处于当前指示器的绘制坐标下,左上角为(0, 0),右下角为(width - 1, height - 1)


该类的文档由以下文件生成: