Rectangle.hx 1.2 KB

123456789101112131415161718192021222324252627282930313233
  1. package flash.geom;
  2. extern class Rectangle {
  3. var bottom : Float;
  4. var bottomRight : Point;
  5. var height : Float;
  6. var left : Float;
  7. var right : Float;
  8. var size : Point;
  9. var top : Float;
  10. var topLeft : Point;
  11. var width : Float;
  12. var x : Float;
  13. var y : Float;
  14. function new(x : Float = 0, y : Float = 0, width : Float = 0, height : Float = 0) : Void;
  15. function clone() : Rectangle;
  16. function contains(x : Float, y : Float) : Bool;
  17. function containsPoint(point : Point) : Bool;
  18. function containsRect(rect : Rectangle) : Bool;
  19. @:require(flash11) function copyFrom(sourceRect : Rectangle) : Void;
  20. function equals(toCompare : Rectangle) : Bool;
  21. function inflate(dx : Float, dy : Float) : Void;
  22. function inflatePoint(point : Point) : Void;
  23. function intersection(toIntersect : Rectangle) : Rectangle;
  24. function intersects(toIntersect : Rectangle) : Bool;
  25. function isEmpty() : Bool;
  26. function offset(dx : Float, dy : Float) : Void;
  27. function offsetPoint(point : Point) : Void;
  28. function setEmpty() : Void;
  29. @:require(flash11) function setTo(xa : Float, ya : Float, widtha : Float, heighta : Float) : Void;
  30. function toString() : String;
  31. function union(toUnion : Rectangle) : Rectangle;
  32. }