Skip to content

Instantly share code, notes, and snippets.

@C4Code
C4Code / C4WorkSpace.m
Created February 27, 2013 18:41
Animated Image
//
// C4WorkSpace.m
//
// Created by Travis Kirton
//
#import "C4WorkSpace.h"
@implementation C4WorkSpace {
C4Image *still;
@C4Code
C4Code / C4WorkSpace.m
Created February 26, 2013 21:31
Basic Shape Mask
//
// C4WorkSpace.m
//
// Created by Travis Kirton
//
#import "C4WorkSpace.h"
@implementation C4WorkSpace {
C4Image *image;
@C4Code
C4Code / C4WorkSpace.m
Created February 21, 2013 00:59
Working with Raw Pixels
//
// C4WorkSpace.m
//
// Created by Travis Kirton
//
#import "C4WorkSpace.h"
@implementation C4WorkSpace
@C4Code
C4Code / C4WorkSpace.m
Created February 15, 2013 14:31
Rotating a small rect that traces the strokeEnd point of a circle's path.
#import "C4WorkSpace.h"
@implementation C4WorkSpace {
C4Shape *s, *sq;
}
-(void)setup {
//create a shape and style it
s = [C4Shape ellipse:CGRectMake(0, 0, 200, 200)];
s.lineWidth = 10.0f;
s.center = self.canvas.center;
@C4Code
C4Code / gist:4734984
Created February 7, 2013 22:55
zPosition example, a bit wordy.
//
// C4WorkSpace.m
//
// Created by Travis Kirton and Greg Debicki.
//
#import "C4WorkSpace.h"
@implementation C4WorkSpace {
NSArray *shapes;
@C4Code
C4Code / AnimatedShape.h
Created February 7, 2013 06:15
Don't know what to call this one...
//
// AnimatedShape.h
// C4iOS
//
// Created by Travis Kirton and Greg Debicki.
//
#import "C4Shape.h"
@interface AnimatedShape : C4Shape
@C4Code
C4Code / C4WorkSpace.m
Created February 6, 2013 18:19
A test to make sure sharing styles between shapes works.
//
// C4WorkSpace.m
//
// Created by Travis Kirton and Greg Debicki.
//
#import "C4WorkSpace.h"
@implementation C4WorkSpace {
C4Shape *shape, *shape2;
@C4Code
C4Code / C4WorkSpace.m
Created February 6, 2013 08:32
Arctangent example
//
// C4WorkSpace.m
//
// Created by Travis Kirton and Greg Debicki.
//
#import "C4WorkSpace.h"
@implementation C4WorkSpace {
C4Shape *shape, *shape2;
@C4Code
C4Code / C4WorkSpace.m
Created February 5, 2013 16:06
A filthy example of working with images and filters. This code currently shows a work-in-progress overhaul of C4Image.
//
// C4WorkSpace.m
//
// Created by Travis Kirton.
//
#import "C4WorkSpace.h"
@implementation C4WorkSpace {
C4Image *img1, *img2, *img3, *img4, *img5, *img6;
@C4Code
C4Code / C4WorkSpace.h
Last active December 12, 2015 03:58
Example of using a C4Slider to control the strokeEnd value of a C4Shape. Also highlights the use of the [C4Math sin:] method.
//
// C4WorkSpace.h
//
// Created by Travis Kirton.
//
#import "C4CanvasController.h"
@interface C4WorkSpace : C4CanvasController
-(void)adjustPathShape:(C4Slider *)sender;