Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Color comparison for LimeJS shapes
- * Usage:
- * if (sprite.getFill().equals('#c00')) {}
- * if (sprite.getFill().equals('rgb(100, 0, 0)')) {}
- * if (sprite.getFill().equals(othersprite.getFill())) {}
- */
- lime.fill.Color.prototype.equals = function (other) {
- other = lime.fill.parse(other);
- return this.r == other.r && this.g == other.g && this.b == other.b && this.a == other.a;
- };
Add Comment
Please, Sign In to add comment