canvas

Implementing Conway's Game of Life in JavaScript with <canvas>

I've got some problems implementing Conway's Game of Life in JavaScript. At the German Wikipedia it says that this pattern here: Will create an empty world after 54 generations and the evolution looks like this: That means, the second generation looks like this: But when using my code, the second generation looks like this and t...

Flex canvas resizing

Hello, I have a certain behavior that i want from my screen to implement in Flex. My screen is devided to 2 areas: Navigator pane and content pane.(from left to right) When I shrink the browser, i want the content-pane show scroll bars and the components stay the same size originally. When I expand the browser to right(like in wide scree...

Partially transparent (opacity) HTML5 Canvas drawings

Is it possible to create partially transparent elements on the fly in canvas? Currently I'm setting the whole canvas element's opacity in CSS, but I want to some elements to be more visible then others. Nothing I've found so far indicates that this is possible. ...

Problem with SIngle and Double click events in canvas

Hi, I have a Canvas which is present in a usercontrol, I have attached the DoubleClick event to this user control like this mainWindow.CanvasLayout.MouseDoubleClick += new MouseButtonEventHandler(CanvasLayout_MouseDoubleClick); I am usign this event handler to achieve fullscreen functionality. Now, canvas can have various controls...

Assigning touch events to elements within canvas - iPad

I'm creating a web app for the iPad and I'm trying to assign a touch event to an element within canvas. I have it set up like this: function initialize() { touch_element = new Image(); touch_element.src = 'img/image.png' touch_element.onload = function(){ canvas.drawImage(football, 50, 50, 184, 120); touch_e...

A canvas object in jQuery, is it possible?

I intend to make a browser game with jQuery, I would need a canvas object in which I can place many visual elements and animate them to some extend. Is this entirely possible with just jQuery? Some may point to HTML5 canvas but it's specification isn't complete so I'm not too fond of it. ...

using <canvas> element from javascript

Is there any JS library designed for working with canvas elements? I don't really care about IE compatibility. I need to create objects(complex drawings with text) , draw lines between them, linear, bezier with different strokes, and attach event handlers to them(i need mouseOver and click). Anyone has any experience with a library tha...

Circle/Daisy Layout (Pin Wheel)in Android?

Hi Folks, I want create a Circle layout. my views are all should in the order circle. Which layout i have to prefer and How? The Focus of the Layout should clockwise circle. Share your ideas please? Thanks, Edit: I can do this view is the update for my question by comments. Is there any example for that to do?Please Share Your thoug...

jQuery dynamic canvas creation, $ctx.getContext is not a function

When I try to execute this in jQuery I get $ctx.getContext is not a function in firebug. var $ctx = $( '<canvas />', {width:'100', height:'100'} ) $widget.append($ctx) $ctx.getContext('2d') Any idea why I get this error? How do I dynamically create and initialize...

Textbox on canvas in j2me

hi all i'm going to make application on j2me Using canvas.... I want to take textbox or textfield on my canvas .. so plz tell me how to do this. Thanks... Neel ...

HTML5 Canvas API on a memory-saving 1bit per pixel CanvasRenderingContext?

Is there a way to use the HTML5 Canvas API on a memory-saving 1bit per pixel CanvasRenderingContext? I'd like to create reverse lookup buffers for graphical objects that should receive interaction. There should be a buffer (w*h*1 bit) for each interactive object. Those pixels where the object is touchable would have the value 1 (it's li...

html 5 addEventListener issue with refreshing Canvas element

I am having an issue getting addEventListener to trigger properly with my canvas element. Issue: When I add addEventLister onto my canvas element it automatically forces to animation refresh rate to run at the same time the event listener is being triggered. Basically I have "setInterval(draw, 500);" which updates the canvas every 500 ...

Problem binding a context menu item with a dependency property

Hi, I have a Custom Canvas(DesignerCanvas), user can add some controls to this canvas. Before adding any control canvas first wraps it insdie a custom control(Designer Item) and then add that control to canvas. This is done as in this codeproject article - WPF Diagram Designer - http://www.codeproject.com/KB/WPF/WPFDiagramDesigne...

Measuring text width to be drawn on Canvas ( Android )

Hi all! Is there a method which returns the width ( in pixels ) of a text to be drawn on an Android canvas using the drawText() method according to the Paint used to draw it. Thx. ...

Drawing multiple images to a canvas using image.onload

I am running into problems when trying to draw a large 2D array of images onto a canvas. Using a separate program, I'm taking one big image file and breaking it up smaller, uniform pieces. I'm using the 2D array to represent this "grid" of images, and ideally when I assign the src of each element in the grid, that image would be drawn to...

jQuery: notification of visible html elements

I want to be able to find out when a page element is on or off the viewers screen. Specifically, I'd like to be able to "turn off" an html 5 canvas (Processing.js) script if the user has scrolled past the canvas and back on when it is visible again in the users browser. Does this make sense? I am thinking that there must be some way for...

html5 canvas: server or client fast transforms from longitude latitude to pixel values

I am working on some maps and animations using the html5 canvas element (example visible here.) I would like to be able to efficiently generate pixel-valued linestrings (x1, y1, x2, y2), ideally from PostGIS, based on the geometry of the canvas. That is, in pseudo-geojson: "Coordinates":"[[-122.0, 35.0], [-121.0, 36.0]]" might outpu...

Cutting edge online WYSIWYG editor wanted

What is the most efficient WYSIWYG editor that can be used on a blog? I'm looking for something like the one in Gmail, but I'm really annoyed that sometimes the cursor gets stuck in some invisible wrapper div tag or after selecting and deleting a part of text the cursor jumps to then end of the whole block. The ideal editor doesn't hav...

How to do object repositioning/moving within a canvas?

Hi, How to reposition/move an object (with its content) within a HTML5 canvas? The flow might be: a) select an area (using triangle, like that of MS paint function icon?) b) move the object to a new location (repositioning) with the content intact. Would appreciate your help. ...

What 'html5' frontend tech to use for a drag and drop team management app?

Hi, Background: I'm trying to build a web app (as a personal project using modern browsers only) that will leverage the http://www.blackoutrugby.com API. This is an online rugby mgt simulation game. The intention is to offer something powerful to the user which will calculate best teams based on current stats from their team and oppone...