SHPolygon

type:
extension
author:
Shilo White
description:
A Sparrow 2.X extension for polygon shapes and polygon-shaped images.
lastupdate:
2013-08-30
compatible:
v2.0
tag:
polygon, shape, image, texture
homepage:
https://gist.github.com/6389843
download:
https://gist.github.com/gists/6389843/download

Usage

#import "SHPolygon.h"
 
SHPolygon *polygon = [SHPolygon polygonWithRadius:100.0f numEdges:5 color:0xffffff];
[self addChild:polygon];
 
SHPolygonImage *polygonImage = [SHPolygonImage polygonImageWithContentsOfFile:@"image.png" radius:100.0f numEdges:360];
[self addChild:polygonImage];

Demo Project

Source Code

  users/shilo/extensions/shpolygon2.txt · Last modified: 2013/08/30 16:01 by shilo
 
Powered by DokuWiki