int baseX = x *(hexSide + hexSideBySin30) + leftMargin + hexSide; int baseY = (2*y + 1 + x%2)* hexSideByCos30 + topMargin;
int baseX = x *(hexSide[zoom] + hexSideBySin30[zoom]) + leftMargin + hexSide[zoom]; int baseY = (2*y + 1 + x%2)* hexSideByCos30[zoom] + topMargin;
    private void paintUnit (Graphics g, int x, int y, boolean border) {        int baseX = x *(hexSide + hexSideBySin30) + leftMargin + hexSide;        int baseY = (2*y + 1 + x%2)* hexSideByCos30 + topMargin;        int [] xPoints = new int[3];        int [] yPoints = new int[3];        xPoints[0] = baseX;        yPoints[0] = baseY - unitSize;        xPoints[1] = baseX - unitSize;        yPoints[1] = baseY + unitSize/2;        xPoints[2] = baseX + unitSize;        yPoints[2] = baseY + unitSize/2;        g.fillPolygon(xPoints,yPoints,3);        if (border) {            Color oldColor = g.getColor();            g.setColor(oldColor.darker().darker().darker());            g.drawPolygon(xPoints,yPoints,3);            g.setColor(oldColor);        }    }