UserAgentCallback userAgentCallback, int cssWidth, int cssHeight) { Element element = blockBox.getElement(); if (element == null) { return null;
Element element = blockBox.getElement(); if (element == null) { return null;
public ReplacedElement createReplacedElement(LayoutContext layoutContext, BlockBox blockBox, UserAgentCallback userAgentCallback, int cssWidth, int cssHeight) { Element element = blockBox.getElement(); .... .... final Image image = Image.getInstance(bytes); final factor = ((ITextUserAgent)uac).getSharedContext().getDotsPerPixel(); //Need to add this line image.scaleAbsolute(image.getPlainWidth() * factor, image.getPlainHeight() * factor) //Need to add this line final FSImage fsImage = new ITextFSImage(image); .... ....
public ReplacedElement createReplacedElement(LayoutContext c, BlockBox box, UserAgentCallback uac, int cssWidth, int cssHeight) { Element e = box.getElement(); if (e == null) { return null; } // images if (c.getNamespaceHandler().isImageElement(e)) { return replaceImage(uac, c, e, cssWidth, cssHeight); } return null; }
private void addBoxID(LayoutContext c) { if (! isAnonymous()) { String name = c.getNamespaceHandler().getAnchorName(getElement()); if (name != null) { c.addBoxId(name, this); } String id = c.getNamespaceHandler().getID(getElement()); if (id != null) { c.addBoxId(id, this); } } }
private void addBoxID(LayoutContext c) { if (! isAnonymous()) { String name = c.getNamespaceHandler().getAnchorName(getElement()); if (name != null) { c.addBoxId(name, this); } String id = c.getNamespaceHandler().getID(getElement()); if (id != null) { c.addBoxId(id, this); } } }
public BlockBox copyOf() { BlockBox result = new BlockBox(); result.setStyle(getStyle()); result.setElement(getElement()); return result; }
public BlockBox copyOf() { BlockBox result = new BlockBox(); result.setStyle(getStyle()); result.setElement(getElement()); return result; }
public void paint(RenderingContext c, ITextOutputDevice outputDevice, BlockBox box) { PdfContentByte cb = outputDevice.getCurrentPage(); PdfWriter writer = outputDevice.getWriter(); PdfAcroForm acroForm = writer.getAcroForm(); Element elem = box.getElement(); String name = getFieldName(outputDevice, elem); String value = getValue(elem); acroForm.addHiddenField(name, value); }
public SelectFormField(LayoutContext c, BlockBox box, int cssWidth, int cssHeight) { _options = readOptions(box.getElement()); initDimensions(c, box, cssWidth, cssHeight); float fontSize = box.getStyle().getFSFont(c).getSize2D(); _baseline = (int)(getHeight() / 2 + (fontSize * 0.3f)); }
public SelectFormField(LayoutContext c, BlockBox box, int cssWidth, int cssHeight) { _options = readOptions(box.getElement()); initDimensions(c, box, cssWidth, cssHeight); float fontSize = box.getStyle().getFSFont(c).getSize2D(); // FIXME: findbugs possible loss of precision, cf. int / (float)2 _baseline = (int)(getHeight() / 2 + (fontSize * 0.3f)); }
public SelectFormField(LayoutContext c, BlockBox box, int cssWidth, int cssHeight) { _options = readOptions(box.getElement()); initDimensions(c, box, cssWidth, cssHeight); float fontSize = box.getStyle().getFSFont(c).getSize2D(); // FIXME: findbugs possible loss of precision, cf. int / (float)2 _baseline = (int)(getHeight() / 2 + (fontSize * 0.3f)); }
public SelectFormField(LayoutContext c, BlockBox box, int cssWidth, int cssHeight) { _options = readOptions(box.getElement()); initDimensions(c, box, cssWidth, cssHeight); float fontSize = box.getStyle().getFSFont(c).getSize2D(); // FIXME: findbugs possible loss of precision, cf. int / (float)2 _baseline = (int)(getHeight() / 2 + (fontSize * 0.3f)); }
public SelectFormField(LayoutContext c, BlockBox box, int cssWidth, int cssHeight) { _options = readOptions(box.getElement()); initDimensions(c, box, cssWidth, cssHeight); float fontSize = box.getStyle().getFSFont(c).getSize2D(); // FIXME: findbugs possible loss of precision, cf. int / (float)2 _baseline = (int)(getHeight() / 2 + (fontSize * 0.3f)); }
protected void initDimensions(LayoutContext c, BlockBox box, int cssWidth, int cssHeight) { if (cssWidth != -1) { setWidth(cssWidth); } else { setWidth(calcDefaultWidth(c, box)); } if (cssHeight != -1) { setHeight(cssHeight); } else { setHeight((int) (box.getStyle().getLineHeight(c) * getSize(box.getElement()))); } }
protected void initDimensions(LayoutContext c, BlockBox box, int cssWidth, int cssHeight) { if (cssWidth != -1) { setWidth(cssWidth); } else { setWidth(calcDefaultWidth(c, box)); } if (cssHeight != -1) { setHeight(cssHeight); } else { setHeight((int) (box.getStyle().getLineHeight(c) * getSize(box.getElement()))); } }
protected void initDimensions(LayoutContext c, BlockBox box, int cssWidth, int cssHeight) { if (cssWidth != -1) { setWidth(cssWidth); } else { setWidth(calcDefaultWidth(c, box)); } if (cssHeight != -1) { setHeight(cssHeight); } else { setHeight((int) (box.getStyle().getLineHeight(c) * getSize(box.getElement()))); } }
protected void initDimensions(LayoutContext c, BlockBox box, int cssWidth, int cssHeight) { if (cssWidth != -1) { setWidth(cssWidth); } else { setWidth(calcDefaultWidth(c, box)); } if (cssHeight != -1) { setHeight(cssHeight); } else { setHeight((int) (box.getStyle().getLineHeight(c) * getSize(box.getElement()))); } }
protected void initDimensions(LayoutContext c, BlockBox box, int cssWidth, int cssHeight) { if (cssWidth != -1) { setWidth(cssWidth); } else { setWidth(calcDefaultWidth(c, box)); } if (cssHeight != -1) { setHeight(cssHeight); } else { setHeight((int) (box.getStyle().getLineHeight(c) * getSize(box.getElement()))); } }
protected void initDimensions(LayoutContext c, BlockBox box, int cssWidth, int cssHeight) { if (cssWidth != -1) { setWidth(cssWidth); } else { setWidth(c.getTextRenderer().getWidth( c.getFontContext(), box.getStyle().getFSFont(c), spaces(getSize(box.getElement())))); } if (cssHeight != -1) { setHeight(cssHeight); } else { setHeight((int) (box.getStyle().getLineHeight(c))); } }