List Info

Thread: free hand




free hand
user name
2006-12-14 14:32:38
yes, if you track all the coordinates
(evt.clientX/evt.clientY), then 
translate them into the local coordinate system (using
.getScreenCTM()) 
and then creating and updating the "d" attribute
of a path element.

Andreas

Peppe wrote:

>is there a method to draw "free hand"?
>  
>


-- 
----------------------------------------------
Andreas Neumann
Institute of Cartography
ETH Zurich
Wolfgang-Paulistrasse 15
CH-8093  Zurich, Switzerland

Phone: ++41-44-633 3031, Fax: ++41-44-633 1153
e-mail: neumannkarto.baug.ethz.ch
www: http://www.carto.net/ne
umann/
SVG.Open: http://www.svgopen.org/
Carto.net: http://www.carto.net/


------------------------------------------------------------
---------
To unsubscribe, e-mail: batik-users-unsubscribexmlgraphics.apache.org
For additional commands, e-mail: batik-users-helpxmlgraphics.apache.org

free hand
user name
2006-12-14 19:45:00
But, how can i set the values M C or Z of "d"
attribute?

-- 
View this message in context: http://www.nabble.com/free-hand-tf2819859.html#a7879653
Sent from the Batik - Users mailing list archive at
Nabble.com.


------------------------------------------------------------
---------
To unsubscribe, e-mail: batik-users-unsubscribexmlgraphics.apache.org
For additional commands, e-mail: batik-users-helpxmlgraphics.apache.org

free hand
user name
2006-12-14 19:55:58
there are two methods: either you use the methods of the DOM

SVGPathElement - see http://phr
ogz.net/ObjJob/object.asp?id=101 or you 
create a new textstring everytime a coordinate is added. It
might be 
enough just to concatenate the new coordinates to the
existing "d" 
attribute.

Andreas

Peppe wrote:

>But, how can i set the values M C or Z of "d"
attribute?
>
>  
>


-- 
----------------------------------------------
Andreas Neumann
Institute of Cartography
ETH Zurich
Wolfgang-Paulistrasse 15
CH-8093  Zurich, Switzerland

Phone: ++41-44-633 3031, Fax: ++41-44-633 1153
e-mail: neumannkarto.baug.ethz.ch
www: http://www.carto.net/ne
umann/
SVG.Open: http://www.svgopen.org/
Carto.net: http://www.carto.net/


------------------------------------------------------------
---------
To unsubscribe, e-mail: batik-users-unsubscribexmlgraphics.apache.org
For additional commands, e-mail: batik-users-helpxmlgraphics.apache.org

free hand
user name
2006-12-16 12:30:09
i try to add a path creating a textstring but there is a
problem...i don't
know what values to use (M C Q T etc..)...for example: if i
use C value,
what value can i add in C parameters? because C is C x1,y1
x2,y2 x,y but i
have only the x,y values...
pathValue = "M "+
startPt.getX()+","+startPt.getY()+" C ";
pathValue = pathValue + pt.getX()+ ","+ pt.getY()+
" " + .......(what??!!);
path.setAttributeNS(null, "d", pathValue);
-- 
View this message in context: http://www.nabble.com/free-hand-tf2819859.html#a7905817
Sent from the Batik - Users mailing list archive at
Nabble.com.


------------------------------------------------------------
---------
To unsubscribe, e-mail: batik-users-unsubscribexmlgraphics.apache.org
For additional commands, e-mail: batik-users-helpxmlgraphics.apache.org

free hand
user name
2006-12-16 13:01:08
free hand
user name
2006-12-16 14:16:06
Thanks Thomas, i've solved also this problem !

-- 
View this message in context: http://www.nabble.com/free-hand-tf2819859.html#a7906576
Sent from the Batik - Users mailing list archive at
Nabble.com.


------------------------------------------------------------
---------
To unsubscribe, e-mail: batik-users-unsubscribexmlgraphics.apache.org
For additional commands, e-mail: batik-users-helpxmlgraphics.apache.org

[1-6]

about | contact  Other archives ( Real Estate discussion Medical topics )