canvas

I am able to draw the box but I am not able to remove it! (Canvas)

Hi, I have asked this question before and it seemed that the code I was using was pretty confusing. So this is a virtually dumed down version of the same code. I draw a square on the canvas using the add function. Like wise I should be able to remove the item from the canvas using the remove function! Alas it doesn't seem to happen so....

Save many canvas element as image

I have 3 layers of canvas - 1 is matrix, 2 & 3 is graphics, how to preserve them in one image? <div style="position: relative;"> <canvas id="matix" width="100" height="100" style="position: absolute; left: 0; top: 0; z-index: 0;"></canvas> <canvas id="layer1" width="100" height="100" style="position: absolute; left: 0; top: 0;...

What are the Touch Events available to Javascript on a os- Windows Mobile 6.1, device: Treo 800w, Opera 9.5 Gears Compatible

I am struggling to find any documentation on this subject. I want to use a tag to capture a signature via the touchscreen. It seems to recognize only "onclick". What are the " touch events" that are available to Windows Mobile 6.x Opera Browser. Does it convert mouseover, mousedown, mouseup to ontouchstart, touchend etc..? Thank you...

How to limit item position into Canvas?

[EDIT] Alright, I edited this post since the code I posted back then had no real links with what I'm trying to do now, but the question is the same. When I'm talking about limiting objects to a Canvas it was more like a Mouse Clipping, but as I read on many threads, this feature doesn't exist in SL. So I searched a bit around all foru...

HTML5 canvas image how can be saved in SVG or base 64 format?

can we export canvas image as svg or base 64 and then import it back again? ...

HTML5 - best way to render an elliptic arc

I'm using HTML 5 to render elliptic pie charts per section; using a path that starts from the centre, out to the edge, across it's arc and back to the centre which is then filled. If they were perfectly circular I could use the arc or arcTo path functions, but because they're elliptical the outer curves will always have a variable radiu...

Drawing a SVG file on a HTML5 canvas

Is there a default way of drawing an SVG file onto a HTML5 canvas? Google Chrome supports loading the SVG as an image (and simply using drawImage), but the developer console does warn that resource interpreted as image but transferred with MIME type image/svg+xml. I know that a possibility would be to convert the SVG to canvas commands ...

refresh a bitmap or canvas in android

hello guys, can anybody tell me how to refresh or reset a bitmap or canvas to draw another image on it? actually i have a map binary file which contains bitmap tiles in bytes now problem is i have a buffer image with buffer image i get screen image to display. so when i move my screen image i need to refresh my buffer image and draw n...

how to use Picture.LoadFromFile() in TcustomContol

I created a TSkinPanel derive from TcustomControl it has a FGraphic: TPicture. the FGraphic is drawn on the canvas of the TSkinPanel and works fine if you load and image from the TObject Inspector. but i doesnt won'k work on loading image on runtime "Form1.SkinPanel1.Picture.LoadFromFile('skin.bmp'); ...

Any software like blend for HTML5 canvas animation?

Is there any software available like blend, for working with HTML5. Especially, to do animation related stuffs. ...

Smooth user drawn lines in canvas

I'm using <canvas> to capture user input in the form of a signature and am trying to figure out how to smooth the input from the mouse. I think I need to process the user's mouse movements chunk by chunk and smooth each chunk, I'm not after super smoothing but any improvement on the jagged input would be good. Thanks, Mark ...

How can I get debugging output from IE 9?

I am trying to make a website that uses the <canvas> element and Javascript to learn some new things. It works properly inside of Chrome and Firefox, but Internet Explorer 9 simply hangs on it. Neither Chrome nor Firefox give me any sort of error output in their consoles and IE9 just crashes without actually giving any debug output. Is...

How to use an .png image as background in canvas html5?

Hello, I would like to use an image for background in the canvas element provided by HTML5. The thing is I don't want the drawing to modify this image, I just want it to be use as a reference or guide for the user. For example: if I draw a background image on the canvas then I add some lines and random drawings, once I use the erase to...

HTML5 Canvas eraser

There's a way of implementing an eraser (other than using a white pencil?). I'm using layering, I have an image below the canvas, so, if eraser paints white, the user is going to notice since the below image isn't solid white. Thanx. ...

Android - Rotate Bitmap (bigger than Cavas) but centered with Canvas

Hi, I'm trying to rotate a bitmap (which is bigger than Canvas) keeping it centered with Canvas and repeatedly in time, in order to make it appears as spinning. I wanted to post an image explaining the situation, but I can't (not enough reputations; it's a pitty because I've spent a lot of time doing it :( ). I hope you understand what's...

html5 canvas prevent linewidth scaling

If I draw a rectangle of say linewidth=2 and then scale it to double the size of the rectangle, I get a rectangle that has its border double the size of the initial linewidth. Is there a way to keep the linewidth to the perceived size of 2 or the original size. In short, I want to just scale the size of the rectangle but keep the linew...

simple text animation in JavaScript/DHTML/canvas

Let's say I have some text as follows: do this, do that, then this, then that I use CSS to add a drop shadow. I can also use CSS to add a yellow glow behind "do this", as described here: http://www.kremalicious.com/2008/04/make-cool-and-clever-text-effects-with-css-text-shadow/ What I want is a repeating animation: 1 secon...

What does Canvas.getClipBounds() return if the canvas is rotated?

I have a simple question which keeps me thinking for a few hours now. Assume a canvas which is rotated by a specific (known) degree. I want to get the screen coordinates of a bitmap I have drawn on the rotated canvas. To achieve this, I need the canvas' clip bounds. This would be no problem for a non-rotated canvas. But it keeps giving ...

I am not able to draw shapes except for random lines onthe canvas. What will be the code for other options eg any line, rectangle or a triangle?

<script type="text/javascript"> var canvas, context, tool, e; var varblurup=0; var varsizeup=1; var swtchclr; // Keep everything in anonymous function, called on window load. if(window.addEventListener) { window.addEventListener('load', function () { //check tool is pen or line or shape var chktool="pen"; function in...

using Facebook Group Page 'Like' in canvas Tab

Hi Facebook recently announced the ability to link a Like button to a Facebook Page. I've created a simple canvas application and successfully added a share button using FBML, how ever, i'm now required to insert a 'Like' button also (i know adding a like button is strange when there's a like button at the top of the page, but thats wh...