Android Open Source - vlcamera Draggable Bitmap






From Project

Back to project page vlcamera.

License

The source code is released under:

Apache License

If you think the Android project vlcamera 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

/*
author:huydx/* w  ww .j a va  2  s  . c o m*/
github:https://github.com/huydx
 */
package com.ktmt.vlcamera.model;

import android.graphics.Bitmap;
import android.graphics.Matrix;

public class DraggableBitmap {
  private boolean activated;
  
  public Bitmap mBitmap;
  private Matrix marginMatrix;
  private Matrix currentMatrix;
  private Matrix savedMatrix;
  private int mId;

  private boolean touched;

  public DraggableBitmap(Bitmap b) {
    mId = -1;
    currentMatrix = null;
    savedMatrix = null;
    mBitmap = b;
    activated = false;
  }

  public void setCurrentMatrix(Matrix m) {
    this.currentMatrix = null;
    this.currentMatrix = new Matrix(m);
  }

  public void setSavedMatrix(Matrix m) {
    this.savedMatrix = null;
    this.savedMatrix = new Matrix(m);
  }

  public Matrix getCurrentMatrix() {
    return this.currentMatrix;
  }

  public Matrix getSavedMatrix() {
    return this.savedMatrix;
  }

  public void activate() {
    this.activated = true;
  }

  public void deActivate() {
    this.activated = false;
  }

  public boolean isActivate() {
    return activated;
  }

  public boolean isTouched() {
    return touched;
  }

  public void setTouched(boolean touched) {
    this.touched = touched;
  }

  public Matrix getMarginMatrix() {
    return marginMatrix;
  }

  public void setMarginMatrix(Matrix marginMatrix) {
    this.marginMatrix = null;
    this.marginMatrix = new Matrix(marginMatrix);
  }
  
  public int getmId() {
    return mId;
  }

  public void setmId(int mId) {
    this.mId = mId;
  }

}




Java Source Code List

com.ktmt.vlcamera.activities.EditActivity.java
com.ktmt.vlcamera.activities.MenuActivity.java
com.ktmt.vlcamera.activities.ShareActivity.java
com.ktmt.vlcamera.activities.SplashActivity.java
com.ktmt.vlcamera.activities.StampChooseActivity.java
com.ktmt.vlcamera.activities.helper.EditActivityHelper.java
com.ktmt.vlcamera.activities.helper.MenuActivityHelper.java
com.ktmt.vlcamera.activities.helper.ShareActivityHelper.java
com.ktmt.vlcamera.activities.helper.StampChooseActivityHelper.java
com.ktmt.vlcamera.common.vlCameraBitmapUtils.java
com.ktmt.vlcamera.common.vlCameraConstant.java
com.ktmt.vlcamera.custom.BaseActivity.java
com.ktmt.vlcamera.custom.BaseApplication.java
com.ktmt.vlcamera.custom.DraggableImageView.java
com.ktmt.vlcamera.custom.ImageViewNameMap.java
com.ktmt.vlcamera.model.BitmapOperationMap.java
com.ktmt.vlcamera.model.DraggableBitmap.java
com.ktmt.vlcamera.model.DraggableText.java