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

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

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

origin: davemorrissey/subsampling-scale-image-view

/**
 * Convert source rect to screen rect, integer values.
 */
private void sourceToViewRect(@NonNull Rect sRect, @NonNull Rect vTarget) {
  vTarget.set(
    (int)sourceToViewX(sRect.left),
    (int)sourceToViewY(sRect.top),
    (int)sourceToViewX(sRect.right),
    (int)sourceToViewY(sRect.bottom)
  );
}
origin: davemorrissey/subsampling-scale-image-view

/**
 * Convert source coordinate to view coordinate.
 * @param sx source X coordinate.
 * @param sy source Y coordinate.
 * @param vTarget target object for result. The same instance is also returned.
 * @return view coordinates. This is the same instance passed to the vTarget param.
 */
@Nullable
public final PointF sourceToViewCoord(float sx, float sy, @NonNull PointF vTarget) {
  if (vTranslate == null) {
    return null;
  }
  vTarget.set(sourceToViewX(sx), sourceToViewY(sy));
  return vTarget;
}
origin: davemorrissey/subsampling-scale-image-view

float vFocusNowY = ease(anim.easing, scaleElapsed, anim.vFocusStart.y, anim.vFocusEnd.y - anim.vFocusStart.y, anim.duration);
vTranslate.x -= sourceToViewX(anim.sCenterEnd.x) - vFocusNowX;
vTranslate.y -= sourceToViewY(anim.sCenterEnd.y) - vFocusNowY;
  canvas.drawCircle(sourceToViewX(quickScaleSCenter.x), sourceToViewY(quickScaleSCenter.y), px(35), debugLinePaint);
origin: mozilla-tw/Rocket

/**
 * Convert source coordinate to screen coordinate.
 */
public final PointF sourceToViewCoord(float sx, float sy, PointF vTarget) {
  if (vTranslate == null) {
    return null;
  }
  vTarget.set(sourceToViewX(sx), sourceToViewY(sy));
  return vTarget;
}
origin: mozilla-tw/Rocket

/**
 * Convert source rect to screen rect, integer values.
 */
private Rect sourceToViewRect(Rect sRect, Rect vTarget) {
  vTarget.set(
    (int)sourceToViewX(sRect.left),
    (int)sourceToViewY(sRect.top),
    (int)sourceToViewX(sRect.right),
    (int)sourceToViewY(sRect.bottom)
  );
  return vTarget;
}
origin: mozilla-tw/Rocket

float vFocusNowY = ease(anim.easing, scaleElapsed, anim.vFocusStart.y, anim.vFocusEnd.y - anim.vFocusStart.y, anim.duration);
vTranslate.x -= sourceToViewX(anim.sCenterEnd.x) - vFocusNowX;
vTranslate.y -= sourceToViewY(anim.sCenterEnd.y) - vFocusNowY;
  canvas.drawCircle(sourceToViewX(quickScaleSCenter.x), sourceToViewY(quickScaleSCenter.y), 35, debugPaint);
com.davemorrissey.labs.subscaleviewSubsamplingScaleImageViewsourceToViewX

Javadoc

Convert source to screen 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

  • Reactive rest calls using spring rest template
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • getExternalFilesDir (Context)
  • requestLocationUpdates (LocationManager)
  • Rectangle (java.awt)
    A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-
  • NumberFormat (java.text)
    The abstract base class for all number formats. This class provides the interface for formatting and
  • NoSuchElementException (java.util)
    Thrown when trying to retrieve an element past the end of an Enumeration or Iterator.
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • JPanel (javax.swing)
  • SAXParseException (org.xml.sax)
    Encapsulate an XML parse error or warning.> This module, both source code and documentation, is in t
  • Top Vim 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