final int startY;
final int endX;
final int endY;
final boolean isXLabelSouth = shape.isXLabelSouth();
final boolean isYLabelWest = shape.isYLabelWest();
final IPoint position = shape.getPosition();
final StringBuilder start = new StringBuilder();
final StringBuilder end = new StringBuilder();
final StringBuilder rot = getRotationHeaderCode(ppc, position);
final StringBuilder coord = new StringBuilder();
final double unit = shape.getUnit();
final double gridStartx = shape.getGridStartX();
final double gridStarty = shape.getGridStartY();
final double gridEndx = shape.getGridEndX();
final double gridEndy = shape.getGridEndY();
if(isXLabelSouth) {
startY = (int)gridStarty;
endY = (int)gridEndy;
}
else {
startY = (int)gridEndy;
endY = (int)gridStarty;
}
if(isYLabelWest) {
startX = (int)gridStartx;
endX = (int)gridEndx;
}
else {
startX = (int)gridEndx;
endX = (int)gridStartx;
}
coord.append('(').append((int)shape.getOriginX()).append(',').append((int)shape.getOriginY()).append(')');
coord.append('(').append(startX).append(',').append(startY).append(')');
coord.append('(').append(endX).append(',').append(endY).append(')');
if(!LNumber.equalsDouble(unit, PSTricksConstants.DEFAULT_UNIT))
end.append("\n\\psset{unit=").append(PSTricksConstants.DEFAULT_UNIT).append(PSTricksConstants.TOKEN_CM).append('}');//$NON-NLS-1$
if(!LNumber.equalsDouble(position.getX(), 0.) || !LNumber.equalsDouble(position.getY(), 0.)) {
final float posX = (float)LNumber.getCutNumber((position.getX()-pt.getX())/ppc);
final float posY = (float)LNumber.getCutNumber((pt.getY()-position.getY())/ppc);
end.append('}');
start.append("\\rput(").append(posX).append(',').append(posY).append(')').append('{');//$NON-NLS-1$
}