Movatterモバイル変換


[0]ホーム

URL:


We bake cookies in your browser for a better experience. Using this site means that you consent.Read More

Menu

Qt Documentation

Q3CanvasLine Class

TheQ3CanvasLine class provides a line on aQ3Canvas.More...

Header:#include <Q3CanvasLine>
Inherits:Q3CanvasPolygonalItem

Public Functions

Q3CanvasLine(Q3Canvas * canvas)
~Q3CanvasLine()
QPointendPoint() const
voidsetPoints(int xa, int ya, int xb, int yb)
QPointstartPoint() const

Reimplemented Public Functions

virtual voidmoveBy(double dx, double dy)
virtual intrtti() const
virtual voidsetPen(QPen p)

Reimplemented Protected Functions

virtual Q3PointArrayareaPoints() const
virtual voiddrawShape(QPainter & p)

Detailed Description

TheQ3CanvasLine class provides a line on aQ3Canvas.

The line inherits functionality fromQ3CanvasPolygonalItem, for example thesetPen() function. The start and end points of the line are set withsetPoints().

Like any other canvas item lines can be moved withQ3CanvasItem::move() andQ3CanvasItem::moveBy(), or by setting coordinates withQ3CanvasItem::setX(),Q3CanvasItem::setY() andQ3CanvasItem::setZ().

See alsoQtCanvas andPorting to Graphics View.

Member Function Documentation

Q3CanvasLine::Q3CanvasLine(Q3Canvas * canvas)

Constructs a line from (0,0) to (0,0) oncanvas.

See alsosetPoints().

Q3CanvasLine::~Q3CanvasLine()

Destroys the line.

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

Reimplemented fromQ3CanvasPolygonalItem::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)

Reimplemented fromQ3CanvasPolygonalItem::drawShape().

QPoint Q3CanvasLine::endPoint() const

Returns the end point of the line.

See alsosetPoints() andstartPoint().

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

Reimplemented fromQ3CanvasItem::moveBy().

[virtual]int Q3CanvasLine::rtti() const

Reimplemented fromQ3CanvasItem::rtti().

Returns 7 (Q3CanvasItem::Rtti_Line).

See alsoQ3CanvasItem::rtti().

[virtual]void Q3CanvasLine::setPen(QPen p)

Reimplemented fromQ3CanvasPolygonalItem::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.

See alsosetPoints() andendPoint().

© 2016 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of theGNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.


[8]ページ先頭

©2009-2025 Movatter.jp