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

Canvas2ImagePlugin not working in phonegap #72

Open
TarneemOmar opened this issue Jul 27, 2016 · 0 comments
Open

Canvas2ImagePlugin not working in phonegap #72

TarneemOmar opened this issue Jul 27, 2016 · 0 comments

Comments

@TarneemOmar
Copy link

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

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