Is it expected behavior that when applying a CATransform3DMakeScale() transform to a CALayer the layer's current bitmap information is what gets scaled (using some type of filter) rather than asking the layer to actually redraw itself into the, presumably, freshly transformed context? Currently applying a scale transform appears to result in unacceptable pixelation.

Here is an example:

_textLayer = [[CATextLayer alloc] init];
                
[_textLayer setFrame:CGRectMake( 300.0, 300.0, 1000.0, 36.0 )];
[_textLayer setString:@"Hello world"];
[_textLayer setTransform:CATransform3DMakeScale( 1.5, 1.5, 1.0 )];

This will scale the text up to 1.5x its size, but the result is essentially useless. It becomes even more pronounced if I set the minification/magnification filters to nil:

[_textLayer setMinificationFilter:nil];
[_textLayer setMagnificationFilter:nil];

I can't seem to find anything in the documentation on this behavior. The relevant sections discuss it as "transforming a layer's geometry." Maybe I'm not understanding something fundamental, but I would have figured that a geometry transform wouldn't simply stretch the existing device pixel based bitmap content using minification/magnification filters to fit into the newly scaled unit size (at least, from my understanding, this certainly isn't how a transform applied to the drawing context would cause regular Cocoa drawing to behave). I can understand this being done if the layer content is a bitmap image to begin with, but I certainly wouldn't expect this to be the case for text.

Can anyone shed any light on this?

/brian

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

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]

Reply via email to