Skip to content

Instantly share code, notes, and snippets.

@Nunocky
Created April 27, 2014 03:10
Show Gist options
  • Save Nunocky/11336762 to your computer and use it in GitHub Desktop.
Save Nunocky/11336762 to your computer and use it in GitHub Desktop.
NSAffineTransformのメモ ref: http://qiita.com/Nunocky/items/39df4c19a0a0747dde91
NSAffineTransform *trans1 = [NSAffineTransform transform];
[trans1 translateXBy: 10 yBy: 10];
[trans1 concat];
[self drawLineWithColor:[NSColor redColor]];
[trans1 concat];
[self drawLineWithColor:[NSColor greenColor]];
// .....
NSAffineTransform *trans = [NSAffineTransform transform];
[self drawLineWithColor:[NSColor blackColor]];
[trans translateXBy: 10 yBy: 10];
[trans concat];
[self drawLineWithColor:[NSColor redColor]];
[trans translateXBy: 10 yBy: 10];
[trans concat];
[self drawLineWithColor:[NSColor greenColor]];
// .....
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment