I am using addImage() method to add image from camera/gallery and using addBlock(point.x, point.y, "Drawing") method to embed drawing. I want to differentiate between image and drawing. However contentBlock.getType() returning Drawing in both cases. How do differentiate
Best Answer
G
Gwenaelle @MyScript
said
over 1 year ago
Hello Dipannita,
Thank you for your question.
The addImage indeed adds the image in a drawing block and there is no difference between "Drawing" blocks containing drawing and the ones used to add an image.
As the addImage method returns you the "Drawing" block associated with the newly added image, you might then store and use the id of this image Drawing block for further use.
Best regards,
Gwenaëlle
1 Comment
G
Gwenaelle @MyScript
said
over 1 year ago
Answer
Hello Dipannita,
Thank you for your question.
The addImage indeed adds the image in a drawing block and there is no difference between "Drawing" blocks containing drawing and the ones used to add an image.
As the addImage method returns you the "Drawing" block associated with the newly added image, you might then store and use the id of this image Drawing block for further use.
Dipannita Das
I am using addImage() method to add image from camera/gallery and using addBlock(point.x, point.y, "Drawing") method to embed drawing. I want to differentiate between image and drawing. However contentBlock.getType() returning Drawing in both cases. How do differentiate
Hello Dipannita,
Thank you for your question.
The addImage indeed adds the image in a drawing block and there is no difference between "Drawing" blocks containing drawing and the ones used to add an image.
As the addImage method returns you the "Drawing" block associated with the newly added image, you might then store and use the id of this image Drawing block for further use.
Best regards,
Gwenaëlle
Gwenaelle @MyScript
Hello Dipannita,
Thank you for your question.
The addImage indeed adds the image in a drawing block and there is no difference between "Drawing" blocks containing drawing and the ones used to add an image.
As the addImage method returns you the "Drawing" block associated with the newly added image, you might then store and use the id of this image Drawing block for further use.
Best regards,
Gwenaëlle