Jump to content

Tint Question


Recommended Posts


I just added new tintCrop property to Sprite class. It is instance of Rectangle, so you could define all the 4 values.

sprite.tint = '#ff0000';
sprite.tintCrop.x = 20; // Crop tint 20px from left
sprite.tintCrop.y = 20; // Crop tint 20px from top
sprite.tintCrop.width = 20; // Crop tint 20px from right
sprite.tintCrop.height = 20; // Crop tint 20px from bottom

sprite.tintCrop.set(20, 20, 20, 20); // Shorthand


Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...