public void setPrint(boolean print) { _sharedContext.setPrint(print); _sharedContext.setInteractive(!print); _sharedContext.getReplacedElementFactory().reset(); reload(); }
public PrinterRenderer(Printer printer, UserAgentCallback uac) { _printer = printer; _sharedContext = new SharedContext(uac, new SWTFontResolver(printer), new SWTReplacedElementFactory(), new SWTTextRenderer(), printer .getDPI().y); _sharedContext.setPrint(true); _sharedContext.setInteractive(false); }
private SharedContext newSharedContext(int dotsPerPixel, UserAgentCallback userAgent) { SharedContext context = new SharedContext(userAgent); AWTFontResolver fontResolver = new AWTFontResolver(); context.setFontResolver(fontResolver); SwingReplacedElementFactory replacedElementFactory = new SwingReplacedElementFactory(); context.setReplacedElementFactory(replacedElementFactory); context.setTextRenderer(new Java2DTextRenderer()); context.setDPI(72 * this.dotsPerPoint); context.setDotsPerPixel(dotsPerPixel); context.setPrint(false); context.setInteractive(false); return context; }
private SharedContext newSharedContext(int dotsPerPixel, UserAgentCallback userAgent) { SharedContext context = new SharedContext(userAgent); AWTFontResolver fontResolver = new AWTFontResolver(); context.setFontResolver(fontResolver); SwingReplacedElementFactory replacedElementFactory = new SwingReplacedElementFactory(); context.setReplacedElementFactory(replacedElementFactory); context.setTextRenderer(new Java2DTextRenderer()); context.setDPI(72 * this.dotsPerPoint); context.setDotsPerPixel(dotsPerPixel); context.setPrint(false); context.setInteractive(false); return context; }
private void init(float dotsPerPoint, int dotsPerPixel) { this.dotsPerPoint = dotsPerPoint; outputImage = ImageUtil.createCompatibleBufferedImage(DEFAULT_DOTS_PER_POINT, DEFAULT_DOTS_PER_POINT); outputDevice = new Java2DOutputDevice(outputImage); UserAgentCallback userAgent = new NaiveUserAgent(); sharedContext = new SharedContext(userAgent); AWTFontResolver fontResolver = new AWTFontResolver(); sharedContext.setFontResolver(fontResolver); SwingReplacedElementFactory replacedElementFactory = new SwingReplacedElementFactory(); sharedContext.setReplacedElementFactory(replacedElementFactory); sharedContext.setTextRenderer(new Java2DTextRenderer()); sharedContext.setDPI(72 * this.dotsPerPoint); sharedContext.setDotsPerPixel(dotsPerPixel); sharedContext.setPrint(false); sharedContext.setInteractive(false); }
private void init(float dotsPerPoint, int dotsPerPixel) { this.dotsPerPoint = dotsPerPoint; outputImage = ImageUtil.createCompatibleBufferedImage(DEFAULT_DOTS_PER_POINT, DEFAULT_DOTS_PER_POINT); outputDevice = new Java2DOutputDevice(outputImage); UserAgentCallback userAgent = new NaiveUserAgent(); sharedContext = new SharedContext(userAgent); AWTFontResolver fontResolver = new AWTFontResolver(); sharedContext.setFontResolver(fontResolver); SwingReplacedElementFactory replacedElementFactory = new SwingReplacedElementFactory(); sharedContext.setReplacedElementFactory(replacedElementFactory); sharedContext.setTextRenderer(new Java2DTextRenderer()); sharedContext.setDPI(72 * this.dotsPerPoint); sharedContext.setDotsPerPixel(dotsPerPixel); sharedContext.setPrint(false); sharedContext.setInteractive(false); }
public ITextRenderer(float dotsPerPoint, int dotsPerPixel) { _dotsPerPoint = dotsPerPoint; _outputDevice = new ITextOutputDevice(_dotsPerPoint); ITextUserAgent userAgent = new ITextUserAgent(_outputDevice); _sharedContext = new SharedContext(userAgent); userAgent.setSharedContext(_sharedContext); _outputDevice.setSharedContext(_sharedContext); ITextFontResolver fontResolver = new ITextFontResolver(_sharedContext); _sharedContext.setFontResolver(fontResolver); ITextReplacedElementFactory replacedElementFactory = new ITextReplacedElementFactory(_outputDevice); _sharedContext.setReplacedElementFactory(replacedElementFactory); _sharedContext.setTextRenderer(new ITextTextRenderer()); _sharedContext.setDPI(72*_dotsPerPoint); _sharedContext.setDotsPerPixel(dotsPerPixel); _sharedContext.setPrint(true); _sharedContext.setInteractive(false); }
public ITextRenderer(float dotsPerPoint, int dotsPerPixel, ITextOutputDevice outputDevice, ITextUserAgent userAgent) { _dotsPerPoint = dotsPerPoint; _outputDevice = outputDevice; _sharedContext = new SharedContext(); _sharedContext.setUserAgentCallback(userAgent); _sharedContext.setCss(new StyleReference(userAgent)); userAgent.setSharedContext(_sharedContext); _outputDevice.setSharedContext(_sharedContext); ITextFontResolver fontResolver = new ITextFontResolver(_sharedContext); _sharedContext.setFontResolver(fontResolver); ITextReplacedElementFactory replacedElementFactory = new ITextReplacedElementFactory(_outputDevice); _sharedContext.setReplacedElementFactory(replacedElementFactory); _sharedContext.setTextRenderer(new ITextTextRenderer()); _sharedContext.setDPI(72 * _dotsPerPoint); _sharedContext.setDotsPerPixel(dotsPerPixel); _sharedContext.setPrint(true); _sharedContext.setInteractive(false); _timeouted= false; }
public ITextRenderer(float dotsPerPoint, int dotsPerPixel, ITextOutputDevice outputDevice, ITextUserAgent userAgent) { _dotsPerPoint = dotsPerPoint; _outputDevice = outputDevice; _sharedContext = new SharedContext(); _sharedContext.setUserAgentCallback(userAgent); _sharedContext.setCss(new StyleReference(userAgent)); userAgent.setSharedContext(_sharedContext); _outputDevice.setSharedContext(_sharedContext); ITextFontResolver fontResolver = new ITextFontResolver(_sharedContext); _sharedContext.setFontResolver(fontResolver); ITextReplacedElementFactory replacedElementFactory = new ITextReplacedElementFactory(_outputDevice); _sharedContext.setReplacedElementFactory(replacedElementFactory); _sharedContext.setTextRenderer(new ITextTextRenderer()); _sharedContext.setDPI(72 * _dotsPerPoint); _sharedContext.setDotsPerPixel(dotsPerPixel); _sharedContext.setPrint(true); _sharedContext.setInteractive(false); _timeouted= false; }
public ITextRenderer(float dotsPerPoint, int dotsPerPixel) { _dotsPerPoint = dotsPerPoint; _outputDevice = new ITextOutputDevice(_dotsPerPoint); ITextUserAgent userAgent = new ITextUserAgent(_outputDevice); _sharedContext = new SharedContext(); _sharedContext.setUserAgentCallback(userAgent); _sharedContext.setCss(new StyleReference(userAgent)); userAgent.setSharedContext(_sharedContext); _outputDevice.setSharedContext(_sharedContext); ITextFontResolver fontResolver = new ITextFontResolver(_sharedContext); _sharedContext.setFontResolver(fontResolver); ITextReplacedElementFactory replacedElementFactory = new ITextReplacedElementFactory(_outputDevice); _sharedContext.setReplacedElementFactory(replacedElementFactory); _sharedContext.setTextRenderer(new ITextTextRenderer()); _sharedContext.setDPI(72 * _dotsPerPoint); _sharedContext.setDotsPerPixel(dotsPerPixel); _sharedContext.setPrint(true); _sharedContext.setInteractive(false); }
public ITextRenderer(float dotsPerPoint, int dotsPerPixel) { _dotsPerPoint = dotsPerPoint; _outputDevice = new ITextOutputDevice(_dotsPerPoint); ITextUserAgent userAgent = new ITextUserAgent(_outputDevice); _sharedContext = new SharedContext(); _sharedContext.setUserAgentCallback(userAgent); _sharedContext.setCss(new StyleReference(userAgent)); userAgent.setSharedContext(_sharedContext); _outputDevice.setSharedContext(_sharedContext); ITextFontResolver fontResolver = new ITextFontResolver(_sharedContext); _sharedContext.setFontResolver(fontResolver); ITextReplacedElementFactory replacedElementFactory = new ITextReplacedElementFactory(_outputDevice); _sharedContext.setReplacedElementFactory(replacedElementFactory); _sharedContext.setTextRenderer(new ITextTextRenderer()); _sharedContext.setDPI(72*_dotsPerPoint); _sharedContext.setDotsPerPixel(dotsPerPixel); _sharedContext.setPrint(true); _sharedContext.setInteractive(false); }
g2r.getSharedContext().setPrint(true); g2r.getSharedContext().setInteractive(false); g2r.getSharedContext().setDPI(72f);
g2r.getSharedContext().setPrint(true); g2r.getSharedContext().setInteractive(false); g2r.getSharedContext().setDPI(72f);