kivio

kivio_shape_painter.h
1#ifndef KIVIO_SHAPE_PAINTER_H
2#define KIVIO_SHAPE_PAINTER_H
3
4#ifdef HAVE_CONFIG_H
5#include <config.h>
6#endif
7
8#include "kivio_fill_style.h"
9
10class KivioPainter;
11class KivioShape;
12
13class KivioShapePainter
14{
15protected:
16 KivioFillStyle m_fillStyle;
17 KivioPainter *m_pPainter;
18 KivioShape *m_pShape;
19 TQColor m_fgColor;
20 float m_lineWidth;
21
22 float m_x, m_y, m_w, m_h;
23
24 void drawArc();
25 void drawBezier();
26 void drawOpenPath();
27 void drawClosedPath();
28 void drawPie();
29 void drawEllipse();
30 void drawLineArray();
31 void drawRectangle();
32 void drawRoundRectangle();
33 void drawPolygon();
34 void drawPolyline();
35 void drawTextBox();
36
37public:
38 KivioShapePainter( KivioPainter * );
39 virtual ~KivioShapePainter();
40
41
42 void setFGColor( const TQColor &c ) { m_fgColor = c; }
43 void setBGColor( const TQColor &c ) { m_fillStyle.setColor(c); }
44 void setLineWidth( const float &f ) { m_lineWidth = f; }
45
46 void drawShape( KivioShape *, float, float, float, float );
47 void drawShapeOutline( KivioShape *, float, float, float, float );
48
49};
50
51#endif
52