Code example for Matrix

Methods: setPolyToPoly

0
                             imageWidth, 0,
                             imageWidth, imageHeight,
                             0, imageHeight };
 
    // Find matrix mapping geoCorners to imageCorners 
    geoToImageMatrix = new Matrix();
    if (!geoToImageMatrix.setPolyToPoly(geoCorners, 0, imageCorners, 0, 4)) {
      Log.w(LOG_TAG, "FAILED to initialize geoToImageMatrix from tie points");
    } 
  } 
 
  /** 
   * Reads the map image size. If successful, updates member variables 
   * pixelWidth and pixelHeight and returns 'true'. Otherwise leaves member 
   * variables intact and returns 'false'. 
   */ 
  private boolean readMapImageSize(GroundOverlay mapData) {
    InputStream in = null;
    try { 
      in = mapData.getKmlInfo().getImageStream(mapData.getImage());