Q3CanvasLine Class

The Q3CanvasLine class provides a line on a Q3Canvas . 更多...

頭: #include <Q3CanvasLine>
繼承: 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 () 和 Q3CanvasItem::moveBy (), or by setting coordinates with Q3CanvasItem::setX (), Q3CanvasItem::setY () 和 Q3CanvasItem::setZ ().

另請參閱 QtCanvas and Porting to Graphics View .

成員函數文檔編製

Q3CanvasLine:: Q3CanvasLine ( Q3Canvas * canvas )

Constructs a line from (0,0) to (0,0) on canvas .

另請參閱 setPoints ().

Q3CanvasLine:: ~Q3CanvasLine ()

Destroys the line.

[virtual protected] Q3PointArray Q3CanvasLine:: areaPoints () const

重實現自 Q3CanvasPolygonalItem::areaPoints ().

Note that the area defined by the line is somewhat thicker than the line that is actually drawn.

[virtual protected] void Q3CanvasLine:: drawShape ( QPainter & p )

重實現自 Q3CanvasPolygonalItem::drawShape ().

QPoint Q3CanvasLine:: endPoint () const

Returns the end point of the line.

另請參閱 setPoints () 和 startPoint ().

[虛擬] void Q3CanvasLine:: moveBy ( double dx , double dy )

重實現自 Q3CanvasItem::moveBy ().

[虛擬] int Q3CanvasLine:: rtti () const

重實現自 Q3CanvasItem::rtti ().

Returns 7 ( Q3CanvasItem::Rtti_Line ).

另請參閱 Q3CanvasItem::rtti ().

[虛擬] void Q3CanvasLine:: setPen ( QPen p )

重實現自 Q3CanvasPolygonalItem::setPen ().

void Q3CanvasLine:: setPoints ( int xa , int ya , int xb , int yb )

Sets the line's start point to ( xa , ya ) and its end point to ( xb , yb ).

QPoint Q3CanvasLine:: startPoint () const

Returns the start point of the line.

另請參閱 setPoints () 和 endPoint ().