• 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: iPhone: CGPathMutable updating?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: iPhone: CGPathMutable updating?


  • Subject: Re: iPhone: CGPathMutable updating?
  • From: "Eric E. Dolecki" <email@hidden>
  • Date: Mon, 11 Jan 2010 16:40:20 -0500

Nevermind - I found out my problem. Sorry for the noise.

On Mon, Jan 11, 2010 at 1:30 PM, Eric E. Dolecki <email@hidden> wrote:

> I am using a CGPathMutable to draw the hand on an analog clock:
>
> minuteHandPath = CGPathCreateMutable();
>
> CGPathMoveToPoint(minuteHandPath, nil, center.x, center.y);
>
> CGPathAddLineToPoint(minuteHandPath, nil, center.x, center.y - 105);
>
> CGPathCloseSubpath(minuteHandPath);
>
> minuteHandLayer = [CAShapeLayer layer];
>
> minuteHandLayer.path = minuteHandPath;
>
> UIColor *myStrokeColor2 = [UIColor colorWithHue:0.6 saturation:0.24
> brightness:0.71 alpha:1.0];
>
> minuteHandLayer.strokeColor = myStrokeColor2.CGColor;
>
> minuteHandLayer.lineWidth = 2.0;
>
> [rootLayer addSublayer:minuteHandLayer];
>
>
> In another method I would like to update this, say to change the color of
> it. How can I do this? Presently I have tried:
>
>
> - (void) myMethod {
>
>     minuteHandPath = CGPathCreateMutable();
>
>     //...
>
> }
>
>
> This gives me an error. I don't see a way yet to clear the path out and
> redraw it using CGPathMoveToPoint, etc.
>
>
> ?
>



--
http://ericd.net
Interactive design and development
_______________________________________________

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

References: 
 >iPhone: CGPathMutable updating? (From: "Eric E. Dolecki" <email@hidden>)

  • Prev by Date: Re: Drawing A Mutable String
  • Next by Date: Re: iPhone interruption with OpenAL?
  • Previous by thread: iPhone: CGPathMutable updating?
  • Next by thread: What's the right way to make the last (or only) table column fill the width of an NSTableView?
  • Index(es):
    • Date
    • Thread