code: public void drawRectBaseRatio(double[] topLeft, double[] rightBottom) {
          if (!(projection instanceof Projection2D)) {
              throw new UnsupportedOperationException("Only 2D graphics supports drawing rectangles.");
          }
  
          int[] sc = projection.screenProjectionBaseRatio(topLeft);
          int[] sc2 = projection.screenProjectionBaseRatio(rightBottom);
  
          g2d.drawRect(sc[0], sc[1], sc2[0] - sc[0], sc2[1] - sc[1]);
      }
docs: Draw the outline of the specified rectangle. The logical coordinates
  are proportional to the base coordinates.