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

group clip raster can not save as base64Data #2045

Open
the-didi opened this issue Aug 14, 2023 · 0 comments
Open

group clip raster can not save as base64Data #2045

the-didi opened this issue Aug 14, 2023 · 0 comments

Comments

@the-didi
Copy link

Description/Steps to reproduce

  1. create an new raster with base64 string
  2. create an new path with some points on the raster that just create
  3. create an new group that contains the raster and the path
  4. set the group clipMask equlas to true
  5. set the raster clipMask equals to true
  6. then i got an new group that cliped an raster,but i dont know is there an way to export dataUrl of this raster

Additional information

// please ignore it,it just for get an newPath
const newPath = path.subtract(origin)
// set properties of the newPath
newPath.fillColor = new paper.Color(255, 0, 0)
newPath.fillColor.alpha = 0.5
newPath.selected = true
image.crossOrigin = 'anonymous'
// set raset clipMask equals to true
image.clipMask = true
// create an Group
const group = new paper.Group()
// set group clipMask
group.clipMask = true
// clip the raster
group.addChild(newPath)
group.addChild(image)
 group.selected=  true

....

// then how could i get the dataUrl of the raster that i just cliped?
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

1 participant