• 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: Strange issue in stroking a bezier path
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Strange issue in stroking a bezier path


  • Subject: Re: Strange issue in stroking a bezier path
  • From: Jens Alfke <email@hidden>
  • Date: Sat, 05 May 2012 09:40:52 -0700

On May 5, 2012, at 7:41 AM, Peter Teeson wrote:

> But I did not realize that the bounds stroke was straddling the view content edges.
> How did you learn that?

If you think about it, drawing a stroke along a path _has_ to draw on both sides of the path (i.e. centered on the path) because there isn’t necessarily any inside or outside; the path might not be closed, or it might be a figure 8 or something.

Another side effect of this is that, if the path width is an odd number of pixels, you should offset your coordinates by 0.5 to make sure you completely fill pixels, otherwise you’ll have fuzzy borders on your horizontal and vertical strokes.

—Jens
_______________________________________________

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: Strange issue in stroking a bezier path
      • From: Peter Teeson <email@hidden>
References: 
 >Strange issue in stroking a bezier path (From: Peter Teeson <email@hidden>)
 >Re: Strange issue in stroking a bezier path (From: Ken Thomases <email@hidden>)
 >Re: Strange issue in stroking a bezier path (From: Peter Teeson <email@hidden>)

  • Prev by Date: Re: NSView + NSScrollView, not scrolling
  • Next by Date: -[NSApp orderOut:] leaves custom sheet in -orderedWindows
  • Previous by thread: Re: Strange issue in stroking a bezier path
  • Next by thread: Re: Strange issue in stroking a bezier path
  • Index(es):
    • Date
    • Thread