[wxruby-users] Zyps
Alex Fenton
alex at pressure.to
Mon Jan 21 04:43:07 EST 2008
Jay McGavren wrote:
> The library demo is runnable - just check
> out HEAD (rev. 193), cd to the working copy, and say:
>
> $ set RUBYLIB=lib
> $ ruby bin/zyps_demo
>
>
Great demo: fun, absorbing and a nice aesthetic too. If I get some time
I might try to write a foxes/rabbits or simple genetics simulator.
> ...or the equivalents for your OS. You'll be gratified to know I'm
> getting far better framerates from wxRuby than I was with Ruby-Gnome2.
>
That's good to know. Having a quick glance at the wx code helped turn
up a bug - I realised the docs for Wx::Brush are cut off. A custom brush
is created thus:
Wx::Brush.new(Wx::Colour.new(r, g, b), Wx::SOLID)
The second argument is the fill style - other options are things like
Wx::CROSS_HATCH. Brushes that stipple Bitmaps can also be used to create
textures.
http://www.wxwidgets.org/manuals/2.8/wx_wxbrush.html
The simplest constructor should be:
Wx::Brush.new(Wx::Colour(r, g, b)
But this form was missing - now added to SVN for the next release.
cheers
alex
More information about the wxruby-users
mailing list