The Q3CanvasLine class provides a line on a Q3Canvas. More...
#include <Q3CanvasLine>
This class is part of the Qt 3 support library. It is provided to keep old source code working. We strongly advise against using it in new code. See Porting to Qt 4 for more information.
Inherits: Q3CanvasPolygonalItem.
Q3CanvasLine ( Q3Canvas * canvas ) | |
~Q3CanvasLine () | |
QPoint | endPoint () const |
void | setPoints ( int xa, int ya, int xb, int yb ) |
QPoint | startPoint () const |
virtual void | moveBy ( double dx, double dy ) |
virtual int | rtti () const |
virtual void | setPen ( QPen p ) |
virtual Q3PointArray | areaPoints () const |
virtual void | drawShape ( QPainter & p ) |
The Q3CanvasLine class provides a line on a Q3Canvas.
The line inherits functionality from Q3CanvasPolygonalItem, for example the setPen() function. The start and end points of the line are set with setPoints().
Like any other canvas item lines can be moved with Q3CanvasItem::move() and Q3CanvasItem::moveBy(), or by setting coordinates with Q3CanvasItem::setX(), Q3CanvasItem::setY() and Q3CanvasItem::setZ().
See also QtCanvas and Porting to Graphics View.
Constructs a line from (0,0) to (0,0) on canvas.
See also setPoints().
Destroys the line.
Reimplemented from Q3CanvasPolygonalItem::areaPoints().
Note that the area defined by the line is somewhat thicker than the line that is actually drawn.
Reimplemented from Q3CanvasPolygonalItem::drawShape().
Returns the end point of the line.
See also setPoints() and startPoint().
Reimplemented from Q3CanvasItem::moveBy().
Reimplemented from Q3CanvasItem::rtti().
Returns 7 (Q3CanvasItem::Rtti_Line).
See also Q3CanvasItem::rtti().
Reimplemented from Q3CanvasPolygonalItem::setPen().
Sets the line's start point to (xa, ya) and its end point to (xb, yb).
Returns the start point of the line.
© 2008-2011 Nokia Corporation and/or its subsidiaries. Nokia, Qt and their respective logos are trademarks of Nokia Corporation in Finland and/or other countries worldwide.
All other trademarks are property of their respective owners. Privacy Policy
Licensees holding valid Qt Commercial licenses may use this document in accordance with the Qt Commercial License Agreement provided with the Software or, alternatively, in accordance with the terms contained in a written agreement between you and Nokia.
Alternatively, this document may be used under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation.