Code example for Matrix

Methods: postRotatesetPolyToPoly

0
    // Image corner coordinates in image space 
    float[] imageCorners = { 0, 0,
                             imageWidth, 0,
                             imageWidth, imageHeight,
                             0, imageHeight };
    Matrix temp = new Matrix();
    boolean success = temp.setPolyToPoly(geoCorners, 0, imageCorners, 0, 4);
    // Add rotation around image center if necessary 
    if (mapData.getRotateAngle() != 0) {
      temp.postRotate(mapData.getRotateAngle(), imageWidth / 2f, imageHeight / 2f);
    } 
    geoToImageMatrix = temp;
    if (!success) {
      Log.w(LOG_TAG, "FAILED to initialize geoToImageMatrix from rotation");
    } 
  } 
 
  private static void initGeoToImageMatrixTiePoints() { 
    float[] geoCorners = new float[8];
    float[] corner = mapData.getNorthWestCornerLocation();
Experience pair programming with AI  Get Codota for Java