Hi, Andrew
Thanks for introduce me in svg and i see your example in Shapes.java
but why my map can't show same youy example ..
void mapTax ()
if (type_no == 0)
{
display.setCurrent(canvas);
canvas.repaint();
SVGDocument doc = canvas.loadSVG("/tinyline/helvetica.svg");
SVGFontElem font =
SVGDocument.getFont(doc,SVG.VAL_DEFAULT_FONTFAMILY);
SVGDocument.defaultFont = font;
PlayerListener defaultListener = new PlayerListener(canvas);
canvas.addEventListener("default", defaultListener, false);
canvas.start();
canvas.goURL("/svg/land.svg");
Draw();
}
void Draw()
{
SVGRaster raster = canvas.raster;
SVGDocument document = raster.getSVGDocument();
SVGSVGElem root = (SVGSVGElem)document.root;
SVGNode node = SVGNode.getNodeById(root, new
TinyString("temp".toCharArray()));
SVGPathElem path = (SVGPathElem)document.createElement(SVG.ELEM_PATH);
node = SVGNode.getNodeById(root, new TinyString(id.toCharArray()));
// id is input from user //
if(node != null)
{
SVGNode parent = node.parent;
int index = parent.children.indexOf(node,0);
parent.addChild(path, index + 1);
}
path.id = new TinyString("temp".toCharArray());
path.fill = yellowColor;
path.stroke = redColor;
path.strokeWidth = 2;
path.createOutline();
raster.setDevClip(path.getDevBounds(raster));
raster.update();
raster.sendPixels();
}
Regards,
Chalat R.
andrewgirow <[EMAIL PROTECTED]> wrote: Hi,
You should check TinyLine SVG API
http://www.tinyline.com/svgt/download/docs/index.html
Where you can find that you can change the path data using
public int setAttribute(int hattr,
java.lang.Object value)
throws java.lang.Exception
For example, for the path data attribute
path.setAttribute(SVG.ATT_D, newPath),
where newPAth is the new TinyPath object.
Or for other attributes
path.setAttribute(SVG.ATT_FILL,fillColor);
path.setAttribute(SVG.ATT_STROKE,strokeColor);
path.setAttribute(SVG.ATT_STROKE_WIDTH,stroke_width);
Also, I've noticed that coordinates in your exmaple are out of range
The coordinates should be limited in range between -32,767.9999 to
+32,767.9999.
For futher help you could visit the TinyLine forum at
http://www.tinyline.com/forum
Cheers,
Andrew
--- In [email protected], Chalat Rangsimatewan
<[EMAIL PROTECTED]> wrote:
>
> Im so Sorry !!
> im use tinyline to implement in netbean5.0.
> im cant change element path of properties example
> <path id="06D018" d="M366781.9 -1845753l4.2 .6l-3.1 21.4l-4.1 -
.6l3 -21.4z" />
> how to get path properties <ex. id>
> and to change it or add properties <ex. add fill="red">
>
> thank you very much .. ^^
>
>
> Antoine Quint <[EMAIL PROTECTED]> wrote: On 20 janv. 2007, at 10:54, chalat
rangsimatewan wrote:
>
> > Im try to develop svg in mobile device (Nokia 6670).
> > I cant to change path properties (fill).
>
> What SVG engine are you using exactly? Is it SVGT 1.2 capable? JSR
> 226 Java APIs? As far as I know, the 6670 has no native support
for
> SVG Tiny, so you'll have to tell us more about your working
environment.
>
> Antoine
> --
> Blog http://the.fuchsia-design.com
>
>
>
>
>
> -----
> To unsubscribe send a message to: svg-developers-
[EMAIL PROTECTED]
> -or-
> visit http://groups.yahoo.com/group/svg-developers and click "edit
my membership"
> ----
> Yahoo! Groups Links
>
>
>
>
>
>
> ---------------------------------
> Looking for earth-friendly autos?
> Browse Top Cars by "Green Rating" at Yahoo! Autos' Green Center.
>
> [Non-text portions of this message have been removed]
>
__________________________________________________
คุณใช้ Yahoo! รึเปล่า
คุณเบื่อหน่ายอีเมลขยะใช่ไหม Yahoo! เมล มีการป้องกันอีเมลขยะที่ดีที่สุด
http://th.mail.yahoo.com
[Non-text portions of this message have been removed]
-----
To unsubscribe send a message to: [EMAIL PROTECTED]
-or-
visit http://groups.yahoo.com/group/svg-developers and click "edit my
membership"
----
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/svg-developers/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/svg-developers/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/