[MacRuby-devel] [MacRuby] #628: CTFramesetterCreateFrame doesn't like the CFRange type
MacRuby
ruby-noreply at macosforge.org
Sun Mar 7 03:50:10 PST 2010
#628: CTFramesetterCreateFrame doesn't like the CFRange type
---------------------------+------------------------------------------------
Reporter: easco@… | Owner: lsansonetti@…
Type: defect | Status: new
Priority: major | Milestone:
Component: MacRuby | Keywords:
---------------------------+------------------------------------------------
Description changed by martinlagardette@…:
Old description:
> 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);
New description:
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:
{{{
#!ruby
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#comment:1>
MacRuby <http://macruby.org/>
More information about the MacRuby-devel
mailing list