• 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: again with paths and images
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: again with paths and images


  • Subject: Re: again with paths and images
  • From: Robert Clair <email@hidden>
  • Date: Thu, 21 Dec 2006 08:59:29 -0500



I tried to calculate the path rects using formulas but with no exciting
results (do you know where to find the formulas used in bezier paths?).

This would be a very ugly calculation. I'm not privy to the low level Quartz source code, but this is generally done by tessellating the curve so that the maximum chordal deviation (maximum distance from a segment of the tessellated approximation to the "real" curve) is less than a pixel and then stroking the result. You'd need to go to a textbook on computer graphics and read up on tessellation (actually Quartz will do this for you, see [NSBezierPath bezierPathByFlatteningPath:] and the methods for extracting dat from an NSBezierPath) and Bresenham's algorithm. It's would be even uglier taking account of anti-aliasing.



That's why I thought to draw it all in one image and then draw it in a
bigger rect (after all the final result will be a single image...). Of
course it' not a great solution, and it's expensive in terms of time and
memory.

What's wrong with this ? It sounds like a perfectly reasonable solution to what you're trying to achieve. Do you have really huge images ? Do you know from trying it that it is too slow or does it just seem that way ? The
Quartz compositor is very fast.


...Bob Clair

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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


  • Prev by Date: LineForm's Filters Table
  • Next by Date: Re: Delegates -- WHAT is delegated?
  • Previous by thread: Re: Drawing with CIImages (was "again with paths and images")
  • Next by thread: LineForm's Filters Table
  • Index(es):
    • Date
    • Thread