chalk

kis_opengl_canvas_painter.cpp
1/*
2 * Copyright (c) 2005 Adrian Page <adrian@pagenet.plus.com>
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.g
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17 */
18
19#ifdef HAVE_CONFIG_H
20#include <config.h>
21#endif
22
23#ifdef HAVE_GL
24
25#include <kdebug.h>
26
27#include "kis_canvas.h"
28#include "kis_canvas_painter.h"
29#include "kis_opengl_canvas_painter.h"
30
31KisOpenGLCanvasPainter::KisOpenGLCanvasPainter()
32: m_active(false), m_widget(0)
33{
34}
35
36KisOpenGLCanvasPainter::KisOpenGLCanvasPainter(TQGLWidget *widget)
37 : m_active(true), m_widget(widget)
38{
39 prepareForDrawing();
40}
41
42KisOpenGLCanvasPainter::~KisOpenGLCanvasPainter()
43{
44 if (m_widget) {
45 if (m_active) {
46 end();
47 }
48 m_widget->doneCurrent();
49 }
50}
51
52bool KisOpenGLCanvasPainter::begin(KisCanvasWidget *canvasWidget, bool /*unclipped*/)
53{
54 m_widget = dynamic_cast<TQGLWidget *>(canvasWidget);
55
56 if (m_widget != 0) {
57 prepareForDrawing();
58 return true;
59 } else {
60 return false;
61 }
62 return false;
63}
64
65void KisOpenGLCanvasPainter::prepareForDrawing()
66{
67 if (m_widget != 0) {
68 m_widget->makeCurrent();
69 m_active = true;
70 save();
71 glDrawBuffer(GL_FRONT);
72 glBlendFunc(GL_ONE_MINUS_DST_COLOR, GL_ZERO);
73 glEnable(GL_BLEND);
74
75 glMatrixMode(GL_TEXTURE);
76 glLoadIdentity();
77
78 m_window = TQRect(0, 0, m_widget->width(), m_widget->height());
79 m_viewport = m_window;
80 updateViewTransformation();
81
82 glMatrixMode(GL_MODELVIEW);
83 glLoadIdentity();
84
85 setPen(m_defaultPen);
86 }
87}
88
89void KisOpenGLCanvasPainter::updateViewTransformation()
90{
91 glMatrixMode(GL_PROJECTION);
92 glLoadIdentity();
93
94 // We don't set the GL viewport directly from the TQt one as the GL
95 // has a limited size. Instead we fold it into the projection matrix.
96 glViewport(0, 0, m_widget->width(), m_widget->height());
97 glOrtho(0, m_widget->width(), m_widget->height(), 0, -1, 1);
98
99 glTranslatef(m_viewport.x(), m_viewport.y(), 0.0);
100 glScalef(static_cast<float>(m_viewport.width()) / m_window.width(),
101 static_cast<float>(m_viewport.height()) / m_window.height(),
102 1.0);
103 glTranslatef(-m_window.x(), -m_window.y(), 0.0);
104}
105
106bool KisOpenGLCanvasPainter::end()
107{
108 if (m_active) {
109 restore();
110 m_active = false;
111 return true;
112 } else {
113 return false;
114 }
115}
116
117void KisOpenGLCanvasPainter::save()
118{
119 glPushAttrib(GL_ALL_ATTRIB_BITS);
120 glMatrixMode(GL_PROJECTION);
121 glPushMatrix();
122 glMatrixMode(GL_MODELVIEW);
123 glPushMatrix();
124 glMatrixMode(GL_TEXTURE);
125 glPushMatrix();
126}
127
128void KisOpenGLCanvasPainter::restore()
129{
130 glPopAttrib();
131 glMatrixMode(GL_PROJECTION);
132 glPopMatrix();
133 glMatrixMode(GL_MODELVIEW);
134 glPopMatrix();
135 glMatrixMode(GL_TEXTURE);
136 glPopMatrix();
137}
138
139void KisOpenGLCanvasPainter::setPenStyle(TQt::PenStyle penStyle)
140{
141 if (penStyle == TQt::SolidLine) {
142 glDisable(GL_LINE_STIPPLE);
143 } else {
144 GLushort lineStipple;
145
146 switch (penStyle) {
147 case TQt::NoPen:
148 lineStipple = 0;
149 break;
150 default:
151 case TQt::DashLine:
152 lineStipple = 0x3fff;
153 break;
154 case TQt::DotLine:
155 lineStipple = 0x3333;
156 break;
157 case TQt::DashDotLine:
158 lineStipple = 0x33ff;
159 break;
160 case TQt::DashDotDotLine:
161 lineStipple = 0x333f;
162 break;
163 }
164
165 glEnable(GL_LINE_STIPPLE);
166 glLineStipple(1, lineStipple);
167 }
168}
169
170TQFontMetrics KisOpenGLCanvasPainter::fontMetrics() const
171{
172 return TQFontMetrics(TQFont());
173}
174
175TQFontInfo KisOpenGLCanvasPainter::fontInfo() const
176{
177 return TQFontInfo(TQFont());
178}
179
180const TQFont& KisOpenGLCanvasPainter::font() const
181{
182 return m_defaultFont;
183}
184
185void KisOpenGLCanvasPainter::setFont(const TQFont& /*font*/)
186{
187}
188
189const TQPen& KisOpenGLCanvasPainter::pen() const
190{
191 return m_defaultPen;
192}
193
194void KisOpenGLCanvasPainter::setPen(const TQPen& pen)
195{
196 setPenStyle(pen.style());
197}
198
199void KisOpenGLCanvasPainter::setPen(TQt::PenStyle penStyle)
200{
201 setPenStyle(penStyle);
202}
203
204void KisOpenGLCanvasPainter::setPen(const TQColor& /*color*/)
205{
206}
207
208const TQBrush& KisOpenGLCanvasPainter::brush() const
209{
210 return m_defaultBrush;
211}
212
213void KisOpenGLCanvasPainter::setBrush(const TQBrush& /*brush*/)
214{
215}
216
217void KisOpenGLCanvasPainter::setBrush(TQt::BrushStyle /*brushStyle*/)
218{
219}
220
221void KisOpenGLCanvasPainter::setBrush(const TQColor& /*color*/)
222{
223}
224
225TQPoint KisOpenGLCanvasPainter::pos() const
226{
227 return TQPoint();
228}
229
230const TQColor& KisOpenGLCanvasPainter::backgroundColor() const
231{
232 return m_defaultColor;
233}
234
235void KisOpenGLCanvasPainter::setBackgroundColor(const TQColor& /*color*/)
236{
237}
238
239TQt::BGMode KisOpenGLCanvasPainter::backgroundMode() const
240{
241 return TQt::TransparentMode;
242}
243
244void KisOpenGLCanvasPainter::setBackgroundMode(TQt::BGMode /*bgMode*/)
245{
246}
247
248TQt::TQt::RasterOp KisOpenGLCanvasPainter::rasterOp() const
249{
250 return TQt::CopyROP;
251}
252
253void KisOpenGLCanvasPainter::setRasterOp(TQt::RasterOp /*rasterOp*/)
254{
255}
256
257const TQPoint& KisOpenGLCanvasPainter::brushOrigin() const
258{
259 return m_defaultBrushOrigin;
260}
261
262void KisOpenGLCanvasPainter::setBrushOrigin(int /*x*/, int /*y*/)
263{
264}
265
266void KisOpenGLCanvasPainter::setBrushOrigin(const TQPoint& /*origin*/)
267{
268}
269
270bool KisOpenGLCanvasPainter::hasViewXForm() const
271{
272 return false;
273}
274
275bool KisOpenGLCanvasPainter::hasWorldXForm() const
276{
277 return false;
278}
279
280void KisOpenGLCanvasPainter::setViewXForm(bool /*enable*/)
281{
282}
283
284TQRect KisOpenGLCanvasPainter::window() const
285{
286 return m_window;
287}
288
289void KisOpenGLCanvasPainter::setWindow(const TQRect& r)
290{
291 m_window = r;
292 updateViewTransformation();
293}
294
295void KisOpenGLCanvasPainter::setWindow(int x, int y, int w, int h)
296{
297 setWindow(TQRect(x, y, w, h));
298}
299
300TQRect KisOpenGLCanvasPainter::viewport() const
301{
302 return m_viewport;
303}
304
305void KisOpenGLCanvasPainter::setViewport(const TQRect& r)
306{
307 m_viewport = r;
308 updateViewTransformation();
309}
310
311void KisOpenGLCanvasPainter::setViewport(int x, int y, int w, int h)
312{
313 setViewport(TQRect(x, y, w, h));
314}
315
316void KisOpenGLCanvasPainter::setWorldXForm(bool /*enable*/)
317{
318}
319
320const TQWMatrix& KisOpenGLCanvasPainter::worldMatrix() const
321{
322 return m_defaultWorldMatrix;
323}
324
325void KisOpenGLCanvasPainter::setWorldMatrix(const TQWMatrix& /*matrix*/, bool /*combine*/)
326{
327}
328
329void KisOpenGLCanvasPainter::saveWorldMatrix()
330{
331}
332
333void KisOpenGLCanvasPainter::restoreWorldMatrix()
334{
335}
336
337void KisOpenGLCanvasPainter::scale(double /*sx*/, double /*sy*/)
338{
339}
340
341void KisOpenGLCanvasPainter::shear(double /*sh*/, double /*sv*/)
342{
343}
344
345void KisOpenGLCanvasPainter::rotate(double /*a*/)
346{
347}
348
349void KisOpenGLCanvasPainter::translate(double dx, double dy)
350{
351 glMatrixMode(GL_MODELVIEW);
352 glTranslated(dx, dy, 0.0);
353}
354
355void KisOpenGLCanvasPainter::resetXForm()
356{
357}
358
359double KisOpenGLCanvasPainter::translationX() const
360{
361 return 0;
362}
363
364double KisOpenGLCanvasPainter::translationY() const
365{
366 return 0;
367}
368
369TQPoint KisOpenGLCanvasPainter::xForm(const TQPoint& point) const
370{
371 return point;
372}
373
374TQRect KisOpenGLCanvasPainter::xForm(const TQRect& r) const
375{
376 return r;
377}
378
379TQPointArray KisOpenGLCanvasPainter::xForm(const TQPointArray& pointArray) const
380{
381 return pointArray;
382}
383
384TQPointArray KisOpenGLCanvasPainter::xForm(const TQPointArray& pointArray, int /*index*/, int /*npoints*/) const
385{
386 return pointArray;
387}
388
389TQPoint KisOpenGLCanvasPainter::xFormDev(const TQPoint& point) const
390{
391 return point;
392}
393
394TQRect KisOpenGLCanvasPainter::xFormDev(const TQRect& r) const
395{
396 return r;
397}
398
399TQPointArray KisOpenGLCanvasPainter::xFormDev(const TQPointArray& pointArray) const
400{
401 return pointArray;
402}
403
404TQPointArray KisOpenGLCanvasPainter::xFormDev(const TQPointArray& pointArray, int /*index*/, int /*npoints*/) const
405{
406 return pointArray;
407}
408
409void KisOpenGLCanvasPainter::setClipping(bool /*enable*/)
410{
411}
412
413bool KisOpenGLCanvasPainter::hasClipping() const
414{
415 return true;
416}
417
418TQRegion KisOpenGLCanvasPainter::clipRegion(TQPainter::CoordinateMode /*mode*/) const
419{
420 return TQRegion();
421}
422
423void KisOpenGLCanvasPainter::setClipRect(const TQRect& /*r*/, TQPainter::CoordinateMode /*mode*/)
424{
425}
426
427void KisOpenGLCanvasPainter::setClipRect(int /*x*/, int /*y*/, int /*w*/, int /*h*/, TQPainter::CoordinateMode /*mode*/)
428{
429}
430
431void KisOpenGLCanvasPainter::setClipRegion(const TQRegion& /*rgn*/, TQPainter::CoordinateMode /*mode*/)
432{
433}
434
435void KisOpenGLCanvasPainter::drawPoint(int x, int y)
436{
437 glBegin(GL_POINTS);
438 glVertex2i(x, y);
439 glEnd();
440}
441
442void KisOpenGLCanvasPainter::drawPoint(const TQPoint& point)
443{
444 drawPoint(point.x(), point.y());
445}
446
447void KisOpenGLCanvasPainter::drawPoints(const TQPointArray& pointArray, int index, int npoints)
448{
449 int firstPointIndex = index;
450
451 if (firstPointIndex < 0) {
452 firstPointIndex = 0;
453 }
454 if (firstPointIndex > (int)pointArray.count() - 1) {
455 return;
456 }
457
458 int lastPointIndex;
459
460 if (npoints < 0) {
461 lastPointIndex = pointArray.count() - 1;
462 } else {
463 lastPointIndex = firstPointIndex + npoints;
464 if (lastPointIndex > (int)pointArray.count() - 1) {
465 lastPointIndex = pointArray.count() - 1;
466 }
467 }
468
469 glBegin(GL_POINTS);
470
471 for (int pointIndex = firstPointIndex; pointIndex <= lastPointIndex; pointIndex++) {
472 TQPoint point = pointArray.point(pointIndex);
473 glVertex2i(point.x(), point.y());
474 }
475
476 glEnd();
477}
478
479void KisOpenGLCanvasPainter::moveTo(int /*x*/, int /*y*/)
480{
481}
482
483void KisOpenGLCanvasPainter::moveTo(const TQPoint& /*point*/)
484{
485}
486
487void KisOpenGLCanvasPainter::lineTo(int /*x*/, int /*y*/)
488{
489}
490
491void KisOpenGLCanvasPainter::lineTo(const TQPoint& /*point*/)
492{
493}
494
495void KisOpenGLCanvasPainter::drawLine(int x1, int y1, int x2, int y2)
496{
497 glBegin(GL_LINES);
498 glVertex2i(x1, y1);
499 glVertex2i(x2, y2);
500 glEnd();
501}
502
503void KisOpenGLCanvasPainter::drawLine(const TQPoint& start, const TQPoint& end)
504{
505 drawLine(start.x(), start.y(), end.x(), end.y());
506}
507
508void KisOpenGLCanvasPainter::drawRect(int x, int y, int w, int h)
509{
510 glBegin(GL_LINES);
511
512 glVertex2i(x, y);
513 glVertex2i(x + w - 1, y);
514
515 glVertex2i(x + w - 1, y);
516 glVertex2i(x + w - 1, y + h - 1);
517
518 glVertex2i(x + w - 1, y + h - 1);
519 glVertex2i(x, y + h - 1);
520
521 glVertex2i(x, y + h - 1);
522 glVertex2i(x, y);
523
524 glEnd();
525}
526
527void KisOpenGLCanvasPainter::drawRect(const TQRect& r)
528{
529 drawRect(r.x(), r.y(), r.width(), r.height());
530}
531
532void KisOpenGLCanvasPainter::drawWinFocusRect(int /*x*/, int /*y*/, int /*w*/, int /*h*/)
533{
534}
535
536void KisOpenGLCanvasPainter::drawWinFocusRect(int /*x*/, int /*y*/, int /*w*/, int /*h*/, const TQColor& /*bgColor*/)
537{
538}
539
540void KisOpenGLCanvasPainter::drawWinFocusRect(const TQRect& /*r*/)
541{
542}
543
544void KisOpenGLCanvasPainter::drawWinFocusRect(const TQRect& /*r*/, const TQColor& /*bgColor*/)
545{
546}
547
548void KisOpenGLCanvasPainter::drawRoundRect(int x, int y, int w, int h, int /*xRnd*/, int /*yRnd*/)
549{
550 glBegin(GL_LINES);
551
552 glVertex2i(x, y);
553 glVertex2i(x + w - 1, y);
554
555 glVertex2i(x + w - 1, y);
556 glVertex2i(x + w - 1, y + h - 1);
557
558 glVertex2i(x + w - 1, y + h - 1);
559 glVertex2i(x, y + h - 1);
560
561 glVertex2i(x, y + h - 1);
562 glVertex2i(x, y);
563
564 glEnd();
565}
566
567void KisOpenGLCanvasPainter::drawRoundRect(const TQRect& r, int /*xRnd*/, int /*yRnd*/)
568{
569 drawRoundRect(r.x(), r.y(), r.width(), r.height());
570}
571
572// void KisOpenGLCanvasPainter::drawRoundRect(int /*x*/, int /*y*/, int /*w*/, int /*h*/, int /*xRnd*/, int /*yRnd*/)
573// {
574// }
575//
576// void KisOpenGLCanvasPainter::drawRoundRect(const TQRect& /*r*/, int /*xRnd*/, int /*yRnd*/)
577// {
578// }
579
580void KisOpenGLCanvasPainter::drawEllipse(int x, int y, int w, int h)
581{
582 TQRect r(x, y, w, h);
583 r = r.normalize();
584
585 TQPointArray points;
586
587 points.makeEllipse(r.x(), r.y(), r.width(), r.height());
588 drawPoints(points);
589}
590
591void KisOpenGLCanvasPainter::drawEllipse(const TQRect& r)
592{
593 drawEllipse(r.x(), r.y(), r.width(), r.height());
594}
595
596void KisOpenGLCanvasPainter::drawArc(int /*x*/, int /*y*/, int /*w*/, int /*h*/, int /*a*/, int /*alen*/)
597{
598}
599
600void KisOpenGLCanvasPainter::drawArc(const TQRect& /*r*/, int /*a*/, int /*alen*/)
601{
602}
603
604void KisOpenGLCanvasPainter::drawPie(int /*x*/, int /*y*/, int /*w*/, int /*h*/, int /*a*/, int /*alen*/)
605{
606}
607
608void KisOpenGLCanvasPainter::drawPie(const TQRect& /*r*/, int /*a*/, int /*alen*/)
609{
610}
611
612void KisOpenGLCanvasPainter::drawChord(int /*x*/, int /*y*/, int /*w*/, int /*h*/, int /*a*/, int /*alen*/)
613{
614}
615
616void KisOpenGLCanvasPainter::drawChord(const TQRect& /*r*/, int /*a*/, int /*alen*/)
617{
618}
619
620void KisOpenGLCanvasPainter::drawLineSegments(const TQPointArray& /*pointArray*/, int /*index*/, int /*nlines*/)
621{
622}
623
624void KisOpenGLCanvasPainter::drawPolyline(const TQPointArray& pointArray, int index, int npoints)
625{
626 int firstPointIndex = index;
627
628 if (firstPointIndex < 0) {
629 firstPointIndex = 0;
630 }
631 if (firstPointIndex > (int)pointArray.count() - 2) {
632 return;
633 }
634
635 int lastPointIndex;
636
637 if (npoints < 0) {
638 lastPointIndex = pointArray.count() - 1;
639 } else {
640 lastPointIndex = firstPointIndex + npoints - 1;
641 if (lastPointIndex > (int)pointArray.count() - 1) {
642 lastPointIndex = pointArray.count() - 1;
643 }
644 }
645
646 if (firstPointIndex >= lastPointIndex) {
647 return;
648 }
649
650 glBegin(GL_LINES);
651
652 for (int pointIndex = firstPointIndex; pointIndex <= lastPointIndex; pointIndex++) {
653 TQPoint point = pointArray.point(pointIndex);
654 glVertex2i(point.x(), point.y());
655 }
656
657 glEnd();
658}
659
660void KisOpenGLCanvasPainter::drawPolygon(const TQPointArray& /*pointArray*/, bool /*winding*/, int /*index*/, int /*npoints*/)
661{
662}
663
664void KisOpenGLCanvasPainter::drawConvexPolygon(const TQPointArray& /*pointArray*/, int /*index*/, int /*npoints*/)
665{
666}
667
668TQPoint midpoint (const TQPoint& P1, const TQPoint& P2)
669{
670 TQPoint temp;
671 temp.setX((P1.x()+P2.x())/2);
672 temp.setY((P1.y()+P2.y())/2);
673 return temp;
674}
675
676#define MAX_LEVEL 5
677
678void recursiveCurve (const TQPoint& P1, const TQPoint& P2, const TQPoint& P3,
679 const TQPoint& P4, int level, TQValueList<TQPoint>& dest)
680{
681 if (level > MAX_LEVEL) {
682 dest.append(midpoint(P1,P4));
683 return;
684 }
685
686 TQPoint L1, L2, L3, L4;
687 TQPoint H, R1, R2, R3, R4;
688
689 L1 = P1;
690 L2 = midpoint(P1, P2);
691 H = midpoint(P2, P3);
692 R3 = midpoint(P3, P4);
693 R4 = P4;
694 L3 = midpoint(L2, H);
695 R2 = midpoint(R3, H);
696 L4 = midpoint(L3, R2);
697 R1 = L4;
698 recursiveCurve(L1, L2, L3, L4, level + 1, dest);
699 recursiveCurve(R1, R2, R3, R4, level + 1, dest);
700}
701
702void KisOpenGLCanvasPainter::drawCubicBezier(const TQPointArray& pointArray, int index)
703{
704 TQPoint P1, P2, P3, P4;
705 TQValueList<TQPoint> dest;
706 P1 = pointArray[index++];
707 P2 = pointArray[index++];
708 P3 = pointArray[index++];
709 P4 = pointArray[index];
710
711 recursiveCurve(P1, P2, P3, P4, 1, dest);
712
713 glBegin(GL_LINE_STRIP);
714
715 glVertex2i(P1.x(), P1.y());
716 for (TQValueList<TQPoint>::iterator it = dest.begin(); it != dest.end(); it++) {
717 TQPoint point = (*it);
718 glVertex2i(point.x(), point.y());
719 }
720 glVertex2i(P4.x(), P4.y());
721
722 glEnd();
723}
724
725void KisOpenGLCanvasPainter::drawPixmap(int /*x*/, int /*y*/, const TQPixmap& /*pixmap*/, int /*sx*/, int /*sy*/, int /*sw*/, int /*sh*/)
726{
727}
728
729void KisOpenGLCanvasPainter::drawPixmap(const TQPoint& /*point*/, const TQPixmap& /*pixmap*/, const TQRect& /*sr*/)
730{
731}
732
733void KisOpenGLCanvasPainter::drawPixmap(const TQPoint& /*point*/, const TQPixmap& /*pixmap*/)
734{
735}
736
737void KisOpenGLCanvasPainter::drawPixmap(const TQRect& /*r*/, const TQPixmap& /*pixmap*/)
738{
739}
740
741void KisOpenGLCanvasPainter::drawImage(int /*x*/, int /*y*/, const TQImage& /*image*/, int /*sx*/, int /*sy*/, int /*sw*/, int /*sh*/, int /*conversionFlags*/)
742{
743}
744
745void KisOpenGLCanvasPainter::drawImage(const TQPoint& /*point*/, const TQImage& /*image*/, const TQRect& /*sr*/, int /*conversionFlags*/)
746{
747}
748
749void KisOpenGLCanvasPainter::drawImage(const TQPoint& /*point*/, const TQImage& /*image*/, int /*conversion_flags*/)
750{
751}
752
753void KisOpenGLCanvasPainter::drawImage(const TQRect& /*r*/, const TQImage& /*image*/)
754{
755}
756
757void KisOpenGLCanvasPainter::drawTiledPixmap(int /*x*/, int /*y*/, int /*w*/, int /*h*/, const TQPixmap& /*pixmap*/, int /*sx*/, int /*sy*/)
758{
759}
760
761void KisOpenGLCanvasPainter::drawTiledPixmap(const TQRect& /*r*/, const TQPixmap& /*pixmap*/, const TQPoint& /*point*/)
762{
763}
764
765void KisOpenGLCanvasPainter::drawTiledPixmap(const TQRect& /*r*/, const TQPixmap& /*pixmap*/)
766{
767}
768
769void KisOpenGLCanvasPainter::fillRect(int x, int y, int w, int h, const TQBrush& /*brush*/)
770{
771 // XXX: Set brush
772 glRecti(x, y, x + w, y + h);
773}
774
775void KisOpenGLCanvasPainter::fillRect(const TQRect& r, const TQBrush& brush)
776{
777 fillRect(r.x(), r.y(), r.width(), r.height(), brush);
778}
779
780void KisOpenGLCanvasPainter::eraseRect(int /*x*/, int /*y*/, int /*w*/, int /*h*/)
781{
782}
783
784void KisOpenGLCanvasPainter::eraseRect(const TQRect& /*r*/)
785{
786}
787
788void KisOpenGLCanvasPainter::drawText(int /*x*/, int /*y*/, const TQString& /*text*/, int /*len*/, TQPainter::TextDirection /*dir*/)
789{
790}
791
792void KisOpenGLCanvasPainter::drawText(const TQPoint& /*point*/, const TQString& /*text*/, int /*len*/, TQPainter::TextDirection /*dir*/)
793{
794}
795
796void KisOpenGLCanvasPainter::drawText(int /*x*/, int /*y*/, const TQString& /*text*/, int /*pos*/, int /*len*/, TQPainter::TextDirection /*dir*/)
797{
798}
799
800void KisOpenGLCanvasPainter::drawText(const TQPoint& /*point*/, const TQString& /*text*/, int /*pos*/, int /*len*/, TQPainter::TextDirection /*dir*/)
801{
802}
803
804void KisOpenGLCanvasPainter::drawText(int /*x*/, int /*y*/, int /*w*/, int /*h*/, int /*flags*/, const TQString& /*text*/, int /*len*/, TQRect */*br*/, TQTextParag **/*intern*/)
805{
806}
807
808void KisOpenGLCanvasPainter::drawText(const TQRect& /*r*/, int /*flags*/, const TQString& /*text*/, int /*len*/, TQRect */*br*/, TQTextParag **/*intern*/)
809{
810}
811
812void KisOpenGLCanvasPainter::drawTextItem(int /*x*/, int /*y*/, const TQTextItem& /*ti*/, int /*textflags*/)
813{
814}
815
816void KisOpenGLCanvasPainter::drawTextItem(const TQPoint& /*p*/, const TQTextItem& /*ti*/, int /*textflags*/)
817{
818}
819
820TQRect KisOpenGLCanvasPainter::boundingRect(int /*x*/, int /*y*/, int /*w*/, int /*h*/, int /*flags*/, const TQString& /*text*/, int /*len*/, TQTextParag **/*intern*/)
821{
822 return TQRect();
823}
824
825TQRect KisOpenGLCanvasPainter::boundingRect(const TQRect& /*r*/, int /*flags*/, const TQString& /*text*/, int /*len*/, TQTextParag **/*intern*/)
826{
827 return TQRect();
828}
829
830int KisOpenGLCanvasPainter::tabStops() const
831{
832 return 0;
833}
834
835void KisOpenGLCanvasPainter::setTabStops(int /*ts*/)
836{
837}
838
839int *KisOpenGLCanvasPainter::tabArray() const
840{
841 return 0;
842}
843
844void KisOpenGLCanvasPainter::setTabArray(int */*ts*/)
845{
846}
847
848#endif // HAVE_GL
849