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

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

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

origin: davemorrissey/subsampling-scale-image-view

/**
 * Convert screen coordinate to source coordinate.
 * @param vx view X coordinate.
 * @param vy view Y coordinate.
 * @param sTarget target object for result. The same instance is also returned.
 * @return source coordinates. This is the same instance passed to the sTarget param.
 */
@Nullable
public final PointF viewToSourceCoord(float vx, float vy, @NonNull PointF sTarget) {
  if (vTranslate == null) {
    return null;
  }
  sTarget.set(viewToSourceX(vx), viewToSourceY(vy));
  return sTarget;
}
origin: davemorrissey/subsampling-scale-image-view

/**
 * Determine whether tile is visible.
 */
private boolean tileVisible(Tile tile) {
  float sVisLeft = viewToSourceX(0),
    sVisRight = viewToSourceX(getWidth()),
    sVisTop = viewToSourceY(0),
    sVisBottom = viewToSourceY(getHeight());
  return !(sVisLeft > tile.sRect.right || tile.sRect.left > sVisRight || sVisTop > tile.sRect.bottom || tile.sRect.top > sVisBottom);
}
origin: davemorrissey/subsampling-scale-image-view

    (int)viewToSourceX(vRect.left),
    (int)viewToSourceY(vRect.top),
    (int)viewToSourceX(vRect.right),
    (int)viewToSourceY(vRect.bottom));
fileSRect(fRect, fRect);
origin: mozilla-tw/Rocket

/**
 * Convert screen coordinate to source coordinate.
 */
public final PointF viewToSourceCoord(float vx, float vy, PointF sTarget) {
  if (vTranslate == null) {
    return null;
  }
  sTarget.set(viewToSourceX(vx), viewToSourceY(vy));
  return sTarget;
}
origin: mozilla-tw/Rocket

/**
 * Determine whether tile is visible.
 */
private boolean tileVisible(Tile tile) {
  float sVisLeft = viewToSourceX(0),
    sVisRight = viewToSourceX(getWidth()),
    sVisTop = viewToSourceY(0),
    sVisBottom = viewToSourceY(getHeight());
  return !(sVisLeft > tile.sRect.right || tile.sRect.left > sVisRight || sVisTop > tile.sRect.bottom || tile.sRect.top > sVisBottom);
}
com.davemorrissey.labs.subscaleviewSubsamplingScaleImageViewviewToSourceX

Javadoc

Convert screen to source x coordinate.

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

  • Creating JSON documents from java classes using gson
  • scheduleAtFixedRate (Timer)
  • requestLocationUpdates (LocationManager)
  • setRequestProperty (URLConnection)
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • FileInputStream (java.io)
    An input stream that reads bytes from a file. File file = ...finally if (in != null) in.clos
  • FileOutputStream (java.io)
    An output stream that writes bytes to a file. If the output file exists, it can be replaced or appen
  • Time (java.sql)
    Java representation of an SQL TIME value. Provides utilities to format and parse the time's represen
  • TreeMap (java.util)
    Walk the nodes of the tree left-to-right or right-to-left. Note that in descending iterations, next
  • JFrame (javax.swing)
  • Top Sublime Text plugins
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