Re: UIImage and shadows, WAS: Re: Please if some one knows
Re: UIImage and shadows, WAS: Re: Please if some one knows
- Subject: Re: UIImage and shadows, WAS: Re: Please if some one knows
- From: Development <email@hidden>
- Date: Mon, 21 Dec 2009 21:02:29 -0700
Then I don't understand how to do this.
Do I create the context at this larger size? because that's what I did.
Do I drawInRect the image at it's original size? Because that's what I did.
As near as I can tell, no matter what I do, the image itself, not accounting for the shadow, is drawn in the upper left corner. this causes a negative shadow, or one to the upper left, to be cut off by the edge of the context.
I have attempted using drawAtPoint, and accounting for the negative shadow by moving the point an amount that should accommodate the shadow. It did not work.
Now if the shadow is to the lower right, the adjustments I make work perfectly every time and the shadow is exactly what it should be.
I think the point is that I do not understand the context drawing. I thought I did but it should be painfully obvious from this thread that I do not.
On Dec 21, 2009, at 8:45 PM, Graham Cox wrote:
>
> On 22/12/2009, at 1:49 PM, Development wrote:
>
>> however what I am getting now is a larger image, offset in the view and still cutting off the shadow. So I honestly do not know how I am suppose to draw this shadow. I would really be grateful for some additional direction.
>
>
> Try thinking instead of flailing about throwing code at it.
>
> You need a bigger image to accommodate the shadow. But the image you want to composite on top is the same size as it always was. So you need to keep its original size around so you can draw it at that size but into the larger image context. If you draw it at the new size you are back at square one, but larger.
>
> --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