jCanvas is a little jQuery plugin written entirely in JavaScript that makes working with jQuery, and thereby HTML5′s canvas element, a lot easier. Web developers will get a lot of benefit out of using jCanvas. By using jCanvas, you get to work with much simpler code, in which the plugin will do the work and translate it into the relevant code for jQuery to run.
Questions tagged [jcanvas]
97 questions
25
votes
2 answers
What exactly is a canvas path, and what is the use of ctx.closePath()?
I'm working on an HTML5 game. I need to draw tail lines in the canvas and check for intersections in the game, which is a Tron-style game.
I'm actually using the drawLine() function from JCanvas, but JCanvas did not provide me a way to check for…

Aronis Mariano
- 2,352
- 3
- 22
- 19
9
votes
1 answer
Update images in canvas input type file jCanvas
Im using jCanvas to make flyer editor with jQuery : https://projects.calebevans.me/jcanvas/
$(function () {
initCanvas();
$.datepicker.regional['fr'] = {
closeText: 'Fermer',
prevText: '',
currentText:…

SKJ
- 2,184
- 1
- 13
- 25
3
votes
2 answers
Tainted Canvas, due to CORS and SVG?
Iknow this has been asked often before, but after 3days trying to fix this i clearly need help.
I've had a problem for a while now. I been trying to do something like this (This is a simplified code):
var media =…

Philip G
- 4,098
- 2
- 22
- 41
3
votes
4 answers
How do I save the location of draggable shapes in canvas?
I'm using canvas to make shapes. These shapes are draggable. How can the location of the shapes be saved so when I return to the page the shapes is in the same location I dragged it to?

Jeffrey McFarland
- 51
- 5
3
votes
2 answers
How to get the jCanvas version?
The Doc says the $.jCanvas object has the 'version' property, but alert($.jCanvas.version) says 'undefined'.

lxmfly123
- 126
- 9
2
votes
2 answers
Trying to load jQuery plugin via npm
I'm trying to load a jquery plugin in vuejs but nothing seems to be doing the trick.
I have
window.$ = window.jQuery = require('jquery');
// Plugin I'm trying to load
require('jcanvas');
The above part seems to work correctly (I think), but…

Vilius
- 976
- 2
- 12
- 25
2
votes
3 answers
How to calculate and place circles on an rect area?
I'm trying to draw some charts on a Canvas Area. My Problem is following...
I have 1-4 (or more) circles to draw. The canvas size is like 500 x 400 px. How can i now calculate the max Radius of each circle to place all on this canvas and get the…

HR123
- 688
- 1
- 6
- 15
2
votes
1 answer
clearCanvas() with draggable layers
When I add normal objects or layers to the canvas (using jCanvas) I'm able to clear the canvas using the clearCanvas() function.
But when I make my layers draggable the clearCanvas() function does not seem to work. It does clear the canvas when I…

Mirko
- 131
- 2
- 8
2
votes
0 answers
JCanvas.createPattern randomly returning 'Null' instead of actual pattern
Now my entire project is too big for a copy and paste, but here is a basic breakdown of what I'm doing right now:
$(document).ready(function(){
var canvas = $('#Canvas');
var data = {source: "images\pattern.png", repeat: "repeat"} ;
var pattern =…

Flubber
- 45
- 1
- 4
2
votes
3 answers
Detecting Regions Described by Lines on HTML5 Canvas
Start with a 2d grid on an HTML5 canvas. The user creates lines by plotting points - up to 5 lines.
Next, the user can select another arbitrary point on the grid, and the region is highlighted. I need to take that point and define a polygon to…

mtyson
- 8,196
- 16
- 66
- 106
2
votes
1 answer
JCanvas mouseover seems to be mousemove
I have a small JCanvas app that has the following layer def that sets a handler for mouseover. I put some console log statements in various places and it is clear that an event is generated every time the mouse moves in the rectangle, not just when…

user182170
- 21
- 2
2
votes
1 answer
Why jCanvas draws wrong pixels?
I have an object of pixel map, each row contains an object of columns, that contains a colour information. Then I choose the colour using switch(), and then I simply draw it to canvas. Here is the code:
for(var pixX in pixmap) {
for(var pixY…

Aslanex
- 79
- 2
- 9
2
votes
2 answers
globalCompositeOperation at jCanvas
How can I integrate globalCompositeOperation(or any other plugin which will give me 'multiply' color manipulation) into jCanvas jQuery plugin?
// How do I get this working? //
var ctx =…

grmmph
- 781
- 2
- 8
- 17
2
votes
1 answer
html5 jcanvas click function using in "for" loop got wrong
I use the jcanvas plugin for my 2d tagcloud research.
I wish that I could paint several tags on canvas and each of them links to a different page.
So, I need a for loop to show the tags,
Here is my code.
for(i=1;i<=5;i++){
…

randzhao
- 23
- 2
1
vote
1 answer
How to create an animation sequence using RaphaelJS
so here is my question
I am using RaphaelJS to build an animation in the HTML5 canvas, the thing is I don't quite understand how do I create the animation events and how do I trigger them. The documentation isn't very helpful. Thanks

Nathan Drake
- 247
- 1
- 6
- 11