Skip to content

Commit

Permalink
Include OvalElements in Bounds calculation.
Browse files Browse the repository at this point in the history
  • Loading branch information
johnmay committed Jun 26, 2018
1 parent eb58025 commit 60b2bcc
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,12 @@ private void traverse(IRenderingElement newElement) {
add(lineElem.secondPointX + vec.x + ortho.x, lineElem.secondPointY + vec.y + ortho.y);
add(lineElem.firstPointX - vec.x - ortho.x, lineElem.firstPointY - vec.y - ortho.y);
add(lineElem.secondPointX + vec.x - ortho.x, lineElem.secondPointY + vec.y - ortho.y);
} else if (element instanceof OvalElement) {
OvalElement oval = (OvalElement) element;
add(oval.xCoord - oval.radius, oval.yCoord);
add(oval.xCoord + oval.radius, oval.yCoord);
add(oval.xCoord, oval.yCoord - oval.radius);
add(oval.xCoord, oval.yCoord + oval.radius);
} else if (element instanceof ElementGroup) {
for (IRenderingElement child : (ElementGroup) element)
stack.add(child);
Expand Down

0 comments on commit 60b2bcc

Please sign in to comment.