Skip to content

Canvas2ImagePlugin not working in phonegap #72

@TarneemOmar

Description

@TarneemOmar

Hi,

I am using phonegap to build cross-platform version of my app, I tried to test Canvas2ImagePlugin but I am not getting any result. I test it using Android Studio simulator on my phone .

Here is my code:

html:

<canvas id="myCanvas" width="250px" height="300px"></canvas> <input type="submit" onclick="capture()" value="testing">

JavaScript:

` function capture()
{

window.canvas2ImagePlugin.saveImageDataToLibrary(
function(msg){
var tvalue= document.getElementById("t1");
var c = document.getElementById('myCanvas');
var ctx = c.getContext("2d");
ctx.font = "30px Arial";
ctx.fillText(tvalue.value,10,50);
console.log(msg);
},
function(err){
console.log(err);
},
document.getElementById('myCanvas')
);

}`

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions