You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-dev@xmlgraphics.apache.org by Thomas E Deweese <th...@kodak.com> on 2001/02/22 22:31:39 UTC

Tiled version of StaticRenderer

Hi all,

    I have implemented a version of StaticRenderer that uses the
GraphicsNodeRed and hence is able to make use of the Tile Cache when
the image is panned.

    This required some significant updates to the Renderer interface
(it now owns the offscreen buffer for example).  Hence there has been
some significant changes in the JSVGCanvas Class as well.  I am aware
that a total rewrite of JSVG canvas is underway, and this should not
undermine that work, but eventually we will probably want to make
similar changes to the new JSVGCanvas.

    So I'm writing this to ask what people would like me to do with
it. I can keep it for myself as a reference for how to proceed when
the new JSVGCanvas is released, or I can check it in so people can use
it in the mean time (and so Christophe who I think is the one working
on the rewrite, can see what I did).

    To the best of my ability it is at least as good as the original.
In general I think it's significantly better all around.  I've tried
to test the interruption stuff pretty heavily and even made some of
the filtering code aware of it to keep junk out of the tile cache.

    It's pretty cool to be able to reasonably pan around the moscow
file. :)

    Since I consider this work more of an investigation I'm will to do
what ever people think is best.  And the decision probably depends on
how soon the new JSVGCanvas will appear.

    I'm going home now, so I'll see what you think in the morning,
good night.


Re: Tiled version of StaticRenderer

Posted by Stephane Hillion <St...@sophia.inria.fr>.
On Thursday 22 February 2001 22:31, Thomas E Deweese wrote:
>     So I'm writing this to ask what people would like me to do with
> it. I can keep it for myself as a reference for how to proceed when
> the new JSVGCanvas is released, or I can check it in so people can use
> it in the mean time (and so Christophe who I think is the one working
> on the rewrite, can see what I did).

I am the one working on it.

>
>     To the best of my ability it is at least as good as the original.
> In general I think it's significantly better all around.  I've tried
> to test the interruption stuff pretty heavily and even made some of
> the filtering code aware of it to keep junk out of the tile cache.
>
>     It's pretty cool to be able to reasonably pan around the moscow
> file. :)

Great!

>     Since I consider this work more of an investigation I'm will to do
> what ever people think is best.  And the decision probably depends on
> how soon the new JSVGCanvas will appear.

It's not very far from completion. We will have to discuss how you manage the 
offscreen image and I will incorporate you new renderer in the new component.
--
  Stephane.

Re: Examples

Posted by Christophe Jolif <cj...@ilog.fr>.
Carlos,

Here is a very simple example using Rhino EcmaScript engine that respond
to SVG events:

<svg width="300" height="150" onunload="System.out.println('onload
called')">
<script type="text/ecmascript">
function printEvent(evt) {
	System.out.println("screen "+evt.screenX+" "+evt.screenY)
	System.out.println("client "+evt.clientX+" "+evt.clientY)	
	System.out.println(evt.target)
}
</script>
<g transform="translate(30, 30)">
    <ellipse cx="10" cy="10" rx="40" ry="40"
          transform="translate(-25 -25) rotate(45) translate(25 25)"
          style="fill:blue;stroke:none;visibility:hidden" 
          onclick="printEvent(evt)"
          onmousedown="System.out.println('onmousedown the blue
rectangle')"
          onmouseup="System.out.println('onmouseup the blue rectangle')"
          onmouseover="System.out.println('onmouseover the blue
rectangle')"
          onmouseout="System.out.println('onmouseout the blue
rectangle')"
          onmousemove="System.out.println('onmousemove the blue
rectangle')"
     />

    <ellipse id="toto" cx="70" cy="10" rx="40" ry="40"
style="fill:none;stroke:red" 
          onclick="printEvent(evt)"
          onmousedown="System.out.println('onmousedown the red
rectangle')"
          onmouseup="System.out.println('onmouseup the red rectangle')"
          onmouseover="System.out.println('onmouseover the red
rectangle')"
          onmouseout="System.out.println('onmouseout the red
rectangle')"
          onmousemove="System.out.println('onmousemove the red
rectangle')"
    />

    <ellipse cx="10" cy="70" rx="40" ry="40"
style="fill:yellow;stroke:none" 
          onclick="printEvent(evt)"
          onmousedown="System.out.println('onmousedown the yellow
rectangle')"
          onmouseup="System.out.println('onmouseup the yellow
rectangle')"
          onmouseover="System.out.println('onmouseover the yellow
rectangle')"
          onmouseout="System.out.println('onmouseout the yellow
rectangle')"
          onmousemove="System.out.println('onmousemove the yellow
rectangle')"
    />

    <ellipse cx="70" cy="70" rx="40" ry="40"
style="fill:green;stroke:none" 
          onclick="printEvent(evt)"
          onmousedown="System.out.println('onmousedown the green
rectangle')"
          onmouseup="System.out.println('onmouseup the green
rectangle')"
          onmouseover="System.out.println('onmouseover the green
rectangle')"
          onmouseout="System.out.println('onmouseout the green
rectangle')"
          onmousemove="System.out.println('onmousemove the green
rectangle')"
    />
</g>
<g transform="translate(130, -65)">
      <text x="60" y="125">Click on an ellipse </text>
      <text x="60" y="140">and look in the console</text>
</g>
</svg>

But, please don't forget that for the moment dynamic modifications of
the DOM are not forwared to the GVT treee (display).

Carlos Sanchez wrote:

> Does any one has some examples of using batik and [SVG] events.

Hope this helps,

-- 
Christophe

Examples

Posted by Carlos Sanchez <ca...@ktsi.com>.
Hi,

Does any one has some examples of using batik and [SVG] events.

Thx,

Carlos