Login Register

shape

Transform shape by matrix

Hello everybody,

i´m trying to convert some SVG-Files to dojox.gfx compatible shapes. Some SVG-Tags contain transform-Attributes, like rotate(), matrix and so on...
for example something like that: <polygon ... transform="matrix(1,2,3,4,5,6)"></polygon>

Now i´m trying to port this matrix(...) which transforms the polygon to a dojox.gfx surface to transform a shape (like a rectangle or something else).
Up to now i tried a lot of things, but something worked :-(
Here a some excerpts of my attempts to solve the problem:
shape.setTransform({1,2,3,4,5,6});

Any widget for shape stroke width change?

To be more specific, I'd like something similar to the "Line Width" in this link:
http://www.xdraw.org/xdhTest.html

That is the third icon in the second row. When you click "Line width" icon, a drop down line width(in line images, instead of numbers) will appear.

A dijit.ColorPalette() is already available for changing colors in Dijit. I wonder if similar things for stroke width changes available in Dijit too.

Dynamically generating tooltip widgets

Hello, I am trying to dynamically generate a set of tooltip widgets, and I'm not sure why the tooltip isn't showing up. I know the tooltip won't work in firefox, but I have gotten it to work standalone in ie, safari, and opera. Right now each circle being drawn doesn't show the tooltip, I'm not sure if the variables that I am drawing aren't working or what. Here is a link to the code: http://pastebin.com/f7e8e5ab6

GFX image problems on IE7

Hello,

Has anyone ever encountered the following problem with GFX on IE7?

When I draw a regular vector shape (say, a line) in one part of the canvas and an image in another part of the canvas, then line becomes inaccessible to mouse events.

Example code:

var container = dojo.byId("canvas");
var dojoSurface = dojox.gfx.createSurface(container, 800, 400);

var dojoLine = dojoSurface.createLine({x1: 10, y1: 10, x2: 30, y2: 30}).setStroke({width: 5, color: "#0000ff"});
dojoLine.connect("onmousedown",function(){console.debug("line clicked");});

dijit.form.TextBox doesn't show up

This is a question combined with dijit and dojox. I wanted to use the following function to create a TextBox on the top of a shape when the mouse double-click the shape on the drawing surface.

onDblClick=function(event){
var params = {id:"newtext"+this.id, value: "annotation testing"};
var textbox=new dijit.form.TextBox(params);
this.surface.getEventSource().appendChild(textbox.domNode);
........
}

shape.moveToBack() makes the shape unselectable

I used both moveToBack() and moveToFront() exactly the same way. Everything is fine with shape after moveToFront() , but the shape becomes unselectable after moveToBack() operation... It seems the shape is hidden behind canvas after moveToBack(), although it's still visible in the canvas.

-Sharon

text annotation on a shape in the drawing canvas

[editor: moving to the appropriate forum…]

I need to do 'in-box' text annotation for shapes, meaning when the user double-click a shape, he/she is able to type the text on the shape in the canvas, instead of a prompted separate text box, like in dojox.sketch.

My initial thoughts would be to add a "dijit.form.TextBox" on the shape, but how to add such a textbox or text area or similar thing on the shape in the canvas? Thanks.

-Sharon

GFX Group in IE works strange

I found that grouping in IE works not very well. I've got everything perfect in FireFox, but IE makes me nuts!

How to duplicate the selected object?

The selected object is a shape. How can I use the available "clone" function to duplicate this selection? I don't want to specify the shape: rect, circle, line etc, but just to duplicate a general shape. Thanks!

Does GFX Shape support Mouse Event?

Does GFX Shape support Mouse Event? such as onmouseover,onmouseout,onmousedown?
These events are supported in SVG,and i am imigrating SVG chart to dojo,can anybody help me?

Syndicate content