-
Notifications
You must be signed in to change notification settings - Fork 170
Closed
Description
my code is :
handleRedCircle = async canvas => {
if (canvas != null) {
canvas.width = 400;
canvas.height = 400;
const context = canvas.getContext('2d', {preserveDrawingBuffer: true});
if (this.state.passObj && this.state?.passObj.alphabets) {
var images = {};
{
this.state.passObj?.alphabets?.map((item, index) => {
images['img' + index] = new CanvasImage(canvas);
images['img' + index].src = item.imageUrl;
images['img' + index].addEventListener('load', async () => {
return context.drawImage(
images['img' + index],
item.xCoordinate / 10,
item.yCoordinate / 10,
item.width / 10,
item.height / 10,
);
});
});
}
console.log('url : ', await canvas.toDataURL());
}
}
};@iddan please check.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels