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

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Tue Sep 13 06:01:54 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.     
   
https://bugs.freedesktop.org/show_bug.cgi?id=4441          
     
           Summary: inverse transformation of line width
           Product: cairo
           Version: 1.0.0
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: general
        AssignedTo: cworth at cworth.org
        ReportedBy: ababo at jura.hu
         QAContact: cairo-bugs at cairographics.org


When applying a scaling transformation it would be better to do an inverse
transformation of the current line width to keep the effective line width the same.

It's a common practice to set the line width in pixel dimensions then apply a
scaling and translation to match the modeling transformation. Now the previous
line width remains the same number, i.e. this will scale like the model, which
is counterproductive. Try this snippet to get a better understanding of my problem:

  cairo_set_line_width(cr, 1);  // one pixel  wide line

  cairo_scale(cr, width, height); // window dimensions in pixel
	
  cairo_move_to(cr, 0.1, 0.1);  // a rectangle in relative dimensions
  cairo_rel_line_to(cr, 0.8, 0);
  cairo_rel_line_to(cr, 0, 0.8);
  cairo_rel_line_to(cr, -0.8, 0);
  cairo_close_path(cr);          
     
     
--           
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