I'm working on a Palm Pre app and I need to find an alternative to "canvas.toDataURL("image/png");". Ideally it could export the canvas image to a jpeg file but png would be find also.
...
This code is from http://processingjs.org/
which only works in firefox
<!DOCTYPE html>
<html>
<head>
<script src="../../processing.js"></script>
<script src="../init.js"></script>
<link rel="stylesheet" href="../style.css"/></head>
<body><h1><a href="http://ejohn.org/blog/processingjs/">Processing.js</a></h1>
<h2>Sna...
Has anyone implemented a flood fill algorithm in javascript for use with HTML Canvas?
My requirements are simple: flood with a single color starting from a single point, where the boundary color is any color greater than a certain delta of the color at the specified point.
var r1, r2; // red values
var g1, g2; // green values
var b1, ...
I have a png image with white edges. I would like to make the edges transparent.
Is there a way to specify a color to be not painted - like a color key or alphamask.
Are there any examples?
For example this image has white edges, and I would like to paint two of them close to eachother without the white.
How can I do that in javasc...
Hi,
I'm using the Canvas object with javascript. Just doing some tests to see how fast I can set pixels in a draw loop.
On mac, it works great in FF, safari, chrome. On windows, I get a flickering effect on FF and chrome. It looks like somehow the canvas implementation on windows is different than on mac for the different browsers? (n...
I am trying to dynamically add data points to jqplot as a result of AJAX received data, but I do not see a way to accomplish this. Is this not possible?
If it isn't, what other packages are available that can accomplish the same basic graphing plus allow for dynamic data?
...
I have a banner at the top of my website that is blue with a light radial gradient on the left side.
I want to have white text animated that scrolls up on the right side of the banner. I want it to fade in as it appears and then fade back out. I would like to do this without the use of Flash, and as little Java as possible. I can wo...
Hi there,
After experimenting with composite operations and drawing images on the canvas I'm nog trying to remove images and compositing. How do I do this?
I need to clear the canvas for redrawing other images; this can go on for a while so I don't think drawing a new rectangle every time won't be the most efficient option.
Thanks!
...
I am trying to achieve an effect of transparent JFrame on top of video stream provided JVLC library.
Background is an instance of java.awt.Canvas
Foreground is my whatever JFrame with a couple of controls on it.
rootPane.setForeground(myFrame);
rootPane.setBackground(myCanvas);
JVLC uses my canvas through JNA like this
jvlc.setVideoOut...
I'm looking for a way to draw a self intersecting polygon with holes, I'm using the HTML Canvas element.
So given 5 points, I want to draw the red one below.
This question is essentially the same thing.
Note: I don't want to do this using line intersections and adding more points, the actual paths I will be using will be curved.
...
I have a Canvas inside of a StackPanel in my WPF Designer in Visual Studio 2008. At runtime I plan to resize the Canvas so its client rect is a certain size (borders and other parts are just added onto that size). When I resize the Canvas, will the Width/Height of the StackPanel adjust itself accordingly? This is important since I have o...
Do you know a good js library to work with canvas? I've already tried with Processing.js but i want to know if there are some good alternatives to it.
...
I'm trying to draw a curve through multiple points (more than 3) .
I tried to draw those points using available lineTo(), bezierCurveTo().
Could anyone help me solve this ?
May be there is some workaround to draw this using arc() function ?
...
There doesnt seem to be a native function to draw an oval-like shape. Also i am not looking for the egg-shape.
Is it possible to draw an oval with 2 bezier curves?
Somebody expierenced with that?
My purpose is to draw some eyes and actually im just using arcs.
Thanks in advance.
Solution
So scale() changes the scaling for all next sh...
I draw 2d images on the canvas using the following tutorial.
http://www.designerandroid.com/?cat=3
I want to save what ever dispalying in a canvas as a jpg image, how can i do it ??
Thanks in advance.
...
Hello,
I've been successfully using dojox.gfx with SVG renderer to render my graphics in a browser-independent way.
I know that on of the main reasons why SVG-style filters have not been implemented in dojox.gfx is because they are not part of the Canvas and VML specification.
What I am trying to achieve is apply some effects to my d...
Hi canvas experts,
If I have a QT video on a page (where QT is a requirement that can't be changed) how can I grab the pixel data of the current frame that is being shown with canvas? I am aware that this is possible with getImage(videoElement, .....) but I am looking for a solution that uses QT.
If getting the pixel data is not possib...
Hi
I have an element positioned on Canvas using attached properties Canvas.Top and Canvas.Left. Then using animations the element is moved to different set of coordinates, like this:
DoubleAnimation left = new DoubleAnimation( oldLeft, newLeft );
DoubleAnimation top = new DoubleAnimation( oldTop, newTop );
element.BeginAnimation( Canv...
How can I center an element in wpf canvas using attached properties. Please help.
...
Hi All
I have an app where users can drag controls around on a Form. But they
re asking me for Snap-To lines to make the alignment of controls easier. I have no idea about the snep-to lines and how to implement them - I have looked at:
http://msdn.microsoft.com/en-us/library/ms752100.aspx Adorner's, but it says it's only for WPF. And I...