首页| 论坛| 消息

标题:【提问】请问Qtopia下的QPainter类的画图功能在哪里实现的?
作者:shangzh
日期:2005-12-28 10:14
内容:

比如画矩形,用drawRect来画,但我在qpainter.cpp中没有找到drawRect的实现函数,它
的实现函数在哪里?我是说最原始的实现函数,就是怎么画矩形的函数,例如当style选
为DotLine时图是怎么画出来的?


#1 [fanyu 12-28 11:57]
可以通过文件查找,到到drawRect函数的实现,也可能它的实现在做在库里的。
#2 [nanhu_007 12-29 23:08]
void drawPoint ( int x, int y )
void drawPoint ( const QPoint & )
void drawPoints ( const QPointArray & a, int index=0, int npoints=-1 )
void moveTo ( int x, int y )
void moveTo ( const QPoint & )
void lineTo ( int x, int y )
void lineTo ( const QPoint & )
void drawLine ( int x1, int y1, int x2, int y2 )
void drawLine ( const QPoint &, const QPoint & )
void drawRect ( int x, int y, int w, int h )
void drawRect ( const QRect & )
void drawWinFocusRect ( int x, int y, int w, int h )
void drawWinFocusRect ( int x, int y, int w, int h, const QColor & bgColor )
void drawWinFocusRect ( const QRect & )
void drawWinFocusRect ( const QRect &, const QColor & bgColor )
void drawRoundRect ( int x, int y, int w, int h, int, int )
void drawRoundRect ( const QRect &, int, int )
void drawRoundRect ( int x, int y, int w, int h )
void drawRoundRect ( const QRect & )
void drawEllipse ( int x, int y, int w, int h )
void drawEllipse ( const QRect & )
void drawArc ( int x, int y, int w, int h, int a, int alen )
void drawArc ( const QRect &, int a, int alen )
void drawPie ( int x, int y, int w, int h, int a, int alen )
void drawPie ( const QRect &, int a, int alen )
void drawChord ( int x, int y, int w, int h, int a, int alen )
void drawChord ( const QRect &, int a, int alen )
void drawLineSegments ( const QPointArray &, int index=0, int nlines=-1 )
void drawPolyline ( const QPointArray &, int index=0, int npoints=-1 )
void drawPolygon ( const QPointArray &, bool winding=FALSE, int index=0, int npoints=-1 )
void drawQuadBezier ( const QPointArray &, int index=0 )
void drawPixmap ( int x, int y, const QPixmap &, int sx=0, int sy=0, int sw=-1, int sh=-1 )
void drawPixmap ( const QPoint &, const QPixmap &, const QRect & sr )
void drawPixmap ( const QPoint &, const QPixmap & )
void drawImage ( int x, int y, const QImage &, int sx=0, int sy=0, int sw=-1, int sh=-1 )
void drawImage ( const QPoint &, const QImage &, const QRect & sr )
void drawImage ( const QPo ..
#3 [lonelyghost 04-03 13:04]
这个我知道。在/src/kernel/qpainter_qws.cpp中。
我最近在研究QPainter::drawPolygon的代码。

回复 发表
主题 版块