canvas

converting canvas into bitmap in android

I am trying to develope an app on canvas ,i am drawing a bitmap on canvas with the help of canvas.drawBitmap().After that i want to convert that canvas into bitmap. can anyone give me suggession thanking you in advance ...

HTML5 multiple canvas on a single page.

If we use multiple on a single html page does it hamper the performance of the application that is being developed and does the code get very bulky and require more time to load the page? ...

What Does This Mean and How Does It Help?

Hi! At the moment I'm coding a web application that imports image data from Google Maps via the Static API - http://code.google.com/apis/maps/documentation/staticmaps/ - into an HTML5 canvas. Unfortunately, I've run into the problem of not being able to manipulate the pixel data from Google Maps due to cross domain restrictions. How...

Get image from canvas in C#

I have a canvas (HTML5) on my website and I would like to get the content of this canvas and convert it into a file stream in my C# code behind and save this file stream as an image. Is this possible in C# or is there a workaround? Thanks ...

Dock a Canvas in its parent

How can I "dock" a canvas in its parent? I have a UserControl that contains a canvas inside. <UserControl x:Class="MyUC" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/20...

html5 canvas element how to get width and height

hello, how can i get the width and height of the canvas element in javascript? also, what is the "context" of the canvas i keep reading about? thanks! ...

HTML Canvas Full Screen

Hi I'm playing with the following app using the HTML Canvas: http://driz.co.uk/particles/ At the moment it is set to 640x480 pixels, but I would like to make it full screen as it will be shown a projector. However as far as I can tell I cannot set the canvas size to be 100% as the variables only except numbers and not the %. Using CSS j...

Flex: Label Overflow

If I have two sibling canvases displayed next to each other, can I have a child Label (or any child component for that matter) in the left canvas overflow outside of that canvas and on top of the next? Something like this: ______________ ______________ | ----------------------------- | | | Label overflow test | | | -----------...

How is the swoosh done on beautyoftheweb.com?

On Beauty of the Web, there is a purple/blue swoosh at the beginning, if you are in IE9 or Chrome. How is that done? What is that? How come it only displays in IE9 and Chrome? ...

Draw From Old Canvas - Android

Hey guys, I'm making an App that needs to be able to draw new graphics on top of the last set. This is my current onDraw() method - protected void onDraw(Canvas canvas) { canvas.drawColor(Color.WHITE); if(points.size() > 0) { //do some stuff here - this is all working ok canvas.drawLine(p1.x, p1.y, p2.x, p2....

How to draw text on canvas?

Hi, i'm trying to develop a simple pie chart class for android. For now, it can take a map of labels and values and draw the pie chart. I'm yet to add the legends for the pie, which is where i need to place the texts near small rectangles on the screen corner. Any help appreciated, since i'm new to Android dev. Thanks. ...

Webkit canvas drawImage() and canvas not-integer scale factor bug?

Hi. I've got a problem with canvas context drawImage() method if an image is drawn on a canvas that already has not-integer scale factor. It seems that such images are clipped in a weird way (sometimes the most right part of an image is clipped, sometimes the most bottom side, sometimes both). This problem appears at least in Google Chr...

Seamless drawing in multiple canvas.

Hi! I'm trying to make a simple drawing tool using JS and Canvas element. My problem is that I would like to have several canvases and user should be able to draw one line through all of them. Here's a little page I did: <!DOCTYPE html> <html> <head> <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/...

HTML 5 canvas animation - objects blinking

I am learning ways of manipulating HTML 5 Canvas, and decided to write a simple game, scroller arcade, for better comprehension. It is still at very beginning of development, and rendering a background (a moving star field), I encountered little, yet annoying issue - some of the stars are blinking, while moving. Here's the code I used: ...

rub image in canvas

I am using android 2.x and I have four bitmaps drawn on a canvas, now i want to replace "yahoo" image with some other image and that image's size is different than "yahoo" image. Now what i want is , i want to rub the yahoo image and replace it with the new one but in such a way that if i rub "yahoo" image then images that are laying in ...

How to randomly but evenly distribute nodes on a plane

Hi All. I need to place 1 to 100 nodes (actually 25px dots) on a html5 canvas. I need to make them look randomly distributed so using some kind of grid is out. I also need to ensure these dots are not touching or overlapping. I would also like to not have big blank areas. Can someone tell me what this kind of algorithm is called? A re...

HTML5 canvas application (javascript) - how to detect a memory leak?

I've encountered a strange problem - application is rapidly slowing down as it runs. Only thing that springs to mind is a memory leak, but how to detect it in javascript? Are there any tools? Anyway, here's the code: function draw_ship(){ //Body var sbpaint = ctx.createLinearGradient(shipx+20,shipy,shipx+20,shipy+15);//painting ...

html canvas font scaling problem , text is flickering without reason

I readed many forums, but never found some analogue case. Javascript canvas font displays in a flickering fashion. The conditions appears to be: scale of the canvas is not an integer (for example setScale(0.1,0.3)) setTransform(1,0,0,1,0,0); and setScale are used widely to restore setting at every draw of new objects. Windows. In linu...

HTML5 canvas: Draw rectangle around text?

I want to be able to draw a fitted rectangle around text labels (person's full name). The margin isn't terribly important, but I can't just draw fixed-sized rectangles because the labels vary in lengths. How do I do this? Here's the code that draws the text labels: var ctx = document.getElementById('map').getContext('2d'); for (i=0; i ...