protected void rectImpl(float x1f, float y1f, float x2f, float y2f) {
    if (smooth || strokeAlpha || ctm.isWarped()) {
      // screw the efficiency, send this off to beginShape().
      super.rectImpl(x1f, y1f, x2f, y2f);

    } else {
      int x1 = (int) (x1f + ctm.m02);
      int y1 = (int) (y1f + ctm.m12);
      int x2 = (int) (x2f + ctm.m02);
      int y2 = (int) (y2f + ctm.m12);

      if (fill) {
        simple_rect_fill(x1, y1, x2, y2);
      }

      if (stroke) {
        if (strokeWeight == 1) {
          thin_flat_line(x1, y1, x2, y1);
          thin_flat_line(x2, y1, x2, y2);
          thin_flat_line(x2, y2, x1, y2);
          thin_flat_line(x1, y2, x1, y1);

        } else {
          thick_flat_line(x1, y1, strokeR, strokeG, strokeB, strokeA,
                          x2, y1, strokeR, strokeG, strokeB, strokeA);
          thick_flat_line(x2, y1, strokeR, strokeG, strokeB, strokeA,
                          x2, y2, strokeR, strokeG, strokeB, strokeA);
          thick_flat_line(x2, y2, strokeR, strokeG, strokeB, strokeA,
                          x1, y2, strokeR, strokeG, strokeB, strokeA);
          thick_flat_line(x1, y2, strokeR, strokeG, strokeB, strokeA,
                          x1, y1, strokeR, strokeG, strokeB, strokeA);
        }
      }
    }
  }