that depends on using isigraph or isidraw. isidraw is backup by bitmap so
that you need to erase the previous scene. isigraph (in j8) is different,
since it is not double buffered, it loses previous content in each paint
event, so you need not erase the previous ball.

opengl also works for 2d.



On 9 Feb, 2017 12:42 am, "Louis de Forcrand" <[email protected]> wrote:

Hi everyone,

I've been looking into the Qt facilities available in J recently, and I
read that 2D graphics are best done with gl2.

I hacked together a simple program that displays a ball which bounces
around the isidraw container. Having never really done any graphics-related
programming, I used the window driver's timer function to call sys_timer at
regular intervals, which erases the previous circle, draws the new one, and
updates speed and position global vars.
The advantage of using the wd timer is that I can create a button which
calls "wd 'timer 0; pclose'" in order to exit the program in a clean
fashion without having to break.

I suspect there is a better way to do this; how would the seasoned J
programmers on this forum go about creating such an animation?

All help appreciated!
Louis

PS: I hardly have any web-related (html, css, php, etc.) programming
skills, but any info about doing this in JHS is welcome as well.
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to