Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 18 lines (13 sloc) 0.622 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
/*
* CoreGraphicsHelper.h
* PSFoundation
*
* Created by Matthias Tretter on 16.02.11.
* Copyright 2011 @myell0w. All rights reserved.
*
* Taken from http://iphonedevelopment.blogspot.com/2011/02/couple-cgaffinetransform-goodies.html
*/



// returns a matrix that rotates and translates at one time
#define CGAffineTransformMakeRotateTranslate(angle, dx, dy) CGAffineTransformMake(cosf(angle), sinf(angle), -sinf(angle), cosf(angle), dx, dy)

// returns a matrix that scales and translates at one time
#define CGAffineTransformMakeScaleTranslate(sx, sy, dx, dy) CGAffineTransformMake(sx, 0.f, 0.f, sy, dx, dy)
Something went wrong with that request. Please try again.