[MacRuby-devel] Is HotCocoa dead?
Michael Gehl
mike at vail.net
Thu Mar 24 10:53:23 PDT 2011
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-request at lists.macosforge.org wrote:
>
>
> Message: 3
> Date: Wed, 23 Mar 2011 22:52:42 +0100
> From: Vincenzo Piombo <vipenzo at gmail.com>
> To: macruby-devel at lists.macosforge.org
> Subject: [MacRuby-devel] is hotcocoa dead ?
> Message-ID:
> <AANLkTimHhksDr6hswT9Fpowxw_JkA_GZu5dneT2PEuc0 at 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
More information about the MacRuby-devel
mailing list