Android Open Source - drive-android-svg My Base Shape






From Project

Back to project page drive-android-svg.

License

The source code is released under:

Apache License

If you think the Android project drive-android-svg 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.goodow.drive.android.svg.graphics;
//  w  ww. j  a va2  s.c o  m
import android.graphics.Matrix;
import android.graphics.Path;
import android.graphics.RectF;
import android.view.View;

/**
 * Created by liudenghui on 14-5-27.
 */
public class MyBaseShape {
  protected String type;
  protected int fill;
  protected int stroke;
  protected int stroke_width;
  protected int rotate;
  protected boolean isSelected;
  protected RectF bounds = new RectF();
  protected View popupMenuBtn;
  protected Path path = new Path();
  protected Matrix matrix = new Matrix();

  public Path getPath() {
    return path;
  }

  public MyBaseShape() {
  }

  public View getPopupMenuBtn() {
    return popupMenuBtn;
  }

  public void setPopupMenuBtn(View popupMenuBtn) {
    this.popupMenuBtn = popupMenuBtn;
  }

  public boolean isSelected() {
    return isSelected;
  }

  public void setSelected(boolean isSelected) {
    this.isSelected = isSelected;
  }

  public String getType() {
    return type;
  }

  public void setType(String type) {
    this.type = type;
  }

  public int getStroke() {
    return stroke;
  }

  public void setStroke(int stroke) {
    this.stroke = stroke;
  }

  public int getRotate() {
    return rotate;
  }

  public void setRotate(int rotate) {
    this.rotate = rotate;
  }

  public int getStroke_width() {
    return stroke_width;
  }

  public void setStroke_width(int stroke_width) {
    this.stroke_width = stroke_width;
  }

  public int getFill() {
    return fill;
  }

  public void setFill(int fill) {
    this.fill = fill;
  }

  public boolean isInRect(RectF rectF) {
    if (rectF.contains(bounds)) {
      return true;
    }
    return false;
  }

  public RectF getBounds() {
    return bounds;
  }

  public void generatePath() {
  }
}




Java Source Code List

com.goodow.drive.android.svg.DriveAndroidSvgModule.java
com.goodow.drive.android.svg.OnRemoteChangeListener.java
com.goodow.drive.android.svg.OnShowPopupListener.java
com.goodow.drive.android.svg.SvgMainActivity.java
com.goodow.drive.android.svg.SvgModule.java
com.goodow.drive.android.svg.graphics.MyBaseShape.java
com.goodow.drive.android.svg.graphics.MyEllipse.java
com.goodow.drive.android.svg.graphics.MyLine.java
com.goodow.drive.android.svg.graphics.MyPath.java
com.goodow.drive.android.svg.graphics.MyRect.java
com.goodow.drive.android.svg.samples.demo.MainActivity.java
com.goodow.drive.android.svg.utils.CoordinateUtil.java
com.goodow.drive.android.svg.utils.DrawUtil.java
com.goodow.drive.android.svg.utils.ParseUtil.java
com.goodow.drive.android.svg.utils.SwitchUtil.java
com.goodow.drive.android.svg.view.FillColorDialog.java
com.goodow.drive.android.svg.view.LeftMenuLayout.java
com.goodow.drive.android.svg.view.MyDrawable.java
com.goodow.drive.android.svg.view.MySurfaceView.java
com.goodow.drive.android.svg.view.MyViewGroup.java
com.goodow.drive.android.svg.view.MyView.java
com.goodow.drive.android.svg.view.StrokeColorDialog.java
com.goodow.drive.android.svg.view.StrokeWidthDialog.java