From: Abdelrazak Younes Date: Mon, 10 Jul 2006 15:14:29 +0000 (+0000) Subject: delete Painter::fillPolygon() and associated frontend implementations X-Git-Tag: 1.6.10~12962 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=a1b60fb96372281c1087de1ba28c876b2e894c76;p=features.git delete Painter::fillPolygon() and associated frontend implementations git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14410 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/frontends/Painter.h b/src/frontends/Painter.h index 9680acb2e2..3bf36843d6 100644 --- a/src/frontends/Painter.h +++ b/src/frontends/Painter.h @@ -112,13 +112,6 @@ public: int w, int h, LColor_color) = 0; - /// draw a filled (irregular) polygon (UNUSED, could be removed) - virtual void fillPolygon( - int const * xp, - int const * yp, - int np, - LColor_color) = 0; - /// draw an arc virtual void arc( int x, int y, diff --git a/src/frontends/gtk/GPainter.C b/src/frontends/gtk/GPainter.C index 2d38d771ab..594cdf0565 100644 --- a/src/frontends/gtk/GPainter.C +++ b/src/frontends/gtk/GPainter.C @@ -170,20 +170,6 @@ void GPainter::fillRectangle(int x, int y, int w, int h, } -void GPainter::fillPolygon(int const * xp, int const * yp, - int np, LColor_color col) -{ - setForeground(col); - std::vector points(np); - - for (int i = 0; i < np; ++i) { - points[i].set_x(xp[i]); - points[i].set_y(yp[i]); - } - pixmap_->draw_polygon(gc_, true, points); -} - - void GPainter::arc(int x, int y, unsigned int w, unsigned int h, int a1, int a2, LColor_color col) { diff --git a/src/frontends/gtk/GPainter.h b/src/frontends/gtk/GPainter.h index 87af62724b..ff1eaba4fb 100644 --- a/src/frontends/gtk/GPainter.h +++ b/src/frontends/gtk/GPainter.h @@ -79,13 +79,6 @@ public: int w, int h, LColor_color); - /// draw a filled (irregular) polygon - virtual void fillPolygon( - int const * xp, - int const * yp, - int np, - LColor_color); - /// draw an arc virtual void arc( int x, int y, diff --git a/src/frontends/nullpainter.h b/src/frontends/nullpainter.h index 6dc5629d89..2a5e5d6fd6 100644 --- a/src/frontends/nullpainter.h +++ b/src/frontends/nullpainter.h @@ -48,8 +48,6 @@ public: /// void fillRectangle(int, int, int, int, LColor_color) {} /// - void fillPolygon(int const *, int const *, int, LColor_color) {} - /// void arc(int, int, unsigned int, unsigned int, int, int, LColor_color) {} /// diff --git a/src/frontends/qt3/QLPainter.C b/src/frontends/qt3/QLPainter.C index 4b15ad53d2..dfb9e6f1c4 100644 --- a/src/frontends/qt3/QLPainter.C +++ b/src/frontends/qt3/QLPainter.C @@ -138,26 +138,6 @@ void QLPainter::fillRectangle(int x, int y, int w, int h, LColor_color col) } -void QLPainter::fillPolygon(int const * xp, int const * yp, - int np, LColor_color col) -{ - // Must use new as np is not known at compile time. - boost::scoped_array points(new QCOORD[np * 2]); - - //if (1) return; - - for (int i = 0, j = 0; i < np; ++i) { - points[j++] = xp[i]; - points[j++] = yp[i]; - } - - setPen(col); - qp_->setBrush(lcolorcache.get(col)); - qp_->drawPolygon(QPointArray(np, points.get())); - qp_->setBrush(Qt::NoBrush); -} - - void QLPainter::arc(int x, int y, unsigned int w, unsigned int h, int a1, int a2, LColor_color col) { diff --git a/src/frontends/qt3/QLPainter.h b/src/frontends/qt3/QLPainter.h index fad5060cd9..19f1111d59 100644 --- a/src/frontends/qt3/QLPainter.h +++ b/src/frontends/qt3/QLPainter.h @@ -80,13 +80,6 @@ public: int w, int h, LColor_color); - /// draw a filled (irregular) polygon - virtual void fillPolygon( - int const * xp, - int const * yp, - int np, - LColor_color); - /// draw an arc virtual void arc( int x, int y, diff --git a/src/frontends/qt4/QLPainter.C b/src/frontends/qt4/QLPainter.C index 8bc90f1d92..a8d5e30aa7 100644 --- a/src/frontends/qt4/QLPainter.C +++ b/src/frontends/qt4/QLPainter.C @@ -156,24 +156,6 @@ void QLPainter::fillRectangle(int x, int y, int w, int h, LColor_color col) } -void QLPainter::fillPolygon(int const * xp, int const * yp, - int np, LColor_color col) -{ - // Must use new as np is not known at compile time. - boost::scoped_array points(new QPoint[np]); - - for (int i = 0; i < np; ++i) { - points[i].setX(xp[i]); - points[i].setY(yp[i]); - } - - setQPainterPen(col); - qp_->setBrush(lcolorcache.get(col)); - qp_->drawPolygon(points.get(), np); - qp_->setBrush(Qt::NoBrush); -} - - void QLPainter::arc(int x, int y, unsigned int w, unsigned int h, int a1, int a2, LColor_color col) { diff --git a/src/frontends/qt4/QLPainter.h b/src/frontends/qt4/QLPainter.h index 2630ade316..6ba5ff6b4f 100644 --- a/src/frontends/qt4/QLPainter.h +++ b/src/frontends/qt4/QLPainter.h @@ -85,13 +85,6 @@ public: int w, int h, LColor_color); - /// draw a filled (irregular) polygon - virtual void fillPolygon( - int const * xp, - int const * yp, - int np, - LColor_color); - /// draw an arc virtual void arc( int x, int y,