android中的SVG图像的各个属性意义

android中的矢量图,一个矢量图中的各个属性是什么意义(只关注重要的属性)


    
    标签,并给它们设置一些共同的属性
        android:name="group_name"   //这个name很有用,在设置objectAnimator的时候用来区分给那个部分施加动画
        android:pivotY="50"     //这个设置这个group的中心点的X坐标,取值范围为0到100,在做rotation时有用
        android:pivotX="50"     //这个设置这个group的中心点的Y坐标,取值范围为0到100,在做rotation时有用
        android:translateX="20" //将整个group在X轴方向平移多少像素
        android:translateY="30" //将整个group在Y轴方向平移多少像素
        android:rotation="90"   //将整个group以中心点左边旋转的角度,360为一圈
        android:scaleX="0.5"    //横坐标的缩放比例 , 取值1表示100%
        android:scaleY="0.3">   //纵坐标的缩放比例,取值0.5表示50%,取值1.5表示150%
        
        
    


配图

鉴于

android:trimPathStart

android:trimPathEnd

android:trimPathOffset

三个属性比较难懂,特地配了三个图片来表示下


android:trimPathStart="0.1"

此图表示从path的0%开始去除掉0%位置到10%位置的path

android中的SVG图像的各个属性意义_第1张图片
trimPathStart

android:trimPathStart="0.1"
android:trimPathOffset="0.5"

此图表示,先把path的原点移动到50%的位置,再以此为原点去除掉0%位置到10%位置的path

android中的SVG图像的各个属性意义_第2张图片
trimPathStart和trimPathOffset

android:trimPathEnd="0.9"
android:trimPathOffset="0.5"

此图表示,先把path的原点移动到50%的位置,再以此为原点去除掉90%位置到100%位置的path

android中的SVG图像的各个属性意义_第3张图片
trimPathEnd和trimPathOffset

你可能感兴趣的:(android中的SVG图像的各个属性意义)