last bug fixes to hdtch/[i]draw for now
svn: r2763
This commit is contained in:
parent
6376643994
commit
9e23d915ee
|
@ -2,9 +2,6 @@ package draw;
|
|||
|
||||
public abstract class World {
|
||||
protected Canvas theCanvas;
|
||||
protected void putCanvas(Canvas c) {
|
||||
this.theCanvas = c;
|
||||
};
|
||||
public boolean bigBang(int width, int height, double s) {
|
||||
if (width <= 0)
|
||||
throw new RuntimeException(
|
||||
|
|
|
@ -155,15 +155,17 @@
|
|||
|
||||
(define (bigBangO-double-native this accs gets privates i)
|
||||
(define theCanvas ((hash-table-get accs 'theCanvas) this))
|
||||
(define setCanvas (hash-table-get gets 'theCanvas))
|
||||
(define width (with-method ([g (theCanvas Canvas-width-get)]) (g '___)))
|
||||
(define height (with-method ([g (theCanvas Canvas-height-get)]) (g '___)))
|
||||
;; call only *after* start
|
||||
(define (on-event world th)
|
||||
(define (on-event world0 th)
|
||||
(begin-draw-sequence)
|
||||
(send theCanvas copy)
|
||||
(send world erase)
|
||||
(let ([world (imperative (th) world)])
|
||||
(send world putCanvas-draw.Canvas theCanvas)
|
||||
(send world0 erase)
|
||||
(let ([world (imperative (th) world0)])
|
||||
(unless (eq? world0 world)
|
||||
(setCanvas world theCanvas))
|
||||
(send world draw)
|
||||
(end-draw-sequence)
|
||||
world))
|
||||
|
|
Loading…
Reference in New Issue
Block a user