SVG图像处理

语法

https://developer.mozilla.org/zh-CN/docs/Web/SVG/Tutorial

https://brucewar.gitbooks.io/svg-tutorial/33.SVG%E5%8F%98%E6%8D%A2.html

解析xml(dom4j)

https://dom4j.github.io/

接口:

单一元素:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/**
* 单一元素双行旋转平铺(元素随机)
*
* @param source
* @param itemWidth
* @param width
* @param height
* @param fromColor
* @param toColor
* @return
*/
public static Document getDestDocumentSingle(Document[] source, int itemWidth, int width, int height, String[] fromColor, String[] toColor) {
}

/**
* 单一元素双行旋转平铺(元素不随机)
*
* @param source
* @param itemWidth
* @param fromColor
* @param toColor
* @return
*/
public static Document getDestDocumentSingle(Document source, int itemWidth, int width, int height, String[] fromColor, String[] toColor) {
}

组合元素:

1
2
3
4
5
6
7
8
9
10
/**
* 多种元素平铺(每一个单元的元素都由用户指定(指定图像源及旋转角度即可),用户可以随意客制化)
*
* @param sources 按顺序排列的原图数组(从左到右,从上到下)
* @param itemWidth 原图集合宽度
* @param fromColor 图片原始色值
* @param toColor 图片最终色值
*/
public static Document getDestDocument(FloorSvg[] sources, int itemWidth, int width, int height, String[] fromColor, String[] toColor) {
}