[MacRuby-devel] [MacRuby] #628: CTFramesetterCreateFrame doesn't like the CFRange type
MacRuby
ruby-noreply at macosforge.org
Thu Mar 4 12:01:52 PST 2010
#628: CTFramesetterCreateFrame doesn't like the CFRange type
---------------------------+------------------------------------------------
Reporter: easco@… | Owner: lsansonetti@…
Type: defect | Status: new
Priority: major | Milestone:
Component: MacRuby | Keywords:
---------------------------+------------------------------------------------
An attempt to call CTFramesetterCreateFrame and passing a CFRange
structure generates an error message:
unrecognized runtime type `{?=qq}'
Here's the script I was using:
font = NSFont.fontWithName("TrebuchetMS", :size=> 24.0)
attributes = NSDictionary.dictionaryWithObjectsAndKeys(font,
NSFontAttributeName, nil)
attributedString = CFAttributedStringCreate(nil, "$", attributes)
framesetter = CTFramesetterCreateWithAttributedString(attributedString)
framePath = CGPathCreateMutable()
CGPathAddRect(framePath, nil, CGRectMake(4, 4, 32, 32));
textFrame = CTFramesetterCreateFrame(framesetter, CFRangeMake(0.0, 1.0),
framePath, nil);
--
Ticket URL: <http://www.macruby.org/trac/ticket/628>
MacRuby <http://macruby.org/>
More information about the MacRuby-devel
mailing list