2013-09-04から1日間の記事一覧
// 画面の準備(まあ、呪文のようなものです。アブダカダブラ。) if (context!=NULL) { CGContextRelease(context); context=NULL; } context=UIGraphicsGetCurrentContext(); CGContextRetain(context); // 画面を真っ黒に塗って、全部消す。(それからあ…
(2014.1.4追記) iOS7になってテキスト描画に変更が生じました。なんでこんなに長くなったのか; NSString* s=@"hogehoge"; UIFont* font=[UIFont fontWithName:@"ArialRoundedMTBold" size:18]; [s drawAtPoint:CGPointMake(20,0) withAttributes:[NSDictio…
[[p_bmp objectAtIndex:pid] drawAtPoint:(CGPointMake(px,py))];
for (int di=0;di
// タッチパネル操作 -(void)touchesBegan:(NSSet*)touches withEvent:(UIEvent*)event { lastPoint = [[touches anyObject] locationInView:self.superview]; } -(void)touchesMoved:(NSSet*)touches withEvent:(UIEvent*)event { // タッチした座標を取得 …