|
TouchVG framework
|
绘图参数上下文类 更多...
#include <gicontxt.h>
Public 类型 | |
| enum | { kSolidLine = 0, kDashLine, kDotLine, kDashDot, kDashDotdot, kNullLine, kCopyNone = 0, kLineRGB = 0x01, kLineAlpha = 0x02, kLineARGB = 0x03, kLineWidth = 0x04, kLineStyle = 0x08, kFillRGB = 0x10, kFillAlpha = 0x20, kFillARGB = 0x30, kLineArrayHead = 0x40, kCopyAll = 0xFF, kLineDashMask = 0xFFF, kArrowNone = 0, kArrowSharpClosed, kArrowSharpLine, kArrowTLine, kArrowSlashLine, kArrowClosedCircle, kArrowOpenedCircle } |
Public 成员函数 | |
| GiContext () | |
| 默认构造函数 更多... | |
| GiContext (float width, GiColor color=GiColor::Black(), int style=kSolidLine, const GiColor &fillcr=GiColor::Invalid(), bool autoScale=false) | |
| 指定线条参数来构造 更多... | |
| GiContext (const GiContext &src) | |
| 拷贝构造函数 更多... | |
| GiContext & | copy (const GiContext &src, int mask=-1) |
| 赋值函数, GiContextBits 按位设置 更多... | |
| bool | equals (const GiContext &src) const |
| 比较相等操作符函数 更多... | |
| GiContext & | operator= (const GiContext &src) |
| 赋值操作符函数 更多... | |
| bool | operator== (const GiContext &src) const |
| 比较相等操作符函数 更多... | |
| bool | operator!= (const GiContext &src) const |
| 比较不相等操作符函数 更多... | |
| int | getLineStyle () const |
| 返回线型, kSolidLine..kNullLine 更多... | |
| int | getLineStyleEx () const |
| void | setLineStyle (int style, bool all=false) |
| 设置线型, kSolidLine..kNullLine 更多... | |
| float | getLineWidth () const |
| 返回线宽 更多... | |
| float | getExtraWidth () const |
| 返回附加的线宽,像素单位,非负数 更多... | |
| bool | isAutoScale () const |
| 返回像素单位线宽是否自动缩放 更多... | |
| void | setLineWidth (float width, bool autoScale) |
| 设置线宽 更多... | |
| void | setExtraWidth (float pixels) |
| 设置附加的线宽,像素单位,非负数 更多... | |
| bool | isNullLine () const |
| 返回是否为空线,即不画线 更多... | |
| void | setNullLine () |
| 设置为空线,即不画线 更多... | |
| GiColor | getLineColor () const |
| 返回线条颜色 更多... | |
| void | setLineColor (const GiColor &color) |
| 设置线条颜色, GiColor::Invalid() 表示不画线条 更多... | |
| void | setLineColor (int r, int g, int b) |
| 设置线条颜色 更多... | |
| void | setLineColor (int r, int g, int b, int a) |
| 设置线条颜色 更多... | |
| int | getLineARGB () const |
| 返回线条ARGB颜色 更多... | |
| void | setLineARGB (int argb) |
| 设置线条ARGB颜色,0表示不画线条 更多... | |
| int | getLineAlpha () const |
| 返回线条透明度 更多... | |
| void | setLineAlpha (int alpha) |
| 设置线条透明度,0到255,0表示全透明,255表示不透明 更多... | |
| bool | hasFillColor () const |
| 返回是否填充 更多... | |
| void | setNoFillColor () |
| 设置为不填充 更多... | |
| GiColor | getFillColor () const |
| 返回填充颜色 更多... | |
| void | setFillColor (const GiColor &color) |
| 设置填充颜色, GiColor::Invalid() 表示不填充 更多... | |
| void | setFillColor (int r, int g, int b) |
| 设置填充颜色 更多... | |
| void | setFillColor (int r, int g, int b, int a) |
| 设置填充颜色 更多... | |
| int | getFillARGB () const |
| 返回线条ARGB颜色 更多... | |
| void | setFillARGB (int argb) |
| 设置线条ARGB颜色,0表示不填充 更多... | |
| int | getFillAlpha () const |
| 返回填充透明度 更多... | |
| void | setFillAlpha (int alpha) |
| 设置填充透明度,0到255,0表示全透明,255表示不透明 更多... | |
| bool | hasArrayHead () const |
| 返回是否有线端箭头 更多... | |
| int | getStartArrayHead () const |
| 返回起始端的箭头类型, kArrowSharpClosed 等 更多... | |
| void | setStartArrayHead (int type) |
| 设置起始端的箭头类型, kArrowSharpClosed 等 更多... | |
| int | getEndArrayHead () const |
| 返回起始端的箭头类型, kArrowSharpClosed 等 更多... | |
| void | setEndArrayHead (int type) |
| 设置起始端的箭头类型, kArrowSharpClosed 等 更多... | |
Private 属性 | |
| int | m_lineStyle |
| 线型, kSolidLine..kNullLine 更多... | |
| float | m_lineWidth |
| 线宽, >0: 0.01mm, =0: 1px, <0:px 更多... | |
| GiColor | m_lineColor |
| 线条颜色 更多... | |
| GiColor | m_fillColor |
| 填充颜色 更多... | |
| bool | m_autoScale |
| 像素单位线宽是否自动缩放 更多... | |
| int | m_arrayHead |
| 线端箭头,start|end*100, kArrowSharpClosed 等 更多... | |