[prev in list] [next in list] [prev in thread] [next in thread]
List: batik-dev
Subject: Re: Questions
From: Alberto Carrascal <albcarrascal () gmail ! com>
Date: 2013-09-09 5:39:04
Message-ID: CAHnnHzWhBdeV0Z4i5H3JZ7CPU7OwFH6WnbfnuTcP4EuUmfQ1xw () mail ! gmail ! com
[Download RAW message or body]
Hi Laurent,
A way to do it by hand:
Element elem = doc.getElementById(topElement);
String str = elem.getAttribute("height").trim();
if (str.endsWith("px"))
str = str.substring(0, str.length() - 2);
double height = Double.parseDouble(str);
2013/9/8 Laurent Meyer <laurent.m.meyer@gmail.com>
> Hi,
>
> I'm learning java and I like to build a small tool for my svg but I got a
> problem : all works fine but, to do some improvements, I'd like to know the
> width and the height of my input svg, I search around the Web and in your
> library how to get them but I didn't find what I was looking for. Do you
> have any idea to solve my problem ?
>
> Thanks in advance,
>
> Laurent Meyer
>
[Attachment #3 (text/html)]
<div dir="ltr">Hi Laurent,<div><br></div><div>A way to do it by \
hand:</div><div><br></div><div>Element elem = \
doc.getElementById(topElement);<br></div><div>String str = \
elem.getAttribute("height").trim();</div><div> <div>if \
(str.endsWith("px"))</div><div> str = str.substring(0, str.length() - \
2);</div></div><div>double height = Double.parseDouble(str);<br></div></div><div \
class="gmail_extra"><br><br><div class="gmail_quote"> 2013/9/8 Laurent Meyer <span \
dir="ltr"><<a href="mailto:laurent.m.meyer@gmail.com" \
target="_blank">laurent.m.meyer@gmail.com</a>></span><br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"> <p dir="ltr">Hi,</p>
<p dir="ltr">I'm learning java and I like to build a small tool for my svg but I \
got a problem : all works fine but, to do some improvements, I'd like to know the \
width and the height of my input svg, I search around the Web and in your library how \
to get them but I didn't find what I was looking for. Do you have any idea to \
solve my problem ?</p>
<p dir="ltr">Thanks in advance,</p>
<p dir="ltr">Laurent Meyer</p>
</blockquote></div><br></div>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic