Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clip #112

Open
yuanhaotian opened this issue Jun 17, 2021 · 1 comment
Open

clip #112

yuanhaotian opened this issue Jun 17, 2021 · 1 comment

Comments

@yuanhaotian
Copy link

Can you cut graphics in createjs?like the clip() of the native canvas

@danzen
Copy link
Contributor

danzen commented Jun 24, 2021

@yuanhaotian - yes - there is a sourceRect property of the Bitmap class https://createjs.com/docs/easeljs/classes/Bitmap.html#property_sourceRect or you can make a mask with a Shape. We add the width, height, left and top as parameters to a ZIM Bitmap() which extends a CreateJS Bitmap - https://zimjs.com/docs.html?item=Bitmap to make things easier - but that is in ZIM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants