Hello All,
I am trying to arrange the shapes in canvas control before changing it to a bmp file.
I am calling Measure, Arrange and updatelayout methods subsequently and opening the bmp file in documentviewer for printpreview functionatliy.
but, my shapes are connected by line with arrow head, which is not properly arranged (the arrowhe...
I'm looking for a fast and easy way to plot arbitrarily colored pixels in an SWT Canvas.
So far I'm using something like that:
// initialization:
GC gc = new GC(canvas);
// inside the drawing loop:
Color cc = new Color(display, r, g, b);
gc.setForeground(cc);
gc.drawPoint(x, y);
cc.dispose();
This is horribly horribly slow. it takes ...
I've been experimenting with using the <canvas> tag for drawing simple diagrams and charts, and so far it's pretty easy to work with. I have one issue thought. I can't figure out how to draw text on a <canvas> in Safari. In Firefox 3.0, I can do this:
Chart.prototype.drawTextCentered = function(context, text, x, y, font, color) {
i...
I'm searching for a Javascript library to create line charts like the ones of Google Analytics. When the mouse is over a point, a box shows you the data.
An example is at http://wikirank.com/en
No Flash or Air, only JS and client-side Canvas...
Better if Free...
...
One of my components looks like this:
<mx:Canvas id="grid" width="100%" height="100%"></mx:Canvas>
On creationComplete, I load some spirte that I want to scale and position based on the dimensions of the canvas to create a custom grid layout, but when I access the dimensions of 'grid' I get 0 and 0. Is there any way to get the dimensi...
So I made my own carousel control in WPF. I have stumbled upon a bug and was wondering if anyone knew how I could fix this like a method call or a series of methods calls or some work-around. Here is a print screen of my carousel:
As you can CLEARLY see with this image, my mouse pointer is OVER the button with 16 written on it. But th...
I am using gdi+, in c++.
Bitmap canvasImg = new Bitmap(400, 300, PixelFormat32bppARGB);
Graphics canvas = new Graphics(&canvasImg );
canvas.DrawImage(XXXX);
There are two problems.
1. I find the canvasImg is black. How can I change the color to white? I mean I want an white canvas.
2. If I have drawn some thing on the canvas, How c...
Javascript CANVAS is amazing: it allows us to draw something like lines, polygons on the browser screen.
I wonder how does Javascript CANVAS works. For example to draw a line, does it use a series aligned tiny images to simulate the line or some other approach?
Thanks in advance.
...
I am designing a user control in sliverlight that inherits from canvas. It is necessary for me to find out when a new UIELement is added to Children property of MyBase but there is no event like "ItemAdded". Since I want to animate the children of my canvas, I can not use LayoutUpdated event (It is hit a million times).
...
Can you serialize/deserialize a canvas object in javascript?
...
I have this :
private function tileList_itemClick2(evt:ListEvent):void {
img = new Image();
img.maintainAspectRatio = true;
img.addEventListener(Event.COMPLETE, image_complete);
img.addEventListener(ResizeEvent.RESIZE, image_resize);
img.addEven...
Hi,
I'm trying to make a paint editor with Java in which I have a toolbar with the objects that I would like to paste in the canvas. I'm using swing components to make the GUI, but when I looked for the way of making the canvas, I only found the class canvas from awt.
Is there any way to make something similar to canvas with swing? (f...
private function tileList_itemClick2(evt:ListEvent):void {
img = new Image();
img.maintainAspectRatio = true;
img.addEventListener(Event.COMPLETE, image_complete);
img.addEventListener(ResizeEvent.RESIZE, image_resize);
img.addEventListener(Mo...
I have a MVVM WPF application that basically wants to be a single line diagram designer for an electrical distribution network.
I have a canvas that must contains transformers, circuit breaker, lines and cables.
My big problem is the design... How can i start?
I think about a DesignerView, DesignerViewModel that contains an Observable...
Hello,
I have a canvas wich is a drawing area. This canvas can be scrolled horizontally and vertically.
I am trying to make a screenshot of the whole canvas, this include visible and scrolled parts.
var bmd:BitmapData = new BitmapData(board.width, board.height, false, 0xffffff);
bmd.draw(board);
This would only show me the visible ...
Hi,
I have a Canvas A with scrollpolicy on,
A has one unique Child canvas B which has no scrolling.
A is the container of B which is a whiteboard like tool.
If i dont set width and height of B, he will resize accordingly to A size, up to a certain point where A has scrollbars which is the good Behavior.
However since B canvas seems t...
I'm developing an alternate backend for the canvas interface. I started setting up test cases, and then it occurred to me that there may already by a set of tests, but google isn't forthcoming.
...
The canvas element unfortunately doesn't handle text well. There are a bunch of approaches (see e.g. http://canvaspaint.org/blog/2006/12/rendering-text/ ), but they mostly seem like hacks. What can I do that is cross-platform and gives me the most flexibility to make my fonts like how I want?
...
...or...
"What evil in the depths of WPF have I awoken?"
I'm creating a Canvas on a background thread and rendering it to a bitmap. I've had this working in production code for over a year now without problems. I do the following:
create a Canvas object
create a new NameScope object
assign that NameScope to the Canvas
draw whatever I...
Hello,
I want to draw an arrow using the canvas tag, javascript. I've made it using the quadratic function, but I'm having problems to calculate the angle of rotation of the arrow...
Anyone have a clue on this?
Thank you
...