code: protected void setup() {
          double scale = rendererModel.getParameter(Scale.class).getValue();
          double zoom = rendererModel.getParameter(ZoomFactor.class).getValue();
          // set the transform
          try {
              transform = new AffineTransform();
              transform.translate(drawCenter.x, drawCenter.y);
              transform.scale(1, -1); // Converts between CDK Y-up & Java2D Y-down coordinate-systems
              transform.scale(scale, scale);
              transform.scale(zoom, zoom);
              transform.translate(-this.modelCenter.x, -this.modelCenter.y);
          } catch (NullPointerException npe) {
              // one of the drawCenter or modelCenter points have not been set!
              String errorString = "null pointer when setting transform: "
                      + "drawCenter=%s scale=%s zoom=%s modelCenter=%s";
              System.err.println(String.format(errorString, drawCenter, scale, zoom, modelCenter));
          }
      }
docs: Creates the transform using the scale, zoom, drawCenter, and modelCenter.
  In order to scale (and zoom) all elements in a uniform way, a point is
  first moved so that the center of the model is at the origin, scaled,
  then moved to the correct place on screen.