该接口类开放了可以改变一个可绘制对象的图形设置的接口。 更多...
Public 成员函数 | |
| void | SetBrushColor (COLORREF brushColor) |
| void | SetFont (LString fontFamily, int fontHeight, COLORREF fontColor, BOOL bold, BOOL italic, BOOL underline, BOOL strikeOut) |
| void | SetFontColor (COLORREF fontColor) |
| void | SetFontFamily (LString fontFamily) |
| void | SetFontHeight (int fontHeight) |
| void | SetPen (LPVPenStyle penStyle, int penWidth, COLORREF penColor) |
| void | SetPenColor (COLORREF penColor) |
| void | SetPenStyle (LPVPenStyle penStyle) |
| void | SetPenWidth (int penWidth) |
该接口类开放了可以改变一个可绘制对象的图形设置的接口。
所有提供了绘制功能的 LPV 类都实现这个类定义的所有接口。 使用这个接口类,需将 LPV 的类转换成 ILDrawable 接口类,然后通过该接口修改其描边笔、笔刷、字体等绘制属性。
以下列出了所有实现该接口的可绘制 LPV 类。
注:该接口在 Linux / MacOS 平台暂不可用。
| void SetBrushColor | ( | COLORREF | brushColor | ) |
设置用于填充的笔刷颜色
| [in] | brushColor | 笔刷颜色,也可以查看 ILSystem::GetColorRef |
| void SetFont | ( | LString | fontFamily, |
| int | fontHeight, | ||
| COLORREF | fontColor, | ||
| BOOL | bold, | ||
| BOOL | italic, | ||
| BOOL | underline, | ||
| BOOL | strikeOut | ||
| ) |
设置要绘制的文本的字体。如果设置 FontFamily 是 Arial 和 bold,则会优先搜索 Arial-bold 字体, 如果找不到,就使用 Arial 字体并自动生成加粗后的效果。如果不设置任何字体属性,会使用系统默认字体,通常是 MS Sans Serif。
| [in] | fontFamily | 字体家族名称,比如 "Arial", "Tahomo", 和 "Sans-Serif" 等 |
| [in] | fontHeight | 逻辑单位(比如毫米)的字符或字符单元的高度 |
| [in] | fontColor | 文本颜色,也可以查看 ILSystem::GetColorRef |
| [in] | bold | 文本加粗 |
| [in] | italic | 斜体字符 |
| [in] | underline | 字符下划线 |
| [in] | strikeOut | 删除线 |
| void SetFontColor | ( | COLORREF | fontColor | ) |
设置文本颜色,保留其它字体属性不变
| void SetFontHeight | ( | int | fontHeight | ) |
设置字体高度,保留其它字体属性不变
| void SetPen | ( | LPVPenStyle | penStyle, |
| int | penWidth, | ||
| COLORREF | penColor | ||
| ) |
设置用于绘制路径的描边笔。如果不设置,默认会用一个宽度为1个像素的绿色实心描边笔。
| [in] | penStyle | 描边笔的风格 |
| [in] | penWidth | 描边笔的宽度,至少为1个像素宽度,最多支持31像素宽度 |
| [in] | penColor | 描边笔的颜色,查看 ILSystem::GetColorRef |
| void SetPenColor | ( | COLORREF | penColor | ) |
设置描边笔的颜色,保持其它属性不变
| void SetPenStyle | ( | LPVPenStyle | penStyle | ) |
设置描边笔风格,保持其它属性不变
| void SetPenWidth | ( | int | penWidth | ) |
设置描边笔的宽度,保持其它属性不变