#include "cairo.h" int main() { cairo_surface_t *surf = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, 400, 400); cairo_t *cr = cairo_create (surf); double scale = 1e250; cairo_rectangle (cr, 0,0, 1,1); { /* same as cairo_scale (cr, scale, scale); but we can't do * that because it updates the inverse without doing a * determinant computation as in _cairo_matrix_invert(). */ cairo_matrix_t m; m.xx = scale; m.xy = 0; m.yx = 0; m.yy = scale; m.x0 = 0; m.y0 = 0; cairo_set_matrix (cr, &m); } cairo_set_line_width (cr, 1.0/scale); cairo_stroke (cr); cairo_destroy (cr); cairo_surface_destroy (surf); return 0; }