home *** CD-ROM | disk | FTP | other *** search
/ 600 Games / 600games.iso / Corrida / amazingrace.swf / scripts / __Packages / Pirrest / PhisicsEngine / Graphics.as < prev    next >
Encoding:
Text File  |  2006-06-13  |  959 b   |  26 lines

  1. class Pirrest.PhisicsEngine.Graphics
  2. {
  3.    function Graphics()
  4.    {
  5.    }
  6.    function paintLine($target_mc, $x0, $y0, $x1, $y1)
  7.    {
  8.       $target_mc.moveTo($x0,$y0);
  9.       $target_mc.lineTo($x1,$y1);
  10.    }
  11.    function paintCircle($target_mc, $x, $y, $r)
  12.    {
  13.       var _loc4_ = 0.41421356237309503 * $r;
  14.       var _loc5_ = 0.7071067811865475 * $r;
  15.       $target_mc.moveTo($x + $r,$y);
  16.       $target_mc.curveTo($r + $x,_loc4_ + $y,_loc5_ + $x,_loc5_ + $y);
  17.       $target_mc.curveTo(_loc4_ + $x,$r + $y,$x,$r + $y);
  18.       $target_mc.curveTo(- _loc4_ + $x,$r + $y,- _loc5_ + $x,_loc5_ + $y);
  19.       $target_mc.curveTo(- $r + $x,_loc4_ + $y,- $r + $x,$y);
  20.       $target_mc.curveTo(- $r + $x,- _loc4_ + $y,- _loc5_ + $x,- _loc5_ + $y);
  21.       $target_mc.curveTo(- _loc4_ + $x,- $r + $y,$x,- $r + $y);
  22.       $target_mc.curveTo(_loc4_ + $x,- $r + $y,_loc5_ + $x,- _loc5_ + $y);
  23.       $target_mc.curveTo($r + $x,- _loc4_ + $y,$r + $x,$y);
  24.    }
  25. }
  26.