On 06/03/2012, at 5:40 PM, R wrote:

> I want to blend two colors as a background.  I'm adding a layer using
> CAGradient layer, starting on the left with blue alpha=1. and ending
> on the right with blue alpha=0.
> 
> I then add another layer using red on the left with alpha=0. and
> ending on the right with alpha=1.
> 
> I wonder if it is best to draw this background, or, create a .png and
> just post it.

Is the goal to go from red to blue from left to right?

Why not add a single layer with red on the left, alpha = 1, and blue on the 
right, alpha = 1? I don't see why you need to composite two layers.

Drawing a gradient dynamically is probably more efficient than blitting a PNG, 
and will be resolution independent.

--Graham



_______________________________________________

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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

Reply via email to