You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
68 lines
2.0 KiB
68 lines
2.0 KiB
/****************************************************************************
|
|
**
|
|
** Definition of TQt3CairoPaintDevice class
|
|
**
|
|
** Copyright (C) 2012 Timothy Pearson. All rights reserved.
|
|
**
|
|
** This file is part of the TDE Qt4 style interface
|
|
**
|
|
** This file may be used under the terms of the GNU General
|
|
** Public License versions 2.0 or 3.0 as published by the Free
|
|
** Software Foundation and appearing in the files LICENSE.GPL2
|
|
** and LICENSE.GPL3 included in the packaging of this file.
|
|
**
|
|
** This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
|
|
** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR
|
|
** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted
|
|
** herein.
|
|
**
|
|
**********************************************************************/
|
|
|
|
#ifndef TDEQT4PAINTER_H
|
|
#define TDEQT4PAINTER_H
|
|
|
|
#define TQT_NO_COMPAT_NAMES
|
|
#include "ntqpaintdevice.h"
|
|
#include "ntqbuffer.h"
|
|
#include "ntqcolor.h"
|
|
#include "ntqpen.h"
|
|
#include "ntqbrush.h"
|
|
|
|
#include <cairo.h>
|
|
|
|
class Q_EXPORT TQt3CairoPaintDevice : public TQPaintDevice // picture class
|
|
{
|
|
public:
|
|
TQt3CairoPaintDevice( cairo_surface_t * );
|
|
~TQt3CairoPaintDevice();
|
|
|
|
protected:
|
|
bool cmd( int, TQPainter *, TQPDevCmdParam * );
|
|
int metric( int ) const;
|
|
|
|
private:
|
|
void updatePen(bool backgroundStroke=FALSE);
|
|
void dualStrokePen();
|
|
|
|
void updateBrush(bool backgroundStroke=FALSE, cairo_fill_rule_t fillMethod=CAIRO_FILL_RULE_WINDING);
|
|
void dualStrokeBrush(cairo_fill_rule_t fillMethod=CAIRO_FILL_RULE_WINDING);
|
|
|
|
void drawPolygon(const TQPointArray* pointarray, bool winding, bool fill, bool close);
|
|
void drawRoundRect(int x, int y, int w, int h, int xRnd, int yRnd);
|
|
void drawEllipse(int x, int y, int w, int h);
|
|
void drawArc(int x, int y, int w, int h, int a, int alen);
|
|
void drawPie(int x, int y, int w, int h, int a, int alen);
|
|
void drawChord(int x, int y, int w, int h, int a, int alen);
|
|
|
|
private:
|
|
cairo_surface_t *m_surface;
|
|
cairo_t *m_painter;
|
|
|
|
TQColor m_bgColor;
|
|
TQt::BGMode m_bgColorMode;
|
|
TQPen m_pen;
|
|
TQBrush m_brush;
|
|
};
|
|
|
|
#endif // TDEQT4PAINTER_H
|