• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Efficiency Question...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Efficiency Question...


  • Subject: Re: Efficiency Question...
  • From: Graham Cox <email@hidden>
  • Date: Tue, 06 Mar 2012 18:21:02 +1100

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 (email@hidden)

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:

This email sent to email@hidden


  • Follow-Ups:
    • Re: Efficiency Question...
      • From: Kyle Sluder <email@hidden>
    • Re: Efficiency Question...
      • From: Fritz Anderson <email@hidden>
References: 
 >Efficiency Question... (From: R <email@hidden>)

  • Prev by Date: Re: notAKeyMarker crash
  • Next by Date: Re: Efficiency Question...
  • Previous by thread: Efficiency Question...
  • Next by thread: Re: Efficiency Question...
  • Index(es):
    • Date
    • Thread