Relationship between Surface and Canvas: Android
What exactly is the relationship between a Surface and Canvas. Please explain. ...
What exactly is the relationship between a Surface and Canvas. Please explain. ...
hi everyone, is there a way to automatically add the tab of an application to the users profile page, after he installed the application? thanks in advance ...
So, I'm using whatever Object-Oriented options has to try and make a neat static image class so all I have to do is add said class to Canvas, and it will draw itself out! To test if everything worked, I added up some alerts. Now my Function starts spewing 'undefined' at the third alert. function StaticImage(imgsource, cancontext, ex, wy...
I'll start with the script: function saveInstance() { _savedInstance = document.getElementById('canvasID').toDataURL(); } function restoreInstance() { ctx.drawImage(_savedInstance,0,0); } The purpose is to save an instance of the canvas and re-apply it later [Similar to how ctx.save() saves the style and transformations...
With the beginning of widespread HTML5 support and Canvas support, it seems that someone could create a desktop-esque windowing system library for RIAs. Something similar to Qt or WxWidgets. All the required parts seem to be there (runtime language: javascript, pixel drawing: canvas, even vector drawing with SVGs). This seems to me an...
I'm trying to have a WPF canvas with rounded rectangles on that I can drag round using the mouse. However once I try and capture the mouse on the canvas I don't get the move events any more. This is a "mycanvas" user control and the rectangles are "foo" user controls. The XAML for these (minus the preamble) are: mycanvas.xaml: <Canv...
Im currently developing a program that uses a scrollable/zoomable image as the main user interface. It uses a canvas which is manipulated by a matrix to traverse a large area. Instead of loading a super large bitmap into memory, i wanted to employ a tile system to load 256 by 256 squares. My problem is that the app will lag when the ima...
I want to know how I can translate an entire scene already drawn on an html5 canvas, for example 5 pixels down. I know the translate method just translates the canvas' coordinate system, but I want to know if there is a way to translate the entire scene that is already drawn onto the canvas. ...
I have this bound to the mousemove event of my canvas: function(e){ var contDiv = $('#current_system_map'); var offset = contDiv.offset(); x = e.clientX-offset.left; y = e.clientY-offset.top; context.beginPath(); context.moveTo(0,y); context.lineTo(595,y); context.moveTo(x,0); context.lineTo(...
I have a HTML5-canvas and write text with context.fillText(...); using a @font-face-font. Displaying the page with Firefox (3.6) I have the problem, that on the first paint of the canvas the font is not downloaded yet so the text will be displayed with a standard-font. I found a 'solution' here but it does not work, because the font is o...
I haven't got a practical use for this, I was just wondering if it is possible. Can I use the canvas element as a css background? ...
As a simple javascript library, we have jquery which is very powerful. But I want to know which are some of the powerful canvas library in terms of usability, flexibility and versatility. I found Raphael to be pretty interesting, but I found it has very less effects. ...
Hello Community! I'm trying to create a custom tab navigator that has to look like . Also, when there's a rollover, the borders of the arrow have to be in blue (like the label in the current tab). For that purpose, I've created a custom component: a hbox containing a label and a canvas with 3 images inside (for the arrow tip that has...
I am using the HTML canvas tag to draw around 3000, vector lines on a small area (900x500) the target platform is mobile which has inherently lower spec'd hardware. On my desktop I can make the 3000 vector lines render, using moveto and lineto in about 25ms. However on the mobile device it's more like 700ms which is significantly slower....
Hi everyone, I have searched for quite a few hours and have not been able to find a concise definite andswer to my question. I have an application where I need to draw a sports field (including all pitch lines) to the screen. So far, I have extended the SurfaceView and pretty much copied the rest of the LunarLander demo as well. All the...
I am making a game using html canvas. Here is my progress: http://db.tt/ei3LlR (use WASD and Left/Right Arrow keys) Helps to ZOOM. My questions are: Why does the shadow flicker in google chrome when the tank is turning? Why does the turret image flicker in safari when the turret is turning? Why does it work fine in Firefox? ...
I modeled my game after the Lunar Lander demo that Google provides, and it uses Canvas and onDraw() methods, but I want to get better performance by using Opengl. How much work is it to convert it to Opengl? Can I just replace the ondraw methods with opengl's texture methods or something? Or do I have to completely recreate the game? C...
Here's a canvas app I come across : canvasphoto (uses YUI 2 I believe, which I haven't used before). It displays images on a canvas and it lets you resize/move the images across the canvas. What I want to do is to add a close button on the top right side of the images drawn on the canvas and have it trigger an onclick event when clicked ...
I just started to work with canvas. I need to simulate some image in pure canvas. image => tool => [1, 20, 80, 45.....] => canvas => canvas render image some picuture coordinates this picture but rendered(created) via canvas Are there any tools that help to get image lines coordinates (to map)? So, next, I could just use th...
I've been messing around with the canvas element in html5, and this is what I've got after a bit of experimenting function canvasMove(e) { var canvas = document.getElementById('game'); if(canvas.getContext) { var draw = canvas.getContext('2d'); draw.fillStyle = 'rgba(0,0,0,0.5)'; draw.fillRect('10', '1...