[cairo-bugs] [Bug 20091] Polygon clipping to surface fails for certain values of vertices

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Thu Feb 12 19:17:26 PST 2009


http://bugs.freedesktop.org/show_bug.cgi?id=20091





--- Comment #4 from cu <cairouser at yahoo.com>  2009-02-12 19:17:24 PST ---
(From update of attachment 22882)
#include <stdlib.h>
#include <stdio.h>
#include <cairo.h>


int main(int ac, char **av)
{
   double x1, y1;
   cairo_surface_t   *surf;
   cairo_t *cr;


   surf = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, 1000, 500);

   cr = cairo_create(surf);



   //cairo_surface_set_device_offset(surf, (-1. * x1 / 2.), y1 / 2.);
   //cairo_surface_set_device_offset(surf, 1000., 500.);

   cairo_new_path(cr);
   cairo_move_to(cr, 1000, -49000000);
   cairo_line_to(cr,  1000, 40000000);
   cairo_line_to(cr, -1000, 40000000);
   cairo_line_to(cr, -1000, -49000000);
   cairo_close_path(cr);
   cairo_set_source_rgb(cr, 1., 0., 0.);
   cairo_fill(cr);

   cairo_destroy(cr);

   cairo_surface_write_to_png(surf, "test.png");
   cairo_surface_destroy(surf);


   return 0;
}


-- 
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the cairo-bugs mailing list