xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas DeWeese <Thomas.DeWe...@Kodak.com>
Subject Re: Newbie: Svg -> PDF Text producing Huge Files
Date Wed, 06 Apr 2005 09:24:11 GMT
Jared Davis wrote:
> Would it be possible/safe to do something like the following?

   Sure you could do that but I was planning to add
createSubContext to the BridgeContext class it's self,
rather than introducing the interface.  The interface
approach is useful for adding methods to an existing
interface where you don't want to break existing
implementations of the interface but that isn't a
concern with concrete classes.

> 
> Interface CreateSubContext {
>   BridgeContext createSubContext();
> }
> ////////////
> Class BridgeContext .... Implements CreateSubContext 
> {...
>   Public BridgeContext createSubContext() {
>        BridgeContext subCtx = new BridgeContext(getUserAgent(), 
>                                                 getDocumentLoader());
>        subCtx.setGVTBuilder(getGVTBuilder());
>        subCtx.setTextPainter(getTextPainter()); 
>        return subCtx;
>   }
> }
> //////////
>          if (eng != null) {
>              subCtx = (BridgeContext)eng.getCSSContext();
>          } else {
>              if (ctx instanceof CreateSubContext) {
>                 subCtx = (CreateSubContext)ctx.createSubContext();
>              } else {
>                 subCtx = new BridgeContext(ctx.getUserAgent(), 
>                                            ctx.getDocumentLoader());
>                 subCtx.setGVTBuilder(ctx.getGVTBuilder());
>              }
>              subCtx.setDocument(imgDocument);
>              subCtx.initializeDocument(imgDocument);
>          }
> //////////
> 
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org


Mime
View raw message