public override Size2D arrange(Graphics2D g2, RectangleConstraint constraint) { Size2D size2D = new Size2D((double) this.image.getWidth((ImageObserver) null), (double) this.image.getHeight((ImageObserver) null)); return new Size2D(this.calculateTotalWidth(size2D.getWidth()), this.calculateTotalHeight(size2D.getHeight())); }
public virtual Size2D calculateConstrainedSize(Size2D @base) { Size2D size2D = new Size2D(); if (this.widthConstraintType == LengthConstraintType.__\u003C\u003ENONE) { size2D.width = @base.width; if (this.heightConstraintType == LengthConstraintType.__\u003C\u003ENONE) size2D.height = @base.height; else if (this.heightConstraintType == LengthConstraintType.__\u003C\u003ERANGE) size2D.height = this.heightRange.constrain(@base.height); else if (this.heightConstraintType == LengthConstraintType.__\u003C\u003EFIXED) size2D.height = this.height; } else if (this.widthConstraintType == LengthConstraintType.__\u003C\u003ERANGE) { size2D.width = this.widthRange.constrain(@base.width); if (this.heightConstraintType == LengthConstraintType.__\u003C\u003ENONE) size2D.height = @base.height; else if (this.heightConstraintType == LengthConstraintType.__\u003C\u003ERANGE) size2D.height = this.heightRange.constrain(@base.height); else if (this.heightConstraintType == LengthConstraintType.__\u003C\u003EFIXED) size2D.height = this.height; } else if (this.widthConstraintType == LengthConstraintType.__\u003C\u003EFIXED) { size2D.width = this.width; if (this.heightConstraintType == LengthConstraintType.__\u003C\u003ENONE) size2D.height = @base.height; else if (this.heightConstraintType == LengthConstraintType.__\u003C\u003ERANGE) size2D.height = this.heightRange.constrain(@base.height); else if (this.heightConstraintType == LengthConstraintType.__\u003C\u003EFIXED) size2D.height = this.height; } return size2D; }