On 07/05/2010, at 1:03 PM, Laurent Sansonetti wrote:

> Hi Paul,
> 
> You're right, the Pointer class must be used. Sorry about the lack of 
> documentation. Here is a snippet that might work:
> 
> # n must be defined
> origins = Pointer.new(CGPoint.type, n) # this builds a pointer to n times 
> CGPoint
> CTFrameGetLineOrigins(frame, CFRange.new(0, n), origins)
> 
> Using Pointer#[] you can simply dereference a given slot in the pointer, as 
> in C.
> 
> n.times { |i| p origins[i] } # should print nth points
> 
> Let me know if this works or not for you.
> 
> Laurent

Thanks Laurent. I will try it out.

Paul

_______________________________________________
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel

Reply via email to