예제 #1
0
 protected GraphicsNode buildGVT(BridgeContext ctx, SVGOMDocument svgDoc)
     throws TranscoderException {
   GVTBuilder builder = new GVTBuilder();
   GraphicsNode gvtRoot;
   try {
     gvtRoot = builder.build(ctx, svgDoc);
     // dispatch an 'onload' event if needed
     if (ctx.isDynamic()) {
       BaseScriptingEnvironment se = new BaseScriptingEnvironment(ctx);
       se.loadScripts();
       se.dispatchSVGLoadEvent();
     }
   } catch (BridgeException ex) {
     throw new TranscoderException(ex);
   }
   return gvtRoot;
 }
 /**
  * Builds using the specified BridgeContext and element, the specified graphics node. This is
  * called after all the children of the node have been constructed and added, so it is safe to do
  * work that depends on being able to see your children nodes in this method.
  *
  * @param ctx the bridge context to use
  * @param doc the document node that describes the graphics node to build
  * @param node the graphics node to build
  */
 public void buildGraphicsNode(BridgeContext ctx, Document doc, RootGraphicsNode node) {
   if (ctx.isDynamic()) {
     ctx.bind(doc, node);
   }
 }