Android Open Source - drive-android-svg My Line






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;
/*from   w  w w .  j  av  a 2 s  .  c o  m*/
/**
 * Created by liudenghui on 14-6-11.
 */
public class MyLine extends MyBaseShape {
  private int x;
  private int y;
  private int sx;
  private int sy;

  public int getX() {
    return x;
  }

  public int getY() {
    return y;
  }

  public void setX(int x) {
    this.x = x;
  }

  public void setY(int y) {
    this.y = y;
  }

  public void setSx(int sx) {
    this.sx = sx;
  }

  public void setSy(int sy) {
    this.sy = sy;
  }

  public int getSx() {
    return sx;
  }

  public int getSy() {
    return sy;
  }

  @Override
  public void generatePath() {
    generatePath(x, y, sx, sy, rotate);
  }

  public void generatePath(int x, int y, int sx, int sy, int rotate) {
    path.reset();
    path.moveTo(x, y);
    path.lineTo(sx, sy);
    matrix.setRotate(rotate, (x + sx) / 2, (y + sy) / 2);
    path.transform(matrix);
    path.computeBounds(bounds, true);
  }
}




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