Hi Cameron,

Thanks so much.  It works.  Instead of writing it out with:

svgGenerator.stream(out, useCSS);

I now use:

svgGenerator.stream(svg, out, useCSS);

This seems to work.

Thanks again,
Rich

From: Cameron McCormack <[EMAIL PROTECTED]>
Reply-To: [email protected]
To: [email protected]
Subject: Re: How to add overflow:visible to document?
Date: Fri, 26 May 2006 10:20:33 +1000
MIME-Version: 1.0
Received: from mail.apache.org ([209.237.227.199]) by bay0-mc3-f11.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.1830); Thu, 25 May 2006 17:22:13 -0700
Received: (qmail 397 invoked by uid 500); 26 May 2006 00:20:57 -0000
Received: (qmail 386 invoked by uid 99); 26 May 2006 00:20:57 -0000
Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 25 May 2006 17:20:57 -0700
Received: pass (asf.osuosl.org: local policy)
Received: from [220.233.80.107] (HELO port.mcc.id.au) (220.233.80.107) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 25 May 2006 17:20:56 -0700 Received: from cam by port.mcc.id.au with local (Exim 3.36 #1 (Debian))id 1FjQ49-00086K-00for <[email protected]>; Fri, 26 May 2006 10:20:33 +1000
X-Message-Info: LsUYwwHHNt3660MmjhEvYg2f34OAemlKtU9j2Z7TuGo=
Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm
Precedence: bulk
List-Help: <mailto:[EMAIL PROTECTED]>
List-Unsubscribe: <mailto:[EMAIL PROTECTED]>
List-Post: <mailto:[email protected]>
List-Id: <batik-users.xmlgraphics.apache.org>
Delivered-To: mailing list [email protected]
X-ASF-Spam-Status: No, hits=0.0 required=10.0tests=
X-Spam-Check-By: apache.org
Mail-Followup-To: [email protected]
References: <[EMAIL PROTECTED]>
X-Numbers: 4 8 15 16 23 42
User-Agent: Mutt/1.5.11+cvs20060403
X-Virus-Checked: Checked by ClamAV on apache.org
Return-Path: [EMAIL PROTECTED] X-OriginalArrivalTime: 26 May 2006 00:22:13.0821 (UTC) FILETIME=[6FD3EED0:01C6805A]

Hi Rich.

rich k:
> I would have thought that this would be a FAQ, but apparently not. So here
> is the question:
> How do you set the "overflow" attribute or property to "visible" on a
> Document?

It probably should go in the FAQ…

> The reason I want to do this is because squiggle is acting as if the area
> of my drawing that does not fit in the initial viewport does not exist.

Yes, the initial value of ‘overflow’ is ‘hidden’.

>       // Get a DOMImplementation
>        DOMImplementation domImpl =
>            GenericDOMImplementation.getDOMImplementation();
>
>        // Create an instance of org.w3c.dom.Document
>        Document document = domImpl.createDocument(null, "svg", null);

Change this to:

  Document document =
      domImpl.createDocument("http://www.w3.org/2000/svg";, "svg", null);

>        // Create an instance of the SVG Generator
>        SVGGraphics2D svgGenerator = new SVGGraphics2D(document);
>
>        // Ask the test to render into the SVG Graphics2D implementation
>        TestSVGGen test = new TestSVGGen();
>        test.paint(svgGenerator);
>
>        // Finally, stream out SVG to the standard output using UTF-8
>        // character to byte encoding
>        boolean useCSS = true; // we want to use CSS style attribute
>        Writer out = new OutputStreamWriter(System.out, "UTF-8");
>        svgGenerator.stream(out, useCSS);

and then instead of streaming out the SVG to a Writer, you can get it to
construct the SVG, which you can then modify to add your ‘overflow’
property:

  Element svg = document.getDocumentElement();
  svgGenerator.getRoot(svg);
  svg.setAttributeNS(null, "overflow", "visible");

And then write out ‘document’.

--
Cameron McCormack, http://mcc.id.au/
        xmpp:[EMAIL PROTECTED]  ▪  ICQ 26955922  ▪  MSN [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to