|
fastdo
0.6.16
|
绘画类 更多...
#include <eiengd.hpp>
Public 成员函数 | |
| Graphics (Image &im) | |
| ~Graphics () | |
| void | fill (int x, int y, Color const &color) |
| 在指定坐标用指定颜色填充 更多... | |
| void | filledRectangle (int x, int y, int width, int height, Color const &color) |
| 用指定颜色填充一个矩形 更多... | |
| void | filledEllipse (int centerX, int centerY, int width, int height, Color const &color) |
| 用指定颜色填充一个椭圆 更多... | |
| void | arc (int centerX, int centerY, int width, int height, int start, int end, Color const &color) |
| 用指定颜色绘制一条弧线 更多... | |
| void | line (int x1, int y1, int x2, int y2, Color const &color) |
| 用指定颜色绘制一条直线 更多... | |
| void | rectangle (int x, int y, int width, int height, Color const &color) |
| 用指定颜色绘制一个矩形 更多... | |
| void | ellipse (int centerX, int centerY, int width, int height, Color const &color) |
| 用指定颜色绘制一个椭圆 更多... | |
| void | ttfTextOut (double size, double angle, int x, int y, Color const &color, winux::String const &fontFile, winux::String const &text, Point *boxOut=NULL) |
| TrueTypeFont文本输出 更多... | |
| void | ttfBBox (double size, double angle, winux::String const &fontFile, winux::String const &text, Point boxOut[4]) const |
| 取得文本输出的四边形范围 更多... | |
| void | stringOut (int fontInx, int x, int y, winux::String const &str, Color const &color) |
| 输出英文字符串,fontInx={0~4} 更多... | |
| Color | color (int red, int green, int blue, winux::Mixed const &mixed=winux::mxNull) |
| 分配颜色,如果是调色板图则增加颜色数,如果是真彩图,则什么都不做。 更多... | |
绘画类
在文件 eiengd.hpp 第 214 行定义.
| eiengd::Graphics::Graphics | ( | Image & | im | ) |
| eiengd::Graphics::~Graphics | ( | ) |
| void eiengd::Graphics::fill | ( | int | x, |
| int | y, | ||
| Color const & | color | ||
| ) |
在指定坐标用指定颜色填充
| x | int |
| y | int |
| color | Color |
| void eiengd::Graphics::filledRectangle | ( | int | x, |
| int | y, | ||
| int | width, | ||
| int | height, | ||
| Color const & | color | ||
| ) |
用指定颜色填充一个矩形
| void eiengd::Graphics::filledEllipse | ( | int | centerX, |
| int | centerY, | ||
| int | width, | ||
| int | height, | ||
| Color const & | color | ||
| ) |
用指定颜色填充一个椭圆
| void eiengd::Graphics::arc | ( | int | centerX, |
| int | centerY, | ||
| int | width, | ||
| int | height, | ||
| int | start, | ||
| int | end, | ||
| Color const & | color | ||
| ) |
用指定颜色绘制一条弧线
| void eiengd::Graphics::line | ( | int | x1, |
| int | y1, | ||
| int | x2, | ||
| int | y2, | ||
| Color const & | color | ||
| ) |
用指定颜色绘制一条直线
| void eiengd::Graphics::rectangle | ( | int | x, |
| int | y, | ||
| int | width, | ||
| int | height, | ||
| Color const & | color | ||
| ) |
用指定颜色绘制一个矩形
| void eiengd::Graphics::ellipse | ( | int | centerX, |
| int | centerY, | ||
| int | width, | ||
| int | height, | ||
| Color const & | color | ||
| ) |
用指定颜色绘制一个椭圆
| void eiengd::Graphics::ttfTextOut | ( | double | size, |
| double | angle, | ||
| int | x, | ||
| int | y, | ||
| Color const & | color, | ||
| winux::String const & | fontFile, | ||
| winux::String const & | text, | ||
| Point * | boxOut = NULL |
||
| ) |
TrueTypeFont文本输出
| size | 字体大小 |
| angle | 角度 |
| x | X |
| y | Y |
| color | 颜色 |
| fontFile | TrueType字体文件 |
| text | 待画的UTF8编码的文本 |
| boxOut[4] | 返回一个四边形框表示绘画的范围 |
| void eiengd::Graphics::ttfBBox | ( | double | size, |
| double | angle, | ||
| winux::String const & | fontFile, | ||
| winux::String const & | text, | ||
| Point | boxOut[4] | ||
| ) | const |
取得文本输出的四边形范围
| boxOut[4] | 依次表示:左下角,右下角,右上角,左上角 |
| void eiengd::Graphics::stringOut | ( | int | fontInx, |
| int | x, | ||
| int | y, | ||
| winux::String const & | str, | ||
| Color const & | color | ||
| ) |
输出英文字符串,fontInx={0~4}
| Color eiengd::Graphics::color | ( | int | red, |
| int | green, | ||
| int | blue, | ||
| winux::Mixed const & | mixed = winux::mxNull |
||
| ) |
分配颜色,如果是调色板图则增加颜色数,如果是真彩图,则什么都不做。
| red | int |
| green | int |
| blue | int |
| mixed | Mixed 若为true,则指定透明色;若为数字,则分配alpha色;默认是null分配普通色 |