mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-26 14:15:32 +00:00
delete Painter::fillPolygon() and associated frontend implementations
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14410 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
7e81f3f99a
commit
a1b60fb963
@ -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,
|
||||
|
@ -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<Gdk::Point> 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)
|
||||
{
|
||||
|
@ -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,
|
||||
|
@ -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) {}
|
||||
///
|
||||
|
@ -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<QCOORD> 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)
|
||||
{
|
||||
|
@ -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,
|
||||
|
@ -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<QPoint> 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)
|
||||
{
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user