Apple Shake 4 User Manual

Page 388

Advertising
background image

388

Chapter 14

Customizing Shake

float xScale = 1,
float yScale = 1,
float xCenter = width/2,
float yCenter = height/2

This gives you the border and center controls to change the scale center. You can grab
a corner to scale X and Y, or an edge to scale X or Y.

CornerPin Controls

In the startup macro file:

float x0 = 0,
float y0 = 0,
float x1 = width,
float y1 = 0,
float x2 = width,
float y2 = height,
float x3 = 0,
float y3 = height

In the ui file:

nuiPushControlGroup(“Func.Corner Controls”);

nuiGroupControl(“Func.x0”);
nuiGroupControl(“Func.y0”);
nuiGroupControl(“Func.x1”);
nuiGroupControl(“Func.y1”);
nuiGroupControl(“Func.x2”);
nuiGroupControl(“Func.y2”);
nuiGroupControl(“Func.x3”);
nuiGroupControl(“Func.y3”);

nuiPopControlGroup();

Grab any corner or the crosshairs in the middle to adjust the position of your image.
The grouping code for the ui file is included, so you do not have to look at all eight
parameters in your list.

Advertising