2

I am working with the C4 Alpha and I've added a small movie to the canvas but I don't know how to rotate it into the right position.

Here's my code:

-(void)setup {
C4Movie *newMovie = [C4Movie movieNamed:@"IMG_0009.MOV"];
newMovie.center = CGPointMake(384,512);
[self.canvas addMovie:newMovie];
}

Thank you.

Randolpho
  • 55,384
  • 17
  • 145
  • 179
Greg Debicki
  • 235
  • 2
  • 6

1 Answers1

0

Currently, in the C4 alpha api, the only way to do rotations is to use CGAffineTransform()...

So, your example would look like:

-(void)setup {
    C4Movie *newMovie = [C4Movie movieNamed:@"IMG_0009.MOV"];
    newMovie.center = CGPointMake(384,512);
    newMovie.transform = CGAffineTransformMakeRotation(PI);
    [self.canvas addMovie:newMovie];
}

PI will rotate your movie by 180 degrees, PI/2 = 90, etc...

C4 - Travis
  • 4,502
  • 4
  • 31
  • 56