I was thinking about that, I put a 90.0f but that didn't help let me
see the M_PI_2 works. nop once it gets to vertical position the
image its not focused.
:S
Gus.
On 16.12.2008, at 14:48, Dimitri Bouniol wrote:
It's because you are multiplying/dividing a double (M_PI) by and
NSLog(@ %f,%f, nLayer.frame.origin.x, nLayer.frame.origin.y);
generated the following output before rotating the layer.
2008-12-16 15:31:32.513 NavalBattle[392:10b] 100.00,200.00
On 16.12.2008, at 15:19, Dimitri Bouniol wrote:
Perhaps it has something to do with HPS (half-pixel
It's because you are multiplying/dividing a double (M_PI) by and int,
so you get an int. A 90° angle in radians is defined as π/2, so try
the constant M_PI_2. Hope that works :3
PS. You can also make an int into a float by appending a . to the
number, as such: 90. * M_PI / 180. ; but using
Perhaps it has something to do with HPS (half-pixel syndrome). Maybe
as you rotate the layer, the x-coord (which was a y-coord) now lies on
0.5 pixels. Try checking the layer.frame.origin point to see if it is
expressed in whole numbers.
On Dec 16, 2008, at 5:59 AM, Gustavo Pizano wrote:
mm no. let me try it.m... nop it didn't work. still the image after
the transition its blurred.
Gus
On 16.12.2008, at 12:22, Martin Carlberg wrote:
Have you tried to add the following line?
[nLayer setValue:[NSNumber numberWithFloat:.]
forKeyPath:@transform.scale];
- Martin
Have you tried to add the following line?
[nLayer setValue:[NSNumber numberWithFloat:.]
forKeyPath:@transform.scale];
- Martin Carlberg
13 dec 2008 kl. 19.49 skrev Gustavo Pizano:
Hello well finally I manage to rotate the CALayer each time I click
on it. what I did was the
There are some bugs in CALayer that will give you blurred images. But
you have to tell us more about your layer hierarchy and what kind of
transformations you have on the different layers?
Have you tried to rotate your layer in a simple test application?
Have you tried to use another image?
Hello well finally I manage to rotate the CALayer each time I click on
it. what I did was the following:
-(void)mouseDown:(NSEvent *)event
{
[event retain];
[mouseDownEvent release];
mouseDownEvent = event;
NSPoint p2 = [event locationInWindow];
NSPoint