canvas

Erasing in a WPF program

How can I make a MS Paint clone in WPF? I use Canvas and Shapes, but I don't know how to implement erasing. Should I use different controls, image control for example, or other drawing technology? ...

Online Photoshop via HTML 5's Canvas?

Does anyone know an online Photoshop -like editor that utilizes Canvas? I know at least 4 Flash editors, but I'm interested in finding a Canvas based one. ...

How do I give an HTML canvas the keyboard focus using jquery?

I am implementing a game using Javascript, jquery, and the Canvas tag. How can I prevent the browser from processing keyboard shortcuts when the canvas tag has the focus? I have tried event.stopPropagation() and it has no effect. I can pick up keyboard events. However, when the user presses the spacebar, the web page scrolls down in Fir...

javascript canvas putImageData not writing modified data

I'm attempting to desaturate an image. I'm currently loading it, parsing the image data, but I can't get it to write back to the canvas. I've followed all of the directions to do context.putImageData(imagedata,0,0); I do this, but the image data doesn't change. "ctx" is the context of the image that is previously loaded that is bein...

How to do a JavaScript HTML 5 Canvas image "page flip" like you commonly see in Flash?

Has anyone tried recreating the page flip effect with images like you commonly see in Adobe Flash with JavaScript and HTML 5's canvas tag? Are there any frameworks or JQuery plug-ins that do this type of effect? The page flip in Flash allows you to grab a corner of the simulated book page and flip the page like you would flip a real bo...

jQuery plugin for designing report layouts

I'm looking for some sort of jquery plugin (or even plain javascript) that can be used to create report layouts, business card layouts, etc. Not finding anything after lots of googling. Basically, I'm envisioning a canvas (possibly html5 canvas?) that shows a background grid. At a minimum, text and images can be added to the canvas. P...

Photoshop-like, embeddable web based image editor?

http://stackoverflow.com/questions/1841112/online-image-editor-ajax-or-flex-flash The above wasn't really the answer that I was looking for. I'm looking for an online image editor which I can embed into my pages, so users can edit images and submit them. I'm fine with it being Flash or Canvas/JS, no Silverlight or Java pleas...

Web Workers and Canvas

Are web workers allowed to access a canvas object? ...

Interface design with canvas.

Hi guys. Do you know of any document or tutorial to make HTML5's canvas drawn interfaces? I'm thinking of a layered structure, one for the main app interface and other for popups, menus, etc, working with several canvas objects and dynamically manipulating them, but i found it lacks flexibility (for example, what if i want a non rectang...

WPF: how to make the (0,0) in center inside a Canvas

The WPF Canvas has a coordinate system starting at (0,0) at the top-left of the control. For example, setting the following will make my control appear on the top-left: <Control Canvas.Left="0" Canvas.Top="0"> How can I change it to the standard cartesian coordinates? Basically: (0,0) at center flip Y I noticed this post is...

Silverlight: Add same UserControl to more than one Canvas

I have a bunch of UserControls ('MyUserControl') that I want to have a user manually add to one or more Canvases. One instance of a UserControl cannot be a child element of more than one container (otherwise a 'System.InvalidOperationException: Element is already the child of another element.' is thrown). Is there a way to do this witho...

Advice for a new JavaScript developer moving from Flash / ActionScript 3?

I have been moving over to JavaScript (esp. canvas) from Flash / Flex / ActionScript 3 (JavaScript is a more open platform), and I was wondering if anyone has any advice on differences between the two platforms, important things to note, pitfalls, optimizations, etc. ...

javascript game framework

Nowadays with <canvas>, it is easy to find all kind of cool stuff around the net. Like emulators, demos, games, just visual stuff, etc. But it seems that everyone is programming using the basic primitives of canvas. There exist any framework working over <canvas> or utility library? ...

[WPF] The "visible area" of a control ?

Hi, I have a Canvas within a ScrollViewer. The Canvas have a size of 600x600 and the ScrollViewer 400x400. If i scroll to the right side, i can't see 200pxl left side of the Canvas. Therefore my area of Canvas begins at x=200 but actually the visible area at x=0. Is there any way to get so "visile area" of a control by a property or some...

What kind of support does the iphone/ipod touch have for the canvas tag? Especially in regards to text?

I have seen this question/answer: http://stackoverflow.com/questions/719848/how-do-you-draw-text-on-a-canvas-tag-in-safari But I looking for how to do it on an iphone. Does the iphone support it already? Also, it'd be nice to see a web page that discusses what the current iphone os/browser supports regarding canvas, html 5 and othe...

what version of safari is the iphone os using? (as of 12/14/2009)

What version of Safari is on the iphone now? Is it Safari 4? Safari 3? 2? Something in between? In other words, when I'm writing code for the iphone, which version of Safari for the pc/mac will be the most accurate version to test it with? I think I've already run into a case where the canvas tag is handled differently on the iphon...

Silverlight Canvas: How does it work?

Hello all, In silverlight Canvas class (with Reflector) has very simple implementation: 3 attached dependency properties (Left, Top, ZIndex) and 2 ovverides of MeasureOverride and ArrangeOverride methods which do nothing special. But if i use my implementation like: class MyCanvas : Panel { /* Top and Left dependency properties implem...

Optimizing image load times. (thinking differently)

I've created an interactive image thing...but it takes a little too long to load. The interactive image thing is located at: southernwindowdesign.com It uses 5 images to step through each state (by clicking and dragging). I want to keep the images high-quality; so, any further jpeg compression is out (including punypng and smush.it)....

drawImage on canvas has weird aspect ratio in firefox and other problems

I am running firefox 3.5.6. I want to display an image on a canvas and draw a couple lines on it. It needs to display properly in firefox and internet explorer (using excanvas). Here is what I am getting: The top image is what I see in IE8, the bottom is what I see in firefox. IE seems to be a bit messed up as far as the canvas is...

Drawing squares on Flex Canvas

I'm trying to write some code to an animated images of squares on a Flex Canvas. There's something wrong with my code below because it becomes progressively slower. I assume I'm supposed to clear the old squares or something. What am I doing wrong below?: <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.ado...