Bug in Apple Dylan TR sample project "puzzle" 
Author Message
 Bug in Apple Dylan TR sample project "puzzle"

Hi,

there is a bug in the TR sample project "puzzle" which breaks the display
routines
if a non-quadratic picture is used. The method get-tile-rect should look
like this:

define method get-tile-rect (view :: <puzzle-view>,
                             tile :: <small-integer>) => tile-rect ::
<rect>;
  let h-size = view.tile-size-h;
  let v-size = view.tile-size-v;
  let tile-top = floor/(tile, 4) * v-size;
  let tile-left = modulo(tile, 4) * h-size; // this line changed

  make(<rect>,
       top: tile-top,
       left: tile-left,
       bottom: tile-top + v-size,
       right: tile-left + h-size);
end method;

Andreas



Sat, 03 Jul 1999 03:00:00 GMT  
 Bug in Apple Dylan TR sample project "puzzle"

Hi,

there is a bug in the TR sample project "puzzle" which breaks the display
routines
if a non-quadratic picture is used. The method get-tile-rect should look
like this:

define method get-tile-rect (view :: <puzzle-view>,
                             tile :: <small-integer>) => tile-rect ::
<rect>;
  let h-size = view.tile-size-h;
  let v-size = view.tile-size-v;
  let tile-top = floor/(tile, 4) * v-size;
  let tile-left = modulo(tile, 4) * h-size; // this line changed

  make(<rect>,
       top: tile-top,
       left: tile-left,
       bottom: tile-top + v-size,
       right: tile-left + h-size);
end method;

Andreas



Sat, 03 Jul 1999 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Apple Dylan TR

2. CGIs in Apple Dylan TR???

3. apple dylan tr no format-out

4. Apple Dylan TR PPC Buggy?

5. HELP! Apple Dylan TR problem

6. How to get Apple-Dylan-TR in Europe?

7. Learning the Apple Dylan TR Framework.

8. apple dylan tr now available

9. Apple Dylan TR now available

10. Emulating "tr"

11. Unix like "tr" in TCL

12. APL/"Elvish" puzzle

 

 
Powered by phpBB® Forum Software