gPath.moveTo(corner1.x, corner1.y);
gPath.moveTo(corner2.x, corner2.y);
gPath.lineTo(corner3.x, corner3.y);
gPath.lineTo(corner4.x, corner4.y);
gPath.lineTo(corner1.x, corner1.y);
outlineArea.add(new Area(gPath));
if (GLOBAL.shapePack.add_guide_divets) {
float r = GLOBAL.shapePack.inner_corner_radius;
Vec2D radCentre1 = getPos().add(
dir.getRotated((float) Math.PI / 2).scale(-(r / 2))).add(
dir.getRotated(0).normalize().scale(-tempWidth / 2));
Vec2D radCentre2 = getPos().add(
dir.getRotated((float) Math.PI / 2).scale(-(r / 2))).add(
dir.getRotated(0).normalize().scale(tempWidth / 2));
Ellipse2D.Float ellipse = new Ellipse2D.Float(radCentre1.x
- (r / 2), radCentre1.y - (r / 2), r, r);
outlineArea.add(new Area(ellipse));
ellipse = new Ellipse2D.Float(radCentre2.x - (r / 2), radCentre2.y
- (r / 2), r, r);
outlineArea.add(new Area(ellipse));
}
if (GLOBAL.shapePack.addDogbones) {
float r = GLOBAL.shapePack.inner_corner_radius;
//LOGGER.info(dirToEdge.toString());
int sign = -1;
Vec2D radCentre1 = getPos().add(
dir.getRotated((float) Math.PI / 2).scale(
(offset + tempLength+(r / 2)) - s1)).add(
dir.getRotated(0).normalize().scale((-(tempWidth+(r / 2)) / 2) - s2));
Vec2D radCentre2 = getPos().add(
dir.getRotated((float) Math.PI / 2).scale(
(offset + tempLength+(r / 2)) - s1)).add(
dir.getRotated(0).normalize().scale((+(tempWidth+(r / 2)) / 2) - s2));
Ellipse2D.Float ellipse = new Ellipse2D.Float(radCentre1.x
- (r / 2), radCentre1.y + ((r / 2)*sign), r, r);
outlineArea.add(new Area(ellipse));
ellipse = new Ellipse2D.Float(radCentre2.x - (r / 2), radCentre2.y
+ ((r / 2)*sign), r, r);
outlineArea.add(new Area(ellipse));
}
//#ENDIF JAVA
}