2
//C- -------------------------------------------------------------------
4
//C- Copyright (c) 2002 Leon Bottou and Yann Le Cun.
5
//C- Copyright (c) 2001 AT&T
7
//C- This software is subject to, and may be distributed under, the
8
//C- GNU General Public License, Version 2. The license should have
9
//C- accompanied the software or you may obtain a copy of the license
10
//C- from the Free Software Foundation at http://www.fsf.org .
12
//C- This program is distributed in the hope that it will be useful,
13
//C- but WITHOUT ANY WARRANTY; without even the implied warranty of
14
//C- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
//C- GNU General Public License for more details.
17
//C- DjVuLibre-3.5 is derived from the DjVu(r) Reference Library
18
//C- distributed by Lizardtech Software. On July 19th 2002, Lizardtech
19
//C- Software authorized us to replace the original DjVu(r) Reference
20
//C- Library notice by the following text (see doc/lizard2002.djvu):
22
//C- ------------------------------------------------------------------
23
//C- | DjVu (r) Reference Library (v. 3.5)
24
//C- | Copyright (c) 1999-2001 LizardTech, Inc. All Rights Reserved.
25
//C- | The DjVu Reference Library is protected by U.S. Pat. No.
26
//C- | 6,058,214 and patents pending.
28
//C- | This software is subject to, and may be distributed under, the
29
//C- | GNU General Public License, Version 2. The license should have
30
//C- | accompanied the software or you may obtain a copy of the license
31
//C- | from the Free Software Foundation at http://www.fsf.org .
33
//C- | The computer code originally released by LizardTech under this
34
//C- | license and unmodified by other parties is deemed "the LIZARDTECH
35
//C- | ORIGINAL CODE." Subject to any third party intellectual property
36
//C- | claims, LizardTech grants recipient a worldwide, royalty-free,
37
//C- | non-exclusive license to make, use, sell, or otherwise dispose of
38
//C- | the LIZARDTECH ORIGINAL CODE or of programs derived from the
39
//C- | LIZARDTECH ORIGINAL CODE in compliance with the terms of the GNU
40
//C- | General Public License. This grant only confers the right to
41
//C- | infringe patent claims underlying the LIZARDTECH ORIGINAL CODE to
42
//C- | the extent such infringement is reasonably necessary to enable
43
//C- | recipient to make, have made, practice, sell, or otherwise dispose
44
//C- | of the LIZARDTECH ORIGINAL CODE (or portions thereof) and not to
45
//C- | any greater extent that may be necessary to utilize further
46
//C- | modifications or combinations.
48
//C- | The LIZARDTECH ORIGINAL CODE is provided "AS IS" WITHOUT WARRANTY
49
//C- | OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
50
//C- | TO ANY WARRANTY OF NON-INFRINGEMENT, OR ANY IMPLIED WARRANTY OF
51
//C- | MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
52
//C- +------------------------------------------------------------------
54
// $Id: qt_painter.h,v 1.6 2003/11/07 22:08:16 leonb Exp $
55
// $Name: release_3_5_14 $
57
#ifndef HDR_QT_PAINTER
58
#define HDR_QT_PAINTER
69
#include "GContainer.h"
74
class QePainter : public QPainter
77
class PatchRect : public GPEnabled
83
PatchRect(const GRect & _rect, const GP<GPixmap> & _pixmap) :
84
rect(_rect), pixmap(_pixmap) {}
87
void drawPixmap(const GRect &rect, GPixmap *pm,
88
int use_shm_extension=0);
89
void drawPixmap(const GRect &rect, int pm_x0, int pm_y0,
90
GPixmap *pm, int use_shm_extension=0);
91
void drawBitmap(const GRect &rect, GBitmap *bm,
92
int use_shm_extension=0);
93
void drawBitmap(const GRect &rect, int bm_x0, int bm_y0,
94
GBitmap *bm, int use_shm_extension=0);
95
void drawPatchedBitmap(const GRect & bm_rect, GBitmap * bm,
96
const GRect & pm_rect, GPixmap * pm,
97
int use_shm_extension=0);
98
void drawPatchedBitmaps(const GRect & bm_rect, GBitmap * bm,
99
const GPList<PatchRect> & pm_list,
100
int use_shm_extension=0);
102
// Provide wrappers for standard drawPixmap()
103
void drawPixmap(int x, int y, const QPixmap & pix,
104
int sx=0, int sy=0, int sw=-1, int sh=-1)
106
QPainter::drawPixmap(x, y, pix, sx, sy, sw, sh);
108
void drawPixmap(const QPoint & pnt, const QPixmap & pix, const QRect & sr)
110
QPainter::drawPixmap(pnt, pix, sr);
112
void drawPixmap(const QPoint & pnt, const QPixmap & pix)
114
QPainter::drawPixmap(pnt, pix);
118
QePainter(const QPaintDevice * dev) : QPainter(dev) {}
119
QePainter(const QPaintDevice * dev, const QWidget * w) :