quattro_4 scribble

scribble 落書き (調べた事をただ落書きする)

NSScreencast Episode #33 Core Graphics: Polygons

Core Graphics: Polygons - NSScreencast

Sliderを動かして、正n角形を描画

  • PolygonView
  • CGMutablePathRef path = CGPathCreateMutable();
    • CGPathCloseSubpath(path);
    • CGContextAddPath(context, path);
    • CGContextFillPath(context);
  • self.numberOfSides
    • setNumberOfSides
  • CGContextClip(context);
    • 背景を現在のpath内のみに設定