summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2010-08-13 10:59:40 +0000
committerMichael Drake <tlsa@netsurf-browser.org>2010-08-13 10:59:40 +0000
commit0612abef63eaf0b9d5bcdb32d99dd03d4ee206a9 (patch)
tree98f6855e47c6afa10cb7cca95f2ceb2690ec8958
parent01dc1ff4354b10c264c490c43256e9153ee0b15c (diff)
downloadnetsurf-0612abef63eaf0b9d5bcdb32d99dd03d4ee206a9.tar.gz
netsurf-0612abef63eaf0b9d5bcdb32d99dd03d4ee206a9.tar.bz2
Delete dead code and tweak polygon plotter. Still wrong, but better.
svn path=/trunk/netsurf/; revision=10692
-rw-r--r--beos/beos_plotters.cpp40
1 files changed, 1 insertions, 39 deletions
diff --git a/beos/beos_plotters.cpp b/beos/beos_plotters.cpp
index fac5ad249..120d7f935 100644
--- a/beos/beos_plotters.cpp
+++ b/beos/beos_plotters.cpp
@@ -302,7 +302,7 @@ bool nsbeos_plot_polygon(const int *p, unsigned int n, const plot_style_t *style
BPoint points[n];
for (i = 0; i < n; i++) {
- points[i] = BPoint(p[2 * i], p[2 * i + 1]);
+ points[i] = BPoint(p[2 * i] - 0.5, p[2 * i + 1] - 0.5);
}
if (style->fill_colour == NS_TRANSPARENT)
@@ -310,44 +310,6 @@ bool nsbeos_plot_polygon(const int *p, unsigned int n, const plot_style_t *style
else
view->FillPolygon(points, (int32)n);
-#if 0
- view->BeginLineArray(n);
-
- for (i = 0; i < n; i++) {
- BPoint start(p[2 * i], p[2 * i + 1]);
- BPoint end(p[(2 * i + 2) % n], p[(2 * i + 3) % n]);
- view->AddLine(start, end, color);
- }
-
- view->EndLineArray();
-#endif
-
- //nsbeos_current_gc_unlock();
-
-#if 0 /* GTK */
- nsbeos_set_colour(fill);
- nsbeos_set_solid();
-#ifdef CAIRO_VERSION
- if (option_render_cairo) {
- cairo_set_line_width(current_cr, 0);
- cairo_move_to(current_cr, p[0], p[1]);
- for (i = 1; i != n; i++) {
- cairo_line_to(current_cr, p[i * 2], p[i * 2 + 1]);
- }
- cairo_fill(current_cr);
- cairo_stroke(current_cr);
- } else
-#endif
- {
- GdkPoint q[n];
- for (i = 0; i != n; i++) {
- q[i].x = p[i * 2];
- q[i].y = p[i * 2 + 1];
- }
- gdk_draw_polygon(current_drawable, current_gc,
- TRUE, q, n);
- }
-#endif
return true;
}