Return-Path: X-Original-To: apmail-xmlgraphics-batik-users-archive@www.apache.org Delivered-To: apmail-xmlgraphics-batik-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 259AFC6B9 for ; Thu, 24 May 2012 00:50:49 +0000 (UTC) Received: (qmail 82738 invoked by uid 500); 24 May 2012 00:50:49 -0000 Delivered-To: apmail-xmlgraphics-batik-users-archive@xmlgraphics.apache.org Received: (qmail 82630 invoked by uid 500); 24 May 2012 00:50:48 -0000 Mailing-List: contact batik-users-help@xmlgraphics.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: batik-users@xmlgraphics.apache.org Delivered-To: mailing list batik-users@xmlgraphics.apache.org Received: (qmail 82621 invoked by uid 99); 24 May 2012 00:50:48 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 24 May 2012 00:50:48 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of joscha@feth.com designates 209.85.217.182 as permitted sender) Received: from [209.85.217.182] (HELO mail-lb0-f182.google.com) (209.85.217.182) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 24 May 2012 00:50:40 +0000 Received: by lbon10 with SMTP id n10so10484985lbo.27 for ; Wed, 23 May 2012 17:50:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type :x-gm-message-state; bh=jJ09m5oGkFgViZT8a8Rx40wVlCPS36guKsiz27nTimg=; b=Qv/SDCFnN1+908Y1lqgjBCOV63rlgE4sZzBgtt95GnHLfSwswVNVj+HpOl5vQDj9Bm x7mQbIu6ufn9f0CIZA1r4Kh3zEyFH1PnWhPcDaepBXIPIeHCKbxKFPQHxqJF/YikMcXY mhaljyZRLBSRGFnJO83Kzhi6fT3ex8FJkjbxZHWoc+/uQ3wPV6valLa7A+D5F4qar5pA mo2lah1R/LaOpl37SfZcqFsnyQOJqyGu0XqoFe4/dE0CZNqey5ms/j9SYVI6oVq5DdqX CljA96LNkg0VDM6vnkKlWKug5Y8zYyRSz8jffWzn050FrbXV0nX2b1uUxA1nkuATKDvq 1b2Q== Received: by 10.112.102.8 with SMTP id fk8mr12248960lbb.71.1337820619834; Wed, 23 May 2012 17:50:19 -0700 (PDT) MIME-Version: 1.0 Received: by 10.112.48.66 with HTTP; Wed, 23 May 2012 17:49:59 -0700 (PDT) From: Joscha Feth Date: Thu, 24 May 2012 02:49:59 +0200 Message-ID: Subject: Transforming a path/points within a path (SVGOMPathElement) To: batik-users@xmlgraphics.apache.org Content-Type: multipart/alternative; boundary=f46d0401730bd186f604c0bda224 X-Gm-Message-State: ALoCoQnpXNUay+NRWISykIU9j7oU1+gKR7amuO6UkN8B1QIIe/4BuXDlPm1AG+ai5Zkbp+Uh3qOA --f46d0401730bd186f604c0bda224 Content-Type: text/plain; charset=UTF-8 Hello, can anyone give me a hint on how to resize an SVGOMPathElement, e.g. the "d" part of an SVG "path" element. But not by wrapping it in a transform operation, but actually transforming the points, e.g.: to (scaled from x to 1000pt, keeping the ratio) Is this possible with batik? I tried SVGRect rect = path.getBBox(); rect.setHeight(1000); rect.setWidth(1000); but the rect seems to be readonly for paths?! Cheers, Joscha --f46d0401730bd186f604c0bda224 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hello,

can anyone give me a hint on how to resize an SVGOMPathElemen= t, e.g. the "d" part of an SVG "path" element.
But n= ot by wrapping it in a transform operation, but actually transforming the p= oints, e.g.:
<path id=3D"add" d=3D"M28,14c-7.732,0-14,6.268-14,14s6.26= 8,14,14,14C35.732,42,42,35.732,42,28S35.732,14,28,14z M35,30.002h-5v5H26=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 v-5h-5V26h5v-5H30v5h5V30.002z"/= >

to

<path
=C2=A0=C2=A0 d=3D"M 625,-125 C 279.82143,-125 -2e-6,154.82143 -2e-6,50= 0 -2e-6,845.17857 279.82143,1125 625,1125 c 345.17857,0 625,-279.82143 625,= -625 0,-345.17857 -279.82143,-625 -625,-625 z M 937.49999,589.375 H 714.285= 71 V 812.58928 H 535.71428 V 589.375 H 312.5 V 410.71428 H 535.71428 V 187.= 5 H 714.28571 V 410.71428 H 937.49999 V 589.375 z"
=C2=A0=C2=A0 id=3D"add" />

(scaled from x to 1000pt, ke= eping the ratio)

Is this possible with batik? I tried

=C2=A0= =C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 SVGRect rect =3D path.getBBox();
=C2=A0= =C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 rect.setHeight(1000);
=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 rect.setWidth(1000);

but the rect seems to be readonly for paths?!

Cheers,
Joscha<= br>
--f46d0401730bd186f604c0bda224--