Android Open Source - AndroidImageViewZoom Pointer






From Project

Back to project page AndroidImageViewZoom.

License

The source code is released under:

Copyright (c) 2011 Igor Crevar http://extrafull.com/igorcrevar/ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "...

If you think the Android project AndroidImageViewZoom listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.rogicrew.imagezoom.ontouch;
//from  w  w  w.  java2s  .  c  o m
public class Pointer {
  public float x;
  public float y;
  public float lastX;
  public float lastY;
  public int id; 
  
  public Pointer(float x, float y, int id){
    update(x, y, id);
  }
  
  public void update(float x, float y){
    lastX = this.x;
    lastY = this.y;
    this.x = x;
    this.y = y;
  }
  
  public void update(float x, float y, int id){
    this.id = id;
    update(x, y);
  }
  
  public void set(Pointer pointer){
    update(pointer.x, pointer.y, pointer.id);
    lastX = lastY = 0;
  }
}




Java Source Code List

com.rogicrew.imagezoom.ImageViewZoomOptions.java
com.rogicrew.imagezoom.ImageViewZoom.java
com.rogicrew.imagezoom.example.ImageViewZoomExample1Activity.java
com.rogicrew.imagezoom.example.ImageViewZoomTest.java
com.rogicrew.imagezoom.example.UnscaledBitmapOperations.java
com.rogicrew.imagezoom.ontouch.OnTouchInterface.java
com.rogicrew.imagezoom.ontouch.OnTouchMulti.java
com.rogicrew.imagezoom.ontouch.OnTouchSingle.java
com.rogicrew.imagezoom.ontouch.Pointer.java