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
0
votes
1 answer
Updating canvas without hovering
I'm making something like MS Paint using jCanvas library. I've put a button OUTSIDE the canvas. The button rotates the selected layer clockwise but I can't see any change unless I hover the canvas with mouse. I want the layer to be rotated by the…

Wellenbrecher
- 179
- 1
- 9
0
votes
0 answers
how to apply pattern on transparent layer in kineticjs?
I am trying to apply pattern(i.e image) on transparent layer using kineticjs.But it is applying pattern like square.it should not be square as well it should be merged with top layer because shadow effect is there on the top layer.Here is my code,…

dilli y
- 23
- 1
- 4
0
votes
1 answer
Dimensions in html5 canvas
I have a problem with the HTML5 Canvas. I use jCanvas to add layers to an canvas but I have a problem with the sizes.
I have 2 rectangles a green one and a red one.
Now I want the red box touch the green left top corner.
Using the coordinate system…

NLAnaconda
- 1,534
- 3
- 14
- 38
0
votes
1 answer
Automatically add pixels when adding rectangle to canvas
For the moment, I have this
var x = 150;
var o = 100;
var canvas = $('#NodeList').get(0);
var ctx = canvas.getContext('2d');
ctx.strokeStyle = "red";
canvas.height = 0;
var rects = [
[20, 20, x, o],
[20, 130, x, o],
[20, 240, x, o],
…

Script
- 21
- 1
- 7
0
votes
1 answer
How can make a dropped image draggable within the canvas ?
http://jsfiddle.net/m1erickson/2Us2S/
**I am using this code , how can I make dropped images as draggable . I have tried with jquery but I need to drag the same within the canvas . Enlighten me . **
var canvas =…

Neha
- 11
- 8
0
votes
1 answer
jCanvas imageSmoothingEnabled not working
So I am trying to build a game with pixel art in html using jCanvas. However, when I try to disable imageSmoothing in order to leave the pixels sharp, nothing happens.
$(function() {
$('canvas').drawImage({
source:…

half-potato
- 968
- 1
- 11
- 17
0
votes
1 answer
Unable to Define label for Arc using JCanvas
I am using JCanvas for drawing some arc. But I am not able to define label for arc.
Please suggest on how to define arc's label in Jcanvas.
Here is my arc code.
$('canvas').drawArc({
strokeStyle: 'red',
strokeWidth: 4,
rounded: true,
…

user3655459
- 1
- 1
0
votes
2 answers
"jcanvas" I can't get "data property" within the layer itself
// first case
$('canvas').drawRect({
layer: true,
data: { w: 300 },
fillStyle: '#585',
x: 100, y: 100,
width: 100, height: 50
});
alert($('canvas').getLayer(0).data.w);
I can get the data out of the layer.
// second…

IvanK
- 65
- 1
- 6
0
votes
2 answers
Set an element to visible on click in JCanvas
I have drawn an mage on the canvas using drawImage() and have set its visibility to false and i want it to be visible on click and mouseover. How do i do ? Thanks
Here's what i've written so far, but this doesn't work of…

Stéphane Joos
- 743
- 1
- 6
- 13
0
votes
1 answer
JCanvas add new event
I would like to know if we can add another dynamic event such as click, touchstart etc..
Ex :
$('canvas').drawArc({
layer:true,
strokeStyle: '#000',
strokeWidth: 5,
x: 100, y: 100,
radius: 50,
my_event : function(layer)
{
}
});

zeomega
- 345
- 2
- 6
- 18
0
votes
1 answer
drag drawLine jcanvas optimisation coordinates
considering this basic case, one may expect the coordinates of the layer to be updated... but they would not.
Instead, there is the possibility of remembering the starting point, compute the mouse offset and then update the coordinates, like in this…

nicolallias
- 1,055
- 2
- 22
- 51
0
votes
1 answer
jCanvas - Fill Rectangles with image
Is there a possibility to fill a rectangle with a picture and not with color in jCanvas?
I would repeat the pic in the rectangle like in css for example:
background-repeat: repeat;

johnny
- 53
- 1
- 5
0
votes
1 answer
jCanvas triggering extra events on mousehover
In my application, I draw an image to the canvas, then add circles and text for labels. I moved my extra drawing code to the load method of drawImage and have discovered that the same code is called repeatedly when moving the mouse over the canvas.…

MechEngineer
- 1,399
- 3
- 16
- 27
0
votes
1 answer
I am trying to draw a line and rectangle on canvas using mouse events in JCanvas
I am trying to draw a line and rectangle on canvas using mouse events in JCanvas.Hre is my code
…

user3188826
- 53
- 1
- 2
- 8
0
votes
1 answer
I am trying to draw shapes using mouse events in jcanvas
I am trying to draw shapes on canvas using mouse events in JCanvas. I am trying to implement it by creating a temporary canvas to draw shapes. My question here is can we implement temporary canvas in JCanvas?
I am not getting any idea of how to draw…

user3188826
- 53
- 1
- 2
- 8