public Rectangle getMarginEdge(CssContext cssCtx, int tx, int ty) { Rectangle result = new Rectangle(getX(), getY(), getContentWidth(), getHeight()); result.translate(tx, ty); return result; }
public Rectangle getMarginEdge(CssContext cssCtx, int tx, int ty) { Rectangle result = new Rectangle(getX(), getY(), getContentWidth(), getHeight()); result.translate(tx, ty); return result; }
public Rectangle getPaintingClipEdge(CssContext cssCtx) { Box parent = getParent(); Rectangle result = null; if (parent.getStyle().isIdent( CSSName.FS_TEXT_DECORATION_EXTENT, IdentValue.BLOCK) || getJustificationInfo() != null) { result = new Rectangle( getAbsX(), getAbsY() + _paintingTop, parent.getAbsX() + parent.getTx() + parent.getContentWidth() - getAbsX(), _paintingHeight); } else { result = new Rectangle( getAbsX(), getAbsY() + _paintingTop, getContentWidth(), _paintingHeight); } return result; }
public Rectangle getPaintingClipEdge(CssContext cssCtx) { Box parent = getParent(); Rectangle result = null; if (parent.getStyle().isIdent( CSSName.FS_TEXT_DECORATION_EXTENT, IdentValue.BLOCK) || getJustificationInfo() != null) { result = new Rectangle( getAbsX(), getAbsY() + _paintingTop, parent.getAbsX() + parent.getTx() + parent.getContentWidth() - getAbsX(), _paintingHeight); } else { result = new Rectangle( getAbsX(), getAbsY() + _paintingTop, getContentWidth(), _paintingHeight); } return result; }
public void drawTextDecoration(RenderingContext c, LineBox lineBox) { setColor(lineBox.getStyle().getColor()); Box parent = lineBox.getParent(); List decorations = lineBox.getTextDecorations(); for (Iterator i = decorations.iterator(); i.hasNext(); ) { TextDecoration textDecoration = (TextDecoration)i.next(); if (parent.getStyle().isIdent( CSSName.FS_TEXT_DECORATION_EXTENT, IdentValue.BLOCK)) { fillRect( lineBox.getAbsX(), lineBox.getAbsY() + textDecoration.getOffset(), parent.getAbsX() + parent.getTx() + parent.getContentWidth() - lineBox.getAbsX(), textDecoration.getThickness()); } else { fillRect( lineBox.getAbsX(), lineBox.getAbsY() + textDecoration.getOffset(), lineBox.getContentWidth(), textDecoration.getThickness()); } } }
public void drawTextDecoration(RenderingContext c, LineBox lineBox) { setColor(lineBox.getStyle().getColor()); Box parent = lineBox.getParent(); List decorations = lineBox.getTextDecorations(); for (Iterator i = decorations.iterator(); i.hasNext(); ) { TextDecoration textDecoration = (TextDecoration)i.next(); if (parent.getStyle().isIdent( CSSName.FS_TEXT_DECORATION_EXTENT, IdentValue.BLOCK)) { fillRect( lineBox.getAbsX(), lineBox.getAbsY() + textDecoration.getOffset(), parent.getAbsX() + parent.getTx() + parent.getContentWidth() - lineBox.getAbsX(), textDecoration.getThickness()); } else { fillRect( lineBox.getAbsX(), lineBox.getAbsY() + textDecoration.getOffset(), lineBox.getContentWidth(), textDecoration.getThickness()); } } }
(getParent().getContentWidth() - leftFloatDistance - rightFloatDistance) / 2; calcX = midpoint - (getContentWidth() + getContentStart()) / 2; } else if (align == IdentValue.RIGHT) { int floatDistance = getFloatDistances().getRightFloatDistance(); calcX = getParent().getContentWidth() - floatDistance - getContentWidth();
(getParent().getContentWidth() - leftFloatDistance - rightFloatDistance) / 2; calcX = midpoint - (getContentWidth() + getContentStart()) / 2; } else if (align == IdentValue.RIGHT) { int floatDistance = getFloatDistances().getRightFloatDistance(); calcX = getParent().getContentWidth() - floatDistance - getContentWidth();
leftFloatDistance - rightFloatDistance - getContentStart(); if (available > getContentWidth()) { int toAdd = available - getContentWidth();
leftFloatDistance - rightFloatDistance - getContentStart(); if (available > getContentWidth()) { int toAdd = available - getContentWidth();