#628: CTFramesetterCreateFrame doesn't like the CFRange type
---------------------------+------------------------------------------------
 Reporter:  ea...@…        |       Owner:  lsansone...@…        
     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/>

_______________________________________________
MacRuby-devel mailing list
MacRuby-devel@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel

Reply via email to