Re: Scaling a window background image quickly
Re: Scaling a window background image quickly
- Subject: Re: Scaling a window background image quickly
- From: "Mike R. Manzano" <email@hidden>
- Date: Sun, 6 Apr 2008 13:30:29 -0700
The bottom gradient is curved so it'd be a bit more difficult to do it
with CTGradient, which does linear and radial gradients only.
Regardless, I've abandoned this PDF and opted for a much simpler
design that uses CTGradient and beziers like you've suggested. A side-
effect is that I get better control of scaling. For example, the
"reflection" at the top of the gradient now only scales on the x-axis
instead of both axes.
It's a shame there isn't a more lightweight technology than
Illustrator/PDF that lets you easily draw vector UI elements in a
graphical editor with your application's performance in mind.
Hey, sounds like an opportunity for someone to make some money :)
Mike
On Apr 6, 2008, at 11:41 AM, Kyle Sluder wrote:
On Sun, Apr 6, 2008 at 6:41 AM, Jean-Daniel Dupas
<email@hidden> wrote:
This works well with lightweight PDF, but apparently not for
complex one.
I'm concerned as to why this PDF is so complicated in the first place.
What's being drawn is actually really simple. Four bezier paths to
draw the frame of the sticky note (filled with an NSGradient), and
then an NSGradient with a separate composite operation to draw the
highlighted portion. If not live resizing, do this in -drawRect and
then save the bitmap representation in an ivar. If live resizing,
scale the cached version and draw that until the live resize is
completed.
--Kyle Sluder
_______________________________________________
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
_______________________________________________
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