I'd like to second the question on HotCocoa status - is it dead, in limbo, quietly flourishing, ???
Mike On Mar 23, 2011, at 7:38 PM, macruby-devel-requ...@lists.macosforge.org wrote: > > > Message: 3 > Date: Wed, 23 Mar 2011 22:52:42 +0100 > From: Vincenzo Piombo <vipe...@gmail.com> > To: macruby-devel@lists.macosforge.org > Subject: [MacRuby-devel] is hotcocoa dead ? > Message-ID: > <aanlktimhhksdr6hswt9fpowxw_jka_gzu5dnet2pe...@mail.gmail.com> > Content-Type: text/plain; charset="iso-8859-1" > > Hello all, > I discovered macruby since a few weeks and I'm really enthusiast. > I begun playing with it and really like the hotcocoa approach, but it seems > stopped since more than a year, is it still maintained ? > > Anyway, I think I found a bug in the hotcocoa canvas part: the text method > draws at a very big size regardless of the chosen font. The problem is that > the transformation matrix for the text is not set. > > Here is the fix if anyone needs it: > > module HotCocoa::Graphics > class Canvas > def text(txt="A", x=0, y=0) > affine = CGContextGetCTM(@ctx) > CGContextSetTextMatrix (@ctx, affine); > txt = txt.to_s unless txt.kind_of?(String) > if @registration == :center > width = textwidth(txt) > x = x - width / 2 > y = y + @fsize / 2 > end > CGContextShowTextAtPoint(@ctx, x, y, txt, txt.length) > end > end > end _______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel