simple display (from: GUI library for D)
Adam D. Ruppe
destructionator at gmail.com
Fri Apr 8 17:42:40 PDT 2011
bearophile wrote:
> OK. (But for this module I think usage simplicity is more
> important than raw speed.
The struct is at least equal in simplicity:
image[x, y] = Color(r, g, b);
vs
image[x, y] = tuple(r, g, b);
> Indeed, I was suggesting to open the window at the top of the
> program, and at the bottom of the program to swap the two buffers
> and show the drawn one.
Sure, that's what happens in my second example.
Right now it uses "window.image = newImage;" to flip it but I
think I want to change that.
> Read the events, like window closing, key pressed, mouse
> movements, etc. Take a look at Processing API, for ideas.
Yes, my window object does this too. See the example here:
http://arsdnet.net/dcode/simpledisplay_test2.d
win.eventLoop() does it.
> http://rosettacode.org/wiki/Animate_a_pendulum
Heh, I think D will be winning that by Monday!
More information about the Digitalmars-d
mailing list