Skip to content

Instantly share code, notes, and snippets.

@DanielUranga
Created October 21, 2012 05:38
Show Gist options
  • Save DanielUranga/3926022 to your computer and use it in GitHub Desktop.
Save DanielUranga/3926022 to your computer and use it in GitHub Desktop.
Ginga attrCrop
img = canvas:new("image.jpg");
img2 = canvas:new(400, 400);
img:attrCrop(10,10,20,20);
img2:compose(0, 0, img);
img:attrCrop(30,10,20,20);
img2:compose(30, 0, img);
canvas:compose(20, 20, img2);
canvas:flush();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment