kivio
kivio_shape_painter.h00001 #ifndef KIVIO_SHAPE_PAINTER_H
00002 #define KIVIO_SHAPE_PAINTER_H
00003
00004 #ifdef HAVE_CONFIG_H
00005 #include <config.h>
00006 #endif
00007
00008 #include "kivio_fill_style.h"
00009
00010 class KivioPainter;
00011 class KivioShape;
00012
00013 class KivioShapePainter
00014 {
00015 protected:
00016 KivioFillStyle m_fillStyle;
00017 KivioPainter *m_pPainter;
00018 KivioShape *m_pShape;
00019 QColor m_fgColor;
00020 float m_lineWidth;
00021
00022 float m_x, m_y, m_w, m_h;
00023
00024 void drawArc();
00025 void drawBezier();
00026 void drawOpenPath();
00027 void drawClosedPath();
00028 void drawPie();
00029 void drawEllipse();
00030 void drawLineArray();
00031 void drawRectangle();
00032 void drawRoundRectangle();
00033 void drawPolygon();
00034 void drawPolyline();
00035 void drawTextBox();
00036
00037 public:
00038 KivioShapePainter( KivioPainter * );
00039 virtual ~KivioShapePainter();
00040
00041
00042 void setFGColor( const QColor &c ) { m_fgColor = c; }
00043 void setBGColor( const QColor &c ) { m_fillStyle.setColor(c); }
00044 void setLineWidth( const float &f ) { m_lineWidth = f; }
00045
00046 void drawShape( KivioShape *, float, float, float, float );
00047 void drawShapeOutline( KivioShape *, float, float, float, float );
00048
00049 };
00050
00051 #endif
00052
|