public Rectangle getMarginEdge(int left, int top, CssContext cssCtx, int tx, int ty) { Rectangle result = getBorderEdge(left, top, cssCtx); float marginLeft = 0; float marginRight = 0; if (_startsHere || _endsHere) { RectPropertySet margin = (RectPropertySet)getMargin(cssCtx); if (_startsHere) { marginLeft = margin.left(); } if (_endsHere) { marginRight = margin.right(); } } if (marginRight > 0) { result.width += marginRight; } if (marginLeft > 0) { result.x -= marginLeft; result.width += marginLeft; } result.translate(tx, ty); return result; }
public Rectangle getMarginEdge(int left, int top, CssContext cssCtx, int tx, int ty) { Rectangle result = getBorderEdge(left, top, cssCtx); float marginLeft = 0; float marginRight = 0; if (_startsHere || _endsHere) { RectPropertySet margin = (RectPropertySet)getMargin(cssCtx); if (_startsHere) { marginLeft = margin.left(); } if (_endsHere) { marginRight = margin.right(); } } if (marginRight > 0) { result.width += marginRight; } if (marginLeft > 0) { result.x -= marginLeft; result.width += marginLeft; } result.translate(tx, ty); return result; }
public Rectangle getBorderEdge(int left, int top, CssContext cssCtx) { // x, y pins the content area of the box so subtract off top border and padding // too float marginLeft = 0; float marginRight = 0; if (_startsHere || _endsHere) { RectPropertySet margin = (RectPropertySet)getMargin(cssCtx); if (_startsHere) { marginLeft = margin.left(); } if (_endsHere) { marginRight = margin.right(); } } BorderPropertySet border = getBorder(cssCtx); RectPropertySet padding = getPadding(cssCtx); Rectangle result = new Rectangle( (int)(left + marginLeft), (int)(top - border.top() - padding.top()), (int)(getInlineWidth(cssCtx) - marginLeft - marginRight), getHeight()); return result; }
public Rectangle getBorderEdge(int left, int top, CssContext cssCtx) { // x, y pins the content area of the box so subtract off top border and padding // too float marginLeft = 0; float marginRight = 0; if (_startsHere || _endsHere) { RectPropertySet margin = (RectPropertySet)getMargin(cssCtx); if (_startsHere) { marginLeft = margin.left(); } if (_endsHere) { marginRight = margin.right(); } } BorderPropertySet border = getBorder(cssCtx); RectPropertySet padding = getPadding(cssCtx); Rectangle result = new Rectangle( (int)(left + marginLeft), (int)(top - border.top() - padding.top()), (int)(getInlineWidth(cssCtx) - marginLeft - marginRight), getHeight()); return result; }
RectPropertySet margin = (RectPropertySet)getMargin(cssCtx); if (_startsHere) { marginLeft = margin.left();
RectPropertySet margin = (RectPropertySet)getMargin(cssCtx); if (_startsHere) { marginLeft = margin.left();