SVG support nearing completion

Adam Megacz <[email protected]> 26 Jun 2003 23:12:39 -0700
Newsgroups gmane.comp.java.xwt.announce
Organization XWT
Message-ID <[email protected]>
Here's a demo of what the code currently in CVS (tag 'SVG') can do.
This SVG rendering code was written completely from scratch,
specifically for XWT, and does not use any of the Java2D APIs; the
only OS drawing primitives it uses are lines and trapezoid-fills.

  http://www.megacz.com/tmp/svgdemo3.png

The font shown is the Microsoft "Impact" TrueType font, rasterized
entirely by XWT (not the operating system).

As you can see, pixel-based elements (like the tree control) and
vector-based elements are completely miscible in each other; you can
apply SVG transforms and filters to plain old <box/> elements, and SVG
elements can participate in constraint-based layout.

Here's the code used to produce this demo to give you an idea of how
it works:

  <template thisbox="frame" width="600" height="600" color="lightGray">
      <box transform="translate(100, 200)">
          <tiger absolute="true" transform="rotate(-10) translate(200,-50)"/>
          <box transform="scale(.05, .05) rotate(35) translate(50, 50)"
               fill="#44331188" text="xwt supports svg!" textcolor="black"
               absolute="true">
              <impact_font/>
          </box>
          <widget_example absolute="true" x="40" y="100"
                 transform="translate(-50, -100) rotate(-20) shear(30)"/>
      </box>
  </template>

The complete xwar (including tiger, widget_example and impact_font) is
available here:

  http://www.megacz.com/tmp/svgdemo3.xwar

Now that the new JavaScript engine (org.xwt.js) is complete, we're
only a short distance away from being able to import PDFs and Flash
SWF's on the fly by embedding existing the open source pdf->svg and
swf->svg converters.

Also, the hiptop client is coming along nicely.  I'm starting to
outgrow the simulator, so I'm going to have to buy one of those things
pretty soon.  And if anybody out there can get me a Treo 600 demo
unit, I'll be forever in your debt.

  - a



_______________________________________________
http://lists.xwt.org/listinfo/announce