zoukankan      html  css  js  c++  java
  • 图片的处理

    通过矩阵进行操作

    初始化一个矩阵出来

     Matrix matrix=new Matrix();

    1.旋转

    matrix.setRotate(degre,x,y)//degree是度数,旋转多少度数。x,y是值你从那点开始旋转

    2.缩放

    matrix.setScale(float,float);//两个float是缩放比例 一个是宽 一个是高

    3.平移

    matrix.setTranslate(x,y);//x是左右移动距离,y是上下移动距离

    4.镜面

    matrix.setScale(-1.0f,1.0f);
    matrix.postTransLate(bitmap.getWeight,0);
    注意:
    set方法每次使用都会重置matrix
    post方法会在上一次修改的基础上进行修改

    5.倒影

    matrix.setScale(1.0f,-1.0f);
    matrix.postTransLate(0,bitmap.getHeight);
  • 相关阅读:
    cmake
    docker
    rust
    linux
    FPGA
    visual studio
    win+R
    word文档的导出(用freemarker模板导出)(桃)
    iconfont的引入方法
    jquery 日期插件
  • 原文地址:https://www.cnblogs.com/liuyinghai87/p/7133278.html
Copyright © 2011-2022 走看看