Tabnine Logo
SubsamplingScaleImageView.getRequiredRotation
Code IndexAdd Tabnine to your IDE (free)

How to use
getRequiredRotation
method
in
com.davemorrissey.labs.subscaleview.SubsamplingScaleImageView

Best Java code snippets using com.davemorrissey.labs.subscaleview.SubsamplingScaleImageView.getRequiredRotation (Showing top 10 results out of 315)

origin: davemorrissey/subsampling-scale-image-view

/**
 * Returns the actual orientation of the image relative to the source file. This will be based on the source file's
 * EXIF orientation if you're using ORIENTATION_USE_EXIF. Values are 0, 90, 180, 270.
 * @return the orientation applied after EXIF information has been extracted. See static fields.
 */
public final int getAppliedOrientation() {
  return getRequiredRotation();
}
origin: davemorrissey/subsampling-scale-image-view

/**
 * Get source width taking rotation into account.
 */
@SuppressWarnings("SuspiciousNameCombination")
private int sWidth() {
  int rotation = getRequiredRotation();
  if (rotation == 90 || rotation == 270) {
    return sHeight;
  } else {
    return sWidth;
  }
}
origin: davemorrissey/subsampling-scale-image-view

/**
 * Get source height taking rotation into account.
 */
@SuppressWarnings("SuspiciousNameCombination")
private int sHeight() {
  int rotation = getRequiredRotation();
  if (rotation == 90 || rotation == 270) {
    return sWidth;
  } else {
    return sHeight;
  }
}
origin: davemorrissey/subsampling-scale-image-view

/**
 * Converts source rectangle from tile, which treats the image file as if it were in the correct orientation already,
 * to the rectangle of the image that needs to be loaded.
 */
@SuppressWarnings("SuspiciousNameCombination")
@AnyThread
private void fileSRect(Rect sRect, Rect target) {
  if (getRequiredRotation() == 0) {
    target.set(sRect);
  } else if (getRequiredRotation() == 90) {
    target.set(sRect.top, sHeight - sRect.right, sRect.bottom, sHeight - sRect.left);
  } else if (getRequiredRotation() == 180) {
    target.set(sWidth - sRect.right, sHeight - sRect.bottom, sWidth - sRect.left, sHeight - sRect.top);
  } else {
    target.set(sWidth - sRect.bottom, sRect.left, sWidth - sRect.top, sRect.right);
  }
}
origin: davemorrissey/subsampling-scale-image-view

        matrix.reset();
        setMatrixArray(srcArray, 0, 0, tile.bitmap.getWidth(), 0, tile.bitmap.getWidth(), tile.bitmap.getHeight(), 0, tile.bitmap.getHeight());
        if (getRequiredRotation() == ORIENTATION_0) {
          setMatrixArray(dstArray, tile.vRect.left, tile.vRect.top, tile.vRect.right, tile.vRect.top, tile.vRect.right, tile.vRect.bottom, tile.vRect.left, tile.vRect.bottom);
        } else if (getRequiredRotation() == ORIENTATION_90) {
          setMatrixArray(dstArray, tile.vRect.right, tile.vRect.top, tile.vRect.right, tile.vRect.bottom, tile.vRect.left, tile.vRect.bottom, tile.vRect.left, tile.vRect.top);
        } else if (getRequiredRotation() == ORIENTATION_180) {
          setMatrixArray(dstArray, tile.vRect.right, tile.vRect.bottom, tile.vRect.left, tile.vRect.bottom, tile.vRect.left, tile.vRect.top, tile.vRect.right, tile.vRect.top);
        } else if (getRequiredRotation() == ORIENTATION_270) {
          setMatrixArray(dstArray, tile.vRect.left, tile.vRect.bottom, tile.vRect.left, tile.vRect.top, tile.vRect.right, tile.vRect.top, tile.vRect.right, tile.vRect.bottom);
matrix.reset();
matrix.postScale(xScale, yScale);
matrix.postRotate(getRequiredRotation());
matrix.postTranslate(vTranslate.x, vTranslate.y);
if (getRequiredRotation() == ORIENTATION_180) {
  matrix.postTranslate(scale * sWidth, scale * sHeight);
} else if (getRequiredRotation() == ORIENTATION_90) {
  matrix.postTranslate(scale * sHeight, 0);
} else if (getRequiredRotation() == ORIENTATION_270) {
  matrix.postTranslate(0, scale * sWidth);
origin: mozilla-tw/Rocket

/**
 * Get source width taking rotation into account.
 */
@SuppressWarnings("SuspiciousNameCombination")
private int sWidth() {
  int rotation = getRequiredRotation();
  if (rotation == 90 || rotation == 270) {
    return sHeight;
  } else {
    return sWidth;
  }
}
origin: mozilla-tw/Rocket

/**
 * Get source height taking rotation into account.
 */
@SuppressWarnings("SuspiciousNameCombination")
private int sHeight() {
  int rotation = getRequiredRotation();
  if (rotation == 90 || rotation == 270) {
    return sWidth;
  } else {
    return sHeight;
  }
}
origin: mozilla-tw/Rocket

/**
 * Returns the actual orientation of the image relative to the source file. This will be based on the source file's
 * EXIF orientation if you're using ORIENTATION_USE_EXIF. Values are 0, 90, 180, 270.
 */
public final int getAppliedOrientation() {
  return getRequiredRotation();
}
origin: mozilla-tw/Rocket

/**
 * Converts source rectangle from tile, which treats the image file as if it were in the correct orientation already,
 * to the rectangle of the image that needs to be loaded.
 */
@SuppressWarnings("SuspiciousNameCombination")
@AnyThread
private void fileSRect(Rect sRect, Rect target) {
  if (getRequiredRotation() == 0) {
    target.set(sRect);
  } else if (getRequiredRotation() == 90) {
    target.set(sRect.top, sHeight - sRect.right, sRect.bottom, sHeight - sRect.left);
  } else if (getRequiredRotation() == 180) {
    target.set(sWidth - sRect.right, sHeight - sRect.bottom, sWidth - sRect.left, sHeight - sRect.top);
  } else {
    target.set(sWidth - sRect.bottom, sRect.left, sWidth - sRect.top, sRect.right);
  }
}
origin: mozilla-tw/Rocket

        matrix.reset();
        setMatrixArray(srcArray, 0, 0, tile.bitmap.getWidth(), 0, tile.bitmap.getWidth(), tile.bitmap.getHeight(), 0, tile.bitmap.getHeight());
        if (getRequiredRotation() == ORIENTATION_0) {
          setMatrixArray(dstArray, tile.vRect.left, tile.vRect.top, tile.vRect.right, tile.vRect.top, tile.vRect.right, tile.vRect.bottom, tile.vRect.left, tile.vRect.bottom);
        } else if (getRequiredRotation() == ORIENTATION_90) {
          setMatrixArray(dstArray, tile.vRect.right, tile.vRect.top, tile.vRect.right, tile.vRect.bottom, tile.vRect.left, tile.vRect.bottom, tile.vRect.left, tile.vRect.top);
        } else if (getRequiredRotation() == ORIENTATION_180) {
          setMatrixArray(dstArray, tile.vRect.right, tile.vRect.bottom, tile.vRect.left, tile.vRect.bottom, tile.vRect.left, tile.vRect.top, tile.vRect.right, tile.vRect.top);
        } else if (getRequiredRotation() == ORIENTATION_270) {
          setMatrixArray(dstArray, tile.vRect.left, tile.vRect.bottom, tile.vRect.left, tile.vRect.top, tile.vRect.right, tile.vRect.top, tile.vRect.right, tile.vRect.bottom);
matrix.reset();
matrix.postScale(xScale, yScale);
matrix.postRotate(getRequiredRotation());
matrix.postTranslate(vTranslate.x, vTranslate.y);
if (getRequiredRotation() == ORIENTATION_180) {
  matrix.postTranslate(scale * sWidth, scale * sHeight);
} else if (getRequiredRotation() == ORIENTATION_90) {
  matrix.postTranslate(scale * sHeight, 0);
} else if (getRequiredRotation() == ORIENTATION_270) {
  matrix.postTranslate(0, scale * sWidth);
com.davemorrissey.labs.subscaleviewSubsamplingScaleImageViewgetRequiredRotation

Javadoc

Determines the rotation to be applied to tiles, based on EXIF orientation or chosen setting.

Popular methods of SubsamplingScaleImageView

  • setImage
    Set the image source from a bitmap, resource, asset, file or other URI, starting with a given orient
  • setDoubleTapZoomScale
    Set the scale the image will zoom in to when double tapped. This also the scale point where a double
  • setMaxScale
    Set the maximum scale allowed. A value of 1 means 1:1 pixels at maximum scale. You may wish to set t
  • setMinimumDpi
    This is a screen density aware alternative to #setMaxScale(float); it allows you to express the maxi
  • setScaleAndCenter
    Externally change the scale and translation of the source image. This may be used with getCenter() a
  • getWidth
  • setDoubleTapZoomDpi
    A density aware alternative to #setDoubleTapZoomScale(float); this allows you to express the scale t
  • setMinimumScaleType
    Set the minimum scale type. See static fields. Normally #SCALE_TYPE_CENTER_INSIDE is best, for image
  • setMinimumTileDpi
    By default, image tiles are at least as high resolution as the screen. For a retina screen this may
  • setPanEnabled
    Enable or disable pan gesture detection. Disabling pan causes the image to be centered.
  • setZoomEnabled
    Enable or disable zoom gesture detection. Disabling zoom locks the the current scale.
  • <init>
  • setZoomEnabled,
  • <init>,
  • getCenter,
  • getContext,
  • getHeight,
  • getOrientation,
  • getScale,
  • isReady,
  • onDraw,
  • onImageLoaded

Popular in Java

  • Making http requests using okhttp
  • onCreateOptionsMenu (Activity)
  • getContentResolver (Context)
  • addToBackStack (FragmentTransaction)
  • InetAddress (java.net)
    An Internet Protocol (IP) address. This can be either an IPv4 address or an IPv6 address, and in pra
  • DecimalFormat (java.text)
    A concrete subclass of NumberFormat that formats decimal numbers. It has a variety of features desig
  • LinkedHashMap (java.util)
    LinkedHashMap is an implementation of Map that guarantees iteration order. All optional operations a
  • StringTokenizer (java.util)
    Breaks a string into tokens; new code should probably use String#split.> // Legacy code: StringTo
  • Stream (java.util.stream)
    A sequence of elements supporting sequential and parallel aggregate operations. The following exampl
  • JOptionPane (javax.swing)
  • From CI to AI: The AI layer in your organization
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now