Re: How to make a CALayer dont get blur when rotating.

2008-12-16 Thread Martin Carlberg

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 following:


-(void)mouseDown:(NSEvent *)event
{
[event retain];
[mouseDownEvent  release];
mouseDownEvent = event;
NSPoint p2 = [event locationInWindow];
NSPoint p3 = [self convertPoint:p2 fromView:nil];
CGPoint p = NSPointToCGPoint(p3);
CALayer * nLayer = [_gameboardLayer hitTest:p];

if (nLayer.name != nil) {

NSNumber* value = [NSNumber numberWithFloat:PERP()];
		value = [NSNumber numberWithFloat:[value floatValue] + [[nLayer  
valueForKeyPath:@transform.rotation.z] floatValue]];

[nLayer setValue:value forKeyPath:@transform.rotation.z];

}

}

#define PERP () (90 * M_PI / 180)

but I realize that each time the images its perpendicular its kinda  
blurry I dunno how to rotate the layer without loosing quality.


the contents of the layer its .png


Thanks


Gus
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/martin%40oops.se

This email sent to mar...@oops.se


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: How to make a CALayer dont get blur when rotating.

2008-12-16 Thread Martin Carlberg
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?

- Martin Carlberg

16 dec 2008 kl. 12.31 skrev Gustavo Pizano:

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 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 following:


-(void)mouseDown:(NSEvent *)event
{
[event retain];
[mouseDownEvent  release];
mouseDownEvent = event;
NSPoint p2 = [event locationInWindow];
NSPoint p3 = [self convertPoint:p2 fromView:nil];
CGPoint p = NSPointToCGPoint(p3);
CALayer * nLayer = [_gameboardLayer hitTest:p];

if (nLayer.name != nil) {

NSNumber* value = [NSNumber numberWithFloat:PERP()];
		value = [NSNumber numberWithFloat:[value floatValue] + [[nLayer  
valueForKeyPath:@transform.rotation.z] floatValue]];

[nLayer setValue:value forKeyPath:@transform.rotation.z];

}

}

#define PERP () (90 * M_PI / 180)

but I realize that each time the images its perpendicular its  
kinda blurry I dunno how to rotate the layer without loosing  
quality.


the contents of the layer its .png


Thanks


Gus

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: DICOM images in Cocoa

2008-08-13 Thread Martin Carlberg

Try this: http://www.osirix-viewer.com/

13 aug 2008 kl. 08.12 skrev Devraj Mukherjee:


Hi all,

My application requires to display DICOM image files. Preview doesn't
support DICOM by nature so the thought at the moment is to use
something like ImageMagick and convert these images to something JPEG
on the fly?

NSImage doesn't seem to be able to take a DICOM stream. Is this the
best of doing this? Does anyone know of a Cocoa DICOM reader library?

Thanks a lot.

--
I never look back darling, it distracts from the now, Edna Mode (The
Incredibles)
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/martin%40oops.se

This email sent to [EMAIL PROTECTED]


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]