kivio

KivioScreenPainter Class Reference

Inheritance diagram for KivioScreenPainter:

KivioPainter List of all members.

Detailed Description

Definition at line 31 of file kivio_screen_painter.h.


Public Member Functions

 KivioScreenPainter ()
 KivioScreenPainter (QPainter *painter)
virtual ~KivioScreenPainter ()
virtual bool start (QPaintDevice *)
virtual bool stop ()
QPainter * painter ()
void setPainter (QPainter *p)
void drawLine (float, float, float, float)
void drawArc (float, float, float, float, float, float)
void drawBezier (QPointArray &)
void drawRect (float, float, float, float)
void fillRect (float, float, float, float)
void drawRoundRect (float, float, float, float, float, float)
void fillRoundRect (float, float, float, float, float, float)
void drawPie (float, float, float, float, float, float)
void fillPie (float, float, float, float, float, float)
void drawChord (float, float, float, float, float, float)
void fillChord (float, float, float, float, float, float)
void drawEllipse (float, float, float, float)
void fillEllipse (float, float, float, float)
void drawLineArray (QPtrList< KivioPoint > *)
void drawPolyline (QPtrList< KivioPoint > *)
void drawPolygon (QPtrList< KivioPoint > *)
void drawPolyline (QPointArray &)
void drawPolygon (QPointArray &)
void drawLineArray (QPointArray &)
void drawClosedPath (QPtrList< KivioPoint > *)
void drawOpenPath (QPtrList< KivioPoint > *)
void setFont (const QFont &)
void drawText (int x, int y, int w, int h, int tf, const QString &str)
virtual QRect boundingRect (int, int, int, int, int, const QString &)
void drawPixmap (float, float, const QPixmap &)
void drawHandle (float, float, int)
virtual void drawSelectionBox (const QRect &)
virtual void saveState ()
virtual void restoreState ()
virtual void setTranslation (float, float)
virtual void translateBy (float, float)
virtual void setRotation (int)
virtual void rotateBy (int)
virtual int rotation ()
virtual void setWorldMatrix (QWMatrix, bool)

Protected Attributes

QPainter * m_pPainter
float m_transX
float m_transY
int m_rotation

Member Function Documentation

bool KivioScreenPainter::start ( QPaintDevice *  dev  )  [virtual]

Starts the drawing on a QPaintDevice.

Parameters:
dev The device to paint on
Call this function before you call any other KivioScreenPainter functions. This will create an internal QPainter object for drawing with. If you fail to call this function, nothing will work.

Reimplemented from KivioPainter.

Definition at line 70 of file kivio_screen_painter.cpp.

bool KivioScreenPainter::stop (  )  [virtual]

Stops the drawing and flushes the drawing pipeline.

After using the KivioScreenPainter object, call stop() to finalize it all.

Reimplemented from KivioPainter.

Definition at line 92 of file kivio_screen_painter.cpp.

void KivioScreenPainter::drawLine ( float  x1,
float  y1,
float  x2,
float  y2 
) [virtual]

Draws a line from one point to another.

Parameters:
x1 The first x coord
y1 The first y coord
x2 The second x coord
y2 The second y coord
This function will draw a line from one point to another in the current fgColor and using the current lineWidth.

Reimplemented from KivioPainter.

Definition at line 122 of file kivio_screen_painter.cpp.

void KivioScreenPainter::drawArc ( float  x1,
float  y1,
float  w1,
float  h1,
float  a1,
float  a2 
) [virtual]

Draws an arc.

Parameters:
x1 The x-coord of the arc-box
y1 The y-coord of the arc-box
w1 The width of the arc
h1 The height of the arc
a1 The starting angle of the arc ??
a2 The total angle of the arc???
This will draw an arc in the current fgColor and lineWidth.

Reimplemented from KivioPainter.

Definition at line 145 of file kivio_screen_painter.cpp.

void KivioScreenPainter::drawBezier ( QPointArray &  pArray  )  [virtual]

Draws a single quad-bezier curve.

Parameters:
pArray The array of 4 points to draw
This will draw a quad-bezier curve in the current fgColor and lineWidth. pArray must have 4 points.

Reimplemented from KivioPainter.

Definition at line 163 of file kivio_screen_painter.cpp.

void KivioScreenPainter::drawRect ( float  x1,
float  y1,
float  w1,
float  h1 
) [virtual]

Draws a hollow rectangle.

Parameters:
x1 The x coord
y1 The y coord
w1 The width
h1 The height

Reimplemented from KivioPainter.

Definition at line 181 of file kivio_screen_painter.cpp.

void KivioScreenPainter::fillRect ( float  x1,
float  y1,
float  w1,
float  h1 
) [virtual]

Draws a filled/outlined rectangle.

Parameters:
x1 The x coord
y1 The y coord
w1 The width
h1 The height
This draws a filled, and outlined rectangle in the current fgColor, lineWidth, and fillStyle.

Reimplemented from KivioPainter.

Definition at line 202 of file kivio_screen_painter.cpp.

void KivioScreenPainter::drawRoundRect ( float  x1,
float  y1,
float  w1,
float  h1,
float  a1,
float  a2 
) [virtual]

Draws a hollow round-rectangle.

Parameters:
x1 The x coord
y1 The y coord
w1 The width
h1 The height
a1 ????
a2 ????
This draws a hollow round-rectangle in the current fgColor and lineWidth.

Reimplemented from KivioPainter.

Definition at line 238 of file kivio_screen_painter.cpp.

void KivioScreenPainter::fillRoundRect ( float  x1,
float  y1,
float  w1,
float  h1,
float  a1,
float  a2 
) [virtual]

Draws a filled/outlined round-rectangle.

Parameters:
x1 The x coord
y1 The y coord
w1 The width
h1 The height
a1 ????
a2 ????
This draws a hollow round-rectangle in the current fgColor, lineWidth, and fillStyle.

Reimplemented from KivioPainter.

Definition at line 262 of file kivio_screen_painter.cpp.

void KivioScreenPainter::drawPie ( float  x1,
float  y1,
float  w1,
float  h1,
float  a1,
float  a2 
) [virtual]

Draws a hollow pie.

Parameters:
x1 The x coord
y1 The y coord
w1 The width
h1 The height
a1 ????
a2 ????
This draws a hollow pie in the current fgColor and lineWidth.

Reimplemented from KivioPainter.

Definition at line 298 of file kivio_screen_painter.cpp.

void KivioScreenPainter::fillPie ( float  x1,
float  y1,
float  w1,
float  h1,
float  a1,
float  a2 
) [virtual]

Draws a filled/outlined pie.

Parameters:
x1 The x coord
y1 The y coord
w1 The width
h1 The height
a1 ????
a2 ????
This draws a filled/outlined pie in the current fgColor, lineWidth, and fillStyle.

Reimplemented from KivioPainter.

Definition at line 321 of file kivio_screen_painter.cpp.

void KivioScreenPainter::drawChord ( float  x1,
float  y1,
float  w1,
float  h1,
float  a1,
float  a2 
) [virtual]

Draws a hollow chord.

Parameters:
x1 The x coord
y1 The y coord
w1 The width
h1 The height
a1 ????
a2 ????
This draws a hollow chord in the current fgColor and lineWidth.

Reimplemented from KivioPainter.

Definition at line 357 of file kivio_screen_painter.cpp.

void KivioScreenPainter::fillChord ( float  x1,
float  y1,
float  w1,
float  h1,
float  a1,
float  a2 
) [virtual]

Draws a filled/outlined chord.

Parameters:
x1 The x coord
y1 The y coord
w1 The width
h1 The height
a1 ????
a2 ????
This draws a filled/outlined chord in the current fgColor, fillStyle and lineWidth.

Reimplemented from KivioPainter.

Definition at line 380 of file kivio_screen_painter.cpp.

void KivioScreenPainter::drawEllipse ( float  x1,
float  y1,
float  w1,
float  h1 
) [virtual]

Draws a hollow ellipse.

Parameters:
x1 The x coord
y1 The y coord
w1 The width
h1 The height
This draws a hollow ellipse in the current fgColor and lineWidth.

Reimplemented from KivioPainter.

Definition at line 414 of file kivio_screen_painter.cpp.

void KivioScreenPainter::fillEllipse ( float  x1,
float  y1,
float  w1,
float  h1 
) [virtual]

Draws a filled/outlined ellipse.

Parameters:
x1 The x coord
y1 The y coord
w1 The width
h1 The height
This draws a filled/outlined ellipse in the current fgColor, fillstyle and lineWidth.

Reimplemented from KivioPainter.

Definition at line 435 of file kivio_screen_painter.cpp.

void KivioScreenPainter::drawLineArray ( QPtrList< KivioPoint > *  pList  )  [virtual]

Draws an array of lines.

Parameters:
pList The array of points to draw lines with
The list of points should contain a list of points in pairs. Lines are drawn from p1->p2 p3->p4 p5->p6, etc...

Reimplemented from KivioPainter.

Definition at line 466 of file kivio_screen_painter.cpp.

void KivioScreenPainter::drawPolyline ( QPtrList< KivioPoint > *  pList  )  [virtual]

Draws a polyline.

Parameters:
pList The array of points to draw the polyline with
Draws a polyline (hollow) from p1->p2->p3->pn

Reimplemented from KivioPainter.

Definition at line 500 of file kivio_screen_painter.cpp.

void KivioScreenPainter::drawPolygon ( QPtrList< KivioPoint > *  pList  )  [virtual]

Draws a polygon.

Parameters:
pList The array of points to draw the polyline with
Draws a filled (if set) polygon from p1->p2->p3->pn->p1

Reimplemented from KivioPainter.

Definition at line 527 of file kivio_screen_painter.cpp.

void KivioScreenPainter::drawClosedPath ( QPtrList< KivioPoint > *  pPoints  )  [virtual]

Draws a filled path object.

Parameters:
pPoints The array of points to draw the polyline with
Draws a filled (if set) curve with the points stored in pPoints. They can be made up of bezier, arc, and normal points.

Reimplemented from KivioPainter.

Definition at line 612 of file kivio_screen_painter.cpp.


The documentation for this class was generated from the following files:
KDE Home | KDE Accessibility Home | Description of Access Keys