Last active
August 29, 2015 13:56
-
-
Save ChristianSch/9295651 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CGFloat width = 300; | |
CGFloat height = 400; | |
AIPNGController *pngController = [[AIPNGController alloc] init]; | |
[pngController createBitmapContextWithWidth:width andHeight:height]; | |
[pngController drawLineFrom:CGPointMake(10, 10) | |
to:CGPointMake(width - 10, 10)]; | |
[pngController drawLineFrom:CGPointMake(width - 10, 10) | |
to:CGPointMake(width - 10, height * 2 / 3)]; | |
[pngController drawLineFrom:CGPointMake(width - 10, height * 2 / 3) | |
to:CGPointMake(10, height * 2 / 3)]; | |
[pngController drawLineFrom:CGPointMake(10, height * 2 / 3) | |
to:CGPointMake(width / 2, height - 10)]; | |
[pngController drawLineFrom:CGPointMake(width / 2, height - 10) | |
to:CGPointMake(width - 10, height * 2 / 3)]; | |
[pngController drawLineFrom:CGPointMake(width - 10, height * 2 / 3) | |
to:CGPointMake(10, 10)]; | |
[pngController drawLineFrom:CGPointMake(10, 10) | |
to:CGPointMake(10, height * 2 / 3)]; | |
[pngController drawLineFrom:CGPointMake(10, height * 2 / 3) | |
to:CGPointMake(width - 10, 10)]; | |
[pngController | |
saveImageToPNGWithPath:@"/Users/x/Desktop/Das-Ist-Das-Haus-Vom-Ni-ko-laus.png"]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment