[cairo-bugs] [Bug 4441] inverse transformation of line width

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Wed Sep 14 14:05:17 PDT 2005

Please do not reply to this email: if you want to comment on the bug, go to    
the URL shown below and enter yourcomments there.     

------- Additional Comments From ababo at jura.hu  2005-09-14 14:05 -------
Talking about compatibility, please try out this code and explain the output.

void lwt(HDC hdc, int width, int height) {
	cairo_surface_t *surface = cairo_win32_surface_create(hdc);
	cairo_t *cr = cairo_create(surface);

	cairo_rectangle(cr, width*0.1, height*0.1, width*0.8, height*0.8);

	cairo_move_to(cr, width*0.2, height*0.2);
	cairo_scale(cr, width, height);

	cairo_rel_line_to(cr, 0.6, 0.0);
	cairo_rel_line_to(cr, 0.0, 0.6);
	cairo_rel_line_to(cr, -0.6, 0.0);
	cairo_rel_line_to(cr, 0.0, -0.6);

	cairo_rectangle(cr, 0.3, 0.3, 0.4, 0.4);



Now add this line after the scale operation and try again.
	cairo_set_line_width(cr, 1.0/width);

The scale doesn't effect the drawing position what I set before the
transformation as expected, but changed the effective line width. Do you really
like the current behaviour?          
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email         
------- You are receiving this mail because: -------
You are the QA contact for the bug, or are watching the QA contact.

More information about the cairo-bugs mailing list