Skip to content

Instantly share code, notes, and snippets.

@C4Code
C4Code / C4WorkSpace.m
Created January 20, 2013 23:37
More complex example of using the perspectiveDistance property
//
// C4WorkSpace.m
// test
//
// Created by moi on 13-01-20.
// Copyright (c) 2013 moi. All rights reserved.
//
#import "C4WorkSpace.h"
@C4Code
C4Code / C4WorkSpace.m
Created January 20, 2013 23:39
Simple example using the perspectiveDistance property
//
// C4WorkSpace.m
//
// Created by Travis Kirton
//
#import "C4WorkSpace.h"
@implementation C4WorkSpace {
C4Image *image;
@C4Code
C4Code / C4WorkSpace.m
Created January 23, 2013 03:50
Example showing how to add multiple objects to the canvas or any other visible object.
//
// C4WorkSpace.m
//
// Created by Travis Kirton
//
#import "C4WorkSpace.h"
@implementation C4WorkSpace {
C4Shape *s;
@C4Code
C4Code / C4WorkSpace.m
Created January 23, 2013 05:05
Difference between scaling and doubling the size of a bezier path... Scaling actually distorts the size of the shape's border.
@implementation C4WorkSpace {
C4Shape *s, *t;
}
-(void)setup {
s = [C4Shape rect:CGRectMake(20, 20, 100, 100)];
[self.canvas addShape:s];
t = [C4Shape rect:CGRectMake(400, 20, 100, 100)];
[self.canvas addShape:t];
@C4Code
C4Code / C4WorkSpace.m
Created January 24, 2013 20:48
Example of tying the movement of two objects together with Listeners and Gestures
//
// C4WorkSpace.m
//
// Created by Travis Kirton
//
#import "C4WorkSpace.h"
@implementation C4WorkSpace {
C4Shape *s1, *s2;
@C4Code
C4Code / C4WorkSpace.m
Created January 24, 2013 22:49
Example of a custom slider. You can copy the contents of C4WorkSpace, and then drag / drop the other two files into your project.
//
// Slider.h
//
// Created by Travis Kirton.
//
#import "C4WorkSpace.h"
#import "Slider.h"
@implementation C4WorkSpace {
@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;
@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.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 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;