Loading ...
Sorry, an error occurred while loading the content.

Batik parser svg style attribute

Expand Messages
  • coolwcool2003
    Will you tell me how to use Batik parser to handle the svg style/stroke attributes? my polygon element has style fill:red . I need to parse the fill and
    Message 1 of 2 , Sep 4, 2005
    • 0 Attachment
      Will you tell me how to use Batik parser to handle the svg
      style/stroke attributes?

      my polygon element has style "fill:red". I need to parse
      the "fill" and "red" separately

      I need some thing like getStyle(), getColor(), isFill(). But I
      could not find any of them
    • Thomas DeWeese
      Hi Coolwcool, I still think you will be better off building the entire GVT tree and pulling the information you need out of that. The GVT tree has all this
      Message 2 of 2 , Sep 5, 2005
      • 0 Attachment
        Hi Coolwcool,

        I still think you will be better off building the entire
        GVT tree and pulling the information you need out of that.
        The GVT tree has all this stuff resolved for you.

        coolwcool2003 wrote:
        > Will you tell me how to use Batik parser to handle the svg
        > style/stroke attributes?
        >
        > my polygon element has style "fill:red". I need to parse
        > the "fill" and "red" separately
        >
        > I need some thing like getStyle(), getColor(), isFill(). But I
        > could not find any of them

        The Batik SVG DOM supports SAC which includes getStyle.
        But you need to initialize the CSS engine for this to work.
        There is code that shows how to do this on the Batik Wiki:

        http://wiki.apache.org/xmlgraphics-batik/BootSvgAndCssDom
      Your message has been successfully submitted and would be delivered to recipients shortly.