• 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: CGContext - Drawing Circle
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CGContext - Drawing Circle


  • Subject: Re: CGContext - Drawing Circle
  • From: Dave <email@hidden>
  • Date: Thu, 04 Jul 2013 14:32:24 +0100

Hi,

Yes, this worked! I subtracted 2 from the Radius - thanks a lot for your help!

All the Best
Dave

On 4 Jul 2013, at 14:22, Roland King <email@hidden> wrote:

>
> On 4 Jul, 2013, at 8:17 PM, Ken Thomases <email@hidden> wrote:
>
>>
>> Is theDrawRect coincident with the view's bounds?  If so, then the edges of your circle will be clipped.
>>
>> A stroked path straddles the imaginary zero-width path described by the geometry (a circle in this case).  Since your line width is 2 points, then there's 1 point of width to the inside of the circle and 1 point of width to the outside.  However, if the circle hits your view's bounds, then the portion outside of the circle is outside of the view and is not drawn.  It's clipped to the view's bounds.
>>
>> You might want to inset the circle by a point, which is to say reduce the radius by 1.
>>
>
> Haven't seen a reply to this - this looks like the right answer. If the view is 30x30 and you're drawing a 30x30 circle, you are going to get it flattened on each edge. You need to reduce the radius of the circle by 1/2 the width of its border line.
>
> I don't think this has anything to do with dirty rects, I think you're just drawing beyond the edge of your graphics context.
>

_______________________________________________

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: 
 >CGContext - Drawing Circle (From: Dave <email@hidden>)
 >Re: CGContext - Drawing Circle (From: Ken Thomases <email@hidden>)
 >Re: CGContext - Drawing Circle (From: Roland King <email@hidden>)

  • Prev by Date: Re: CGContext - Drawing Circle
  • Next by Date: Changing Text Field Color to Custom Color in IB
  • Previous by thread: Re: CGContext - Drawing Circle
  • Next by thread: Re: CGContext - Drawing Circle
  • Index(es):
    • Date
    • Thread