Qt Toolkit - QCanvasLine Class

| Classes - Annotated - Tree - Functions - Home - Structure

# QCanvasLine Class Reference
[ canvas module ]

A lines on a canvas. More...

`#include <qcanvas.h>`

Inherits QCanvasPolygonalItem.

List of all member functions.

## Public Members

- QCanvasLine ( QCanvas * canvas )
- ~QCanvasLine ()
- void setPoints ( int x1, int y1, int x2, int y2 )
- QPoint startPoint () const
- QPoint endPoint () const
- virtual int rtti () const

## Detailed Description

A lines on a canvas.

Currently, only width==1 lines are supported.

## Member Function Documentation

### QCanvasLine::QCanvasLine ( QCanvas * canvas )

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

See also setPoints().

### QCanvasLine::~QCanvasLine ()

Destroys the line, removing it from its canvas.

### QPointArray QCanvasLine::areaPoints () const `[virtual protected]`

Reimplemented for internal reasons; the API is not affected.

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

Reimplemented from QCanvasPolygonalItem.

### void QCanvasLine::drawShape ( QPainter & p ) `[virtual protected]`

Reimplemented for internal reasons; the API is not affected.

Reimplemented from QCanvasPolygonalItem.

### QPoint QCanvasLine::endPoint () const

Returns the end of the line.

See also setPoints() and startPoint().

### int QCanvasLine::rtti () const `[virtual]`

Returns 7.

See also QCanvasItem::rtti().

Reimplemented from QCanvasItem.

### void QCanvasLine::setPen ( QPen p ) `[virtual]`

Reimplemented for internal reasons; the API is not affected.

Reimplemented from QCanvasPolygonalItem.

### void QCanvasLine::setPoints ( int xa, int ya, int xb, int yb )

Sets the ends of the line to (xa,\a ya) and (xb,\a yb).

### QPoint QCanvasLine::startPoint () const

Returns the start of the line.

See also setPoints() and endPoint().

Search the documentation, FAQ, qt-interest archive and more (uses www.trolltech.com):

This file is part of the Qt toolkit, copyright © 1995-2000 Trolltech, all rights reserved.