图形

作者: 一个爱上浪漫的人 | 来源:发表于2017-03-27 11:16 被阅读0次

    import android.graphics.*;

    public class 图形{

    public static void 画矩形(int x,int y,int width,int height,Canvas canvas,Paint paint){

    canvas.drawRect(x,y,x+width,y+height,paint);

    }

    public static void 旋转图片(Canvas canvas,Bitmap bitmap,float 角度,int x,int y,int x1,int y1){

    Matrix m=new Matrix();

    m.postRotate(角度,x,y);

    m.postTranslate(x1,y1);

    canvas.drawBitmap(bitmap,m,null);

    }

    }

    相关文章

      网友评论

          本文标题:图形

          本文链接:https://www.haomeiwen.com/subject/qyzlottx.html