Advertisement
IcarusLives

:rect x y h w

Mar 4th, 2017
811
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 0.86 KB | None | 0 0
  1. :: -------------------------------------------------------------------------------------------------------
  2. :: :rect x y h w    requires :canvas, :showCanvas, :plot, :plotLine
  3. ::
  4. :: call :canvas 30 30
  5. ::
  6. :: call :rect 14 6 3 5
  7. ::
  8. :: call :showCanvas
  9. ::
  10. :: -------------------------------------------------------------------------------------------------------
  11. :rect x y h w
  12.     set /a "rect_x=%~1", "rect_y=%~2", "rect_h=%~2 + %~4", "rect_w=%~1 + %~3"
  13.     call :plotLine %rect_x% %rect_y% %rect_w% %rect_y% %5
  14.     call :plotLine %rect_x% %rect_y% %rect_x% %rect_h% %5
  15.     call :plotLine %rect_w% %rect_h% %rect_w% %rect_y% %5
  16.     call :plotLine %rect_w% %rect_h% %rect_x% %rect_h% %5
  17.     for %%a in (rect_h rect_w rect_x rect_y) do set "%%a="
  18. goto :eof
  19. :: -------------------------------------------------------------------------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement