Code example for Matrix

Methods: postRotate, setPolyToPoly

0
    } else { 
      geoPoints = new float[] {
          west, north,   east, north,   east, south,   west, south
      }; 
    } 
    Matrix matrix = new Matrix();
    matrix.setPolyToPoly(geoPoints, 0, imageCorners, 0, 4);
    if (!hasCornerTiePoints() && getRotateAngle() != 0) { 
      matrix.postRotate(getRotateAngle(), metricWidth / 2, metricHeight / 2);
    } 
    geoToMetric = matrix;
  } 
 
  // Returns the map image size (width, height) in meters 
  private float[] getMapImageSize() { 
    float width, height;
    if (!hasCornerTiePoints()) { 
      Location upperLeft = createLocation(west, north);
      Location upperRight = createLocation(east, north);
      Location lowerLeft = createLocation(west, south);
      width = upperLeft.distanceTo(upperRight);