Guest User

Untitled

a guest
Nov 18th, 2018
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. /**
  2. * Color comparison for LimeJS shapes
  3. * Usage:
  4. * if (sprite.getFill().equals('#c00')) {}
  5. * if (sprite.getFill().equals('rgb(100, 0, 0)')) {}
  6. * if (sprite.getFill().equals(othersprite.getFill())) {}
  7. */
  8. lime.fill.Color.prototype.equals = function (other) {
  9. other = lime.fill.parse(other);
  10. return this.r == other.r && this.g == other.g && this.b == other.b && this.a == other.a;
  11. };
Add Comment
Please, Sign In to add comment