Add :scale shortcut to width/height of png and svg
Allows scaling while keeping the aspect ratio Closes #91
This commit is contained in:
@@ -42,6 +42,34 @@ cairo: set_source([ImageSurface, 305, 50])
|
||||
cairo: paint([1.0])
|
||||
cairo: restore([])
|
||||
cairo: save([])
|
||||
cairo: translate([200, 350])
|
||||
cairo: rotate([0])
|
||||
cairo: scale([0.2734375, 0.2734375])
|
||||
cairo: render_rsvg_handle([RSVG::Handle, nil])
|
||||
cairo: restore([])
|
||||
cairo: save([])
|
||||
cairo: translate([200, 390])
|
||||
cairo: rotate([0])
|
||||
cairo: scale([0.2734375, 0.2734375])
|
||||
cairo: render_rsvg_handle([RSVG::Handle, nil])
|
||||
cairo: restore([])
|
||||
cairo: save([])
|
||||
cairo: translate([240, 350])
|
||||
cairo: scale([0.2734375, 0.2734375])
|
||||
cairo: rotate([0])
|
||||
cairo: translate([-240, -350])
|
||||
cairo: set_source([ImageSurface, 240, 350])
|
||||
cairo: paint([1.0])
|
||||
cairo: restore([])
|
||||
cairo: save([])
|
||||
cairo: translate([240, 390])
|
||||
cairo: scale([0.2734375, 0.2734375])
|
||||
cairo: rotate([0])
|
||||
cairo: translate([-240, -390])
|
||||
cairo: set_source([ImageSurface, 240, 390])
|
||||
cairo: paint([1.0])
|
||||
cairo: restore([])
|
||||
cairo: save([])
|
||||
cairo: translate([50, 350])
|
||||
cairo: rotate([0])
|
||||
cairo: scale([0.5859375, 0.5859375])
|
||||
|
||||
Reference in New Issue
Block a user