fix draw-arc to skip drawing instead of setting the scale to 0

svn: r16502
This commit is contained in:
Matthew Flatt 2009-11-02 16:22:10 +00:00
parent 16e3ee3e6c
commit b877098bac

View File

@ -1217,16 +1217,20 @@ void wxWindowDC::DrawArc(double x, double y, double w, double h, double start, d
yy = SmoothingXFormY(y); yy = SmoothingXFormY(y);
ww = SmoothingXFormWL(w, x); ww = SmoothingXFormWL(w, x);
hh = SmoothingXFormHL(h, y); hh = SmoothingXFormHL(h, y);
cairo_set_matrix_create(m); if ((ww > 0.0) && (hh > 0.0)) {
cairo_current_matrix (CAIRO_DEV, m); cairo_save(CAIRO_DEV);
cairo_translate(CAIRO_DEV, xx, yy); cairo_set_matrix_create(m);
cairo_scale(CAIRO_DEV, ww, hh); cairo_current_matrix (CAIRO_DEV, m);
cairo_new_path(CAIRO_DEV); cairo_translate(CAIRO_DEV, xx, yy);
cairo_arc_negative(CAIRO_DEV, 0.5, 0.5, 0.5, start, end); cairo_scale(CAIRO_DEV, ww, hh);
cairo__set_matrix(CAIRO_DEV, m); cairo_new_path(CAIRO_DEV);
cairo_stroke(CAIRO_DEV); cairo_arc_negative(CAIRO_DEV, 0.5, 0.5, 0.5, start, end);
cairo_matrix_destroy(m); cairo__set_matrix(CAIRO_DEV, m);
cairo_stroke(CAIRO_DEV);
cairo_restore(CAIRO_DEV);
cairo_matrix_destroy(m);
}
} }
return; return;