Hi all,

After reinvestigating bug 2683 for which Mark Waddingham asked a recipe, the weird influence of the gridsize and the grid on the drawing of squares by script surfaced. Will it become an "undocumented feature" or is this a bug? Anyway I didn't know until now.
1 new stack and 1 button with the following script will show:

on mouseUp
  put gridsize into  tOldgridsize
  put the grid into tOldgrid
  set the grid to true  ### Mark Schonewille for this detail
  if there is no img "test" then create img "test"
  set the rect of img "test" to 0,0,400,400
  set gridsize to 1
  creategrid 50,50
  set gridsize to 2
  creategrid 160,50
  set gridsize to 3
  creategrid 50,160
  set gridsize to 4
  creategrid 160,160
  set gridsize to 6
  creategrid 50,270
  set gridsize to 10
  creategrid 160,270
  set gridsize to  tOldgridsize
  set the grid to tOldgrid
end mouseUp

on createGrid x,y  ### topleft of grid
  choose the rectangle tool
  set the filled to true
  set the brushcolor to 255,255,255
  set the pencolor to 0,0,0
  put 10 into tCol   ### number of columns
  put 10 into tRow   ### number of rows
  put 10 into tSq    ### tSq = size of square
  put 1 into tCY
  repeat tRow
    put (y + (tCY * tSq) - tSq) into tY
    put 1 into tCX
    repeat tCol
      put (x + (tCX * tSq) - tSq) into tX
      drag from tX,tY to tX + tSq ,tY + tSq
      add 1 to tCX
    end repeat
    add 1 to tCY
  end repeat
  choose browser tool
end createGrid

So when drawing by script, the gridsize and/or the grid should be taken care of. May be the influence of those settings have a bigger scope (not tested yet).

Greetings,
Wouter
_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to