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
################################################################################ | |
# .gitattributes | |
# | |
# Version 1.1 | |
################################################################################ | |
### | |
### Documents Files | |
### | |
*.pdf binary |
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
################################################################################ | |
# .gitignore file for my projects | |
# | |
# Version 1.3.4 | |
# 1. Add TeX ignore list. | |
################################################################################ | |
### | |
### Special Files Should be Ignored for this Probject | |
### |
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
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions | |
{ | |
self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease]; | |
MyView* mv = [[MyView alloc] initWithFrame:CGRectMake(0, 0, self.window.bounds.size.width - 50, 150)]; | |
mv.center = self.window.center; | |
[self.window addSubview:mv]; | |
mv.opaque = NO; | |
mv.tag = 111; | |
mv.backgroundColor = [UIColor whiteColor]; |
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
void drawStripes(void *info, CGContextRef con) | |
{ | |
// assume 4x4 cell | |
CGContextSetFillColorWithColor(con, [[UIColor redColor] CGColor]); | |
CGContextFillRect(con, CGRectMake(0, 2, 4, 2)); | |
CGContextSetFillColorWithColor(con, [[UIColor blueColor] CGColor]); | |
CGContextFillRect(con, CGRectMake(0, 0, 4, 2)); | |
} | |
void drawArrow(CGContextRef con) |
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
void drawStripes(void *info, CGContextRef con) | |
{ | |
// assume 4x4 cell | |
CGContextSetFillColorWithColor(con, [[UIColor redColor] CGColor]); | |
CGContextFillRect(con, CGRectMake(0, 2, 4, 2)); | |
CGContextSetFillColorWithColor(con, [[UIColor blueColor] CGColor]); | |
CGContextFillRect(con, CGRectMake(0, 0, 4, 2)); | |
} | |
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
- (void)drawRect:(CGRect)rect | |
{ | |
// assume the background color is white | |
CGContextRef con = UIGraphicsGetCurrentContext(); | |
// punch triangle hole in context clipping region | |
CGContextMoveToPoint(con, 90, 100); | |
CGContextAddLineToPoint(con, 100, 90); | |
CGContextAddLineToPoint(con, 110, 100); |
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
- (void)drawRect:(CGRect)rect | |
{ | |
// assume the background color is white | |
CGContextRef con = UIGraphicsGetCurrentContext(); | |
CGContextSaveGState(con); | |
// punch triangle hole in context clipping region | |
CGContextMoveToPoint(con, 90, 100); | |
CGContextAddLineToPoint(con, 100, 90); |