1.生成图片代码
import com.entity.Image;
import com..entity.ImageElement;
import org.apache.commons.lang3.StringUtils;
import sun.font.FontDesignMetrics;
import javax.imageio.ImageIO;
import java.awt.*;
import java.awt.image.BufferedImage;
import java.io.IOException;
import java.io.OutputStream;
import java.net.URL;
import java.util.ArrayList;
import java.util.List;
/**
* 生成图片
*/
public class GenerateImage {
/**
* 生成图片
*
* @param imageInfo 图片对象
*/
public static void generate(OutputStream out, Image imageInfo) {
// width表示图像的宽度,height表示图像的高度,imageType参数表示图像字节灰度图像
BufferedImage buffer = new BufferedImage(imageInfo.getWidth(), imageInfo.getHeight(), BufferedImage.TYPE_INT_RGB);
// 创建画板
Graphics2D graphics2D = buffer.createGraphics();
// 去除曲线锯齿状
graphics2D.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
graphics2D.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
// 增加下面代码使得背景透明
// buffer = graphics2D.getDeviceConfiguration().createCompatibleImage(imageInfo.getWidth(), imageInfo.getHeight(), Transparency.TRANSLUCENT);
// graphics2D.dispose();
// buffer.createGraphics();
if (null != imageInfo.getElements() && !imageInfo.getElements().isEmpty()) {
for (ImageElement element : imageInfo.getElements()) {
if (null != element.getType()) {
if ("text".equals(element.getType())) {
// 文本
addTextGraphics(buffer, element);
} else if ("image".equals(element.getType()) || "mask".equals(element.getType())) {
// 图片
addImageGraphics(buffer, element);
}
}
}
}
// 生成图片
createImage(out, buffer);
}
/**
* 添加文字
*
* @param buffer 缓存图片
* @param element 图片子元素
*/
static void addTextGraphics(BufferedImage buffer, ImageElement element) {
// 创建画布
Graphics2D graphics2D = buffer.createGraphics();
// 去除曲线锯齿状
graphics2D.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
graphics2D.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
// 字体为空设置默认字体
if (null == element.getFontFamily() || "".equals(element.getFontFamily())) {
element.setFontFamily(null);
}
// 获取字体文件
String fontTTF = FontTTFFactory.getFontTTF(element.getFontFamily());
Font font = new Font(element.getFontFamily(), getFontStyle(element.getFontStyle()), element.getFontSize());
if (null != fontTTF) {
try {
// 找到字体文件则走字体文件
font = Font.createFont(Font.TRUETYPE_FONT, FontTTFFactory.getFontFile(fontTTF));
font = font.deriveFont(getFontStyle(element.getFontStyle()), Float.valueOf(element.getFontSize()));
} catch (FontFormatException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
}
graphics2D.setFont(font);
// 设置字体颜色,先设置颜色,再填充内容
if (null != element.getColor()) {
graphics2D.setColor(element.getColor());
}
FontMetrics fontMetrics = FontDesignMetrics.getMetrics(font);
// 获取基线上面 Asent高度
int ascent = fontMetrics.getAscent();
// 通过宽度计算文字行数
List<String> textRows = multiRows(element.getContent(), element.getWidth(), element.getHeight(), fontMetrics);
// drawString方法中的x,y坐标是在最左侧字符的基线位于此图形上下文坐标系的 (x, y) 位置处
// https://bbs.csdn.net/topics/390469060
for (int i = 0; i < textRows.size(); i++) {
graphics2D.drawString(textRows.get(i), element.getLeft(), element.getTop() + ascent * (i + 1));
}
// 关闭画布
graphics2D.dispose();
}
/**
* 添加图片
*
* @param buffer
* @param element
*/
static void addImageGraphics(BufferedImage buffer, ImageElement element) {
// 创建画布
Graphics2D graphics2D = buffer.createGraphics();
// 去除曲线锯齿状
graphics2D.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
graphics2D.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
BufferedImage img = null;
try {
// 获取图片
img = ImageIO.read(new URL(element.getUrl()));
if (img != null) {
// 添加图片
// img要绘制的指定图像,如果img为null,则此方法不执行任何动作,x:x坐标, y:y 坐标,width:矩形的宽度,height:矩形的高度,observer:当转换了更多图像时要通知的对象
graphics2D.drawImage(img, element.getLeft(), element.getTop(), element.getWidth(), element.getHeight(), null);
}
} catch (IOException e) {
e.printStackTrace();
} finally {
// 关闭画布
graphics2D.dispose();
}
}
/**
* 生成图片
*
* @param buffer 缓存图片
*/
static void createImage(OutputStream out, BufferedImage buffer) {
try {
ImageIO.write(buffer, "PNG", out);
} catch (Exception e) {
e.printStackTrace();
}
}
/**
* 文本分行
*
* @param context 原文本
* @param windowWidth 文本框宽度
* @param windowHeight 文本框高度
* @param fontMetrics 文本字体格式
* @return 分行后的文本list
*/
private static List<String> multiRows(String context, Integer windowWidth, Integer windowHeight, FontMetrics fontMetrics) {
Integer contextWidth = fontMetrics.stringWidth(context);
Integer fontHeight = fontMetrics.getHeight();
List<String> rowsContext = new ArrayList<>();
if (contextWidth < windowWidth && !context.contains("\n")) {
rowsContext.add(context);
return rowsContext;
} else {
int row = 0;
int i = 0;
for (; i < context.length(); i++) {
if (fontHeight * row > windowHeight)
break;
while (i < context.length() && fontMetrics.stringWidth(context.substring(0, i)) <= windowWidth) {
if (context.substring(i, i + 1).equals("\n")) {
break;
}
i++;
}
if (i == context.length()) {
break;
}
rowsContext.add(context.substring(0, i));
row++;
if (i == context.length() - 1) {
if (context.substring(i, i + 1).equals("\n")) {
context = "";
break;
} else {
rowsContext.add(context.substring(i));
context = "";
break;
}
} else {
if (context.substring(i, i + 1).equals("\n")) {
context = context.substring(i + 1);
} else {
context = context.substring(i);
}
}
i = 0;
}
if (StringUtils.isNotBlank(context) && fontHeight * row < windowHeight) {
rowsContext.add(context);
}
}
return rowsContext;
}
/**
* 16进制颜色值转换为rgb
*
* @param color 16进制颜色值
* @return rgb颜色
*/
static Color toARGB(String color) {
// 判断第一个字符是否为#
if (color.startsWith("#")) {
color = color.substring(1);
}
int alpha = Integer.parseInt(color.substring(0, 2), 16);
int red = Integer.parseInt(color.substring(2, 4), 16);
int green = Integer.parseInt(color.substring(4, 6), 16);
int blue = Integer.parseInt(color.substring(6, 8), 16);
return new Color(red, green, blue, alpha);
}
/**
* 获取字体样式 Font.PLAIN普通样式,Font.BOLD粗体,Font.ITALIC斜体
*
* @param style 字体样式
* @return 字体样式
*/
private static int getFontStyle(String style) {
if (null != style) {
if ("ITALIC".equals(style.toUpperCase())) {
return Font.ITALIC;
} else {
return Font.PLAIN;
}
} else {
return Font.PLAIN;
}
}
}
2.
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.orderplus.crepik.client.util.json.ColorJsonDeserializer;
import java.awt.*;
import java.util.List;
/**
* 图片对象
*/
@JsonIgnoreProperties(ignoreUnknown = true)
public class Image {
// 图片标题
private String title;
private int top;
// 图片高度
private int height;
// 图片宽度
private int width;
// // 背景大小
// private String backgroundSize;
// 背景图片
private String backgroundImage;
// 背景颜色RGB
private Color backgroundColor;
// 背景图填充信息
private String backgroundRepeat;
//
private String className;
private String repeatId;
private String repeatGroup;
// 图片子元素
private List<ImageElement> elements;
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public int getTop() {
return top;
}
public void setTop(int top) {
this.top = top;
}
public int getHeight() {
return height;
}
public void setHeight(int height) {
this.height = height;
}
public int getWidth() {
return width;
}
public void setWidth(int width) {
this.width = width;
}
// public String getBackgroundSize() {
// return backgroundSize;
// }
// public void setBackgroundSize(String backgroundSize) {
// this.backgroundSize = backgroundSize;
// }
public String getBackgroundImage() {
return backgroundImage;
}
public void setBackgroundImage(String backgroundImage) {
this.backgroundImage = backgroundImage;
}
public Color getBackgroundColor() {
return backgroundColor;
}
@JsonDeserialize(using = ColorJsonDeserializer.class)
public void setBackgroundColor(Color backgroundColor) {
this.backgroundColor = backgroundColor;
}
public String getBackgroundRepeat() {
return backgroundRepeat;
}
public void setBackgroundRepeat(String backgroundRepeat) {
this.backgroundRepeat = backgroundRepeat;
}
public String getClassName() {
return className;
}
public void setClassName(String className) {
this.className = className;
}
public String getRepeatId() {
return repeatId;
}
public void setRepeatId(String repeatId) {
this.repeatId = repeatId;
}
public String getRepeatGroup() {
return repeatGroup;
}
public void setRepeatGroup(String repeatGroup) {
this.repeatGroup = repeatGroup;
}
public List<ImageElement> getElements() {
return elements;
}
public void setElements(List<ImageElement> elements) {
this.elements = elements;
}
}
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.orderplus.crepik.client.util.json.ColorJsonDeserializer;
import java.awt.*;
/**
* 图片子元素对象
*/
@JsonIgnoreProperties(ignoreUnknown = true)
public class ImageElement {
// 元素类型,1:文字,2:图片
private String type;
//
private String category;
// 透明度
private float opacity;
// 元素padding
private int[] padding;
// 宽度
private int width;
// 高度
private int height;
// 左边距离
private int left;
// 顶部距离
private int top;
// 阴影
// private String boxShadow;
//
private String resize;
// 圆角
private int borderRadius;
// 地址
private String url;
// 颜色RGB
private Color color;
// 背景色RGB
private Color backgroundColor;
// 字体类型
private String fontFamily;
// 字体样式 Font.PLAIN普通样式,Font.BOLD粗体,Font.ITALIC斜体
private String fontStyle;
// 字体大小
private int fontSize;
// 字体粗细
private int fontWeight;
// 字体高度
private double lineHeight;
// 字间距
private double letterSpacing;
// 位置
private String textAlign;
private String verticalAlign;
// 内容
private String content;
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public String getCategory() {
return category;
}
public void setCategory(String category) {
this.category = category;
}
public float getOpacity() {
return opacity;
}
public void setOpacity(float opacity) {
this.opacity = opacity;
}
public int[] getPadding() {
return padding;
}
public void setPadding(int[] padding) {
this.padding = padding;
}
public int getWidth() {
return width;
}
public void setWidth(int width) {
this.width = width;
}
public int getHeight() {
return height;
}
public void setHeight(int height) {
this.height = height;
}
public int getLeft() {
return left;
}
public void setLeft(int left) {
this.left = left;
}
public int getTop() {
return top;
}
public void setTop(int top) {
this.top = top;
}
// public String getBoxShadow() {
// return boxShadow;
// }
//
// public void setBoxShadow(String boxShadow) {
// this.boxShadow = boxShadow;
// }
public String getResize() {
return resize;
}
public void setResize(String resize) {
this.resize = resize;
}
public int getBorderRadius() {
return borderRadius;
}
public void setBorderRadius(int borderRadius) {
this.borderRadius = borderRadius;
}
public String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url;
}
public Color getColor() {
return color;
}
@JsonDeserialize(using = ColorJsonDeserializer.class)
public void setColor(Color color) {
this.color = color;
}
public Color getBackgroundColor() {
return backgroundColor;
}
@JsonDeserialize(using = ColorJsonDeserializer.class)
public void setBackgroundColor(Color backgroundColor) {
this.backgroundColor = backgroundColor;
}
public String getFontFamily() {
return fontFamily;
}
public void setFontFamily(String fontFamily) {
this.fontFamily = fontFamily;
}
public String getFontStyle() {
return fontStyle;
}
public void setFontStyle(String fontStyle) {
this.fontStyle = fontStyle;
}
public int getFontSize() {
return fontSize;
}
public void setFontSize(int fontSize) {
this.fontSize = fontSize;
}
public int getFontWeight() {
return fontWeight;
}
public void setFontWeight(int fontWeight) {
this.fontWeight = fontWeight;
}
public double getLineHeight() {
return lineHeight;
}
public void setLineHeight(double lineHeight) {
this.lineHeight = lineHeight;
}
public double getLetterSpacing() {
return letterSpacing;
}
public void setLetterSpacing(double letterSpacing) {
this.letterSpacing = letterSpacing;
}
public String getTextAlign() {
return textAlign;
}
public void setTextAlign(String textAlign) {
this.textAlign = textAlign;
}
public String getVerticalAlign() {
return verticalAlign;
}
public void setVerticalAlign(String verticalAlign) {
this.verticalAlign = verticalAlign;
}
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
}
请求数据:
{
"version": "5.7.0",
"type": "poster",
"global": {
"zoom": 1,
"dpi": 72,
"showWatermark": false,
"source": "gaoding"
},
"layouts": [
{
"title": "",
"backgroundSize": [
1070,
390
],
"backgroundImage": "https://st-gdx.dancf.com/gaodingx/307/design/20190616-195014-3cde.png",
"backgroundColor": "#ffffffff",
"backgroundImageInfo": {
"opacity": 1,
"width": 1070,
"height": 390,
"transform": {
"a": 1,
"b": 0,
"c": 0,
"d": 1,
"tx": -160,
"ty": 0
}
},
"backgroundRepeat": "no-repeat",
"height": 390,
"width": 750,
"className": null,
"repeatId": null,
"repeatGroup": null,
"elements": [
{
"type": "image",
"category": "",
"opacity": 1,
"padding": [
0,
0,
0,
0
],
"width": 754,
"height": 368,
"left": -3,
"top": -5,
"transform": {
"a": 1,
"b": 0,
"c": 0,
"d": 1,
"tx": 0,
"ty": 0
},
"boxShadow": {
"color": null
},
"resize": 7,
"dragable": true,
"rotatable": true,
"editable": true,
"frozen": false,
"hidden": false,
"lock": false,
"borderRadius": 0,
"filter": {
"hueRotate": 0,
"saturate": 0,
"brightness": 0,
"gaussianBlur": 0
},
"url": "https://st-gdx.dancf.com/gaodingx/307/design/20190616-195014-409b.png",
"originWidth": 1115,
"originHeight": 368,
"effectedImage": null,
"effectedImageWidth": 0,
"effectedImageHeight": 0,
"effectedImageOffsetLeft": 0,
"effectedImageOffsetTop": 0,
"imageEffects": [
],
"imageEffectsHash": "",
"aggregatedColors": [
],
"mainColor": null,
"effectScale": 1,
"animationEffects": [
],
"version": "5.7.0",
"clip": {
"bottom": 0,
"right": 192,
"left": 169,
"top": 0
}
},
{
"type": "image",
"category": "",
"opacity": 1,
"padding": [
0,
0,
0,
0
],
"width": 720,
"height": 340,
"left": 15,
"top": 15,
"transform": {
"a": 1,
"b": 0,
"c": 0,
"d": 1,
"tx": 0,
"ty": 0
},
"boxShadow": {
"color": null
},
"resize": 7,
"dragable": true,
"rotatable": true,
"editable": true,
"frozen": false,
"hidden": false,
"lock": false,
"borderRadius": 0,
"filter": {
"hueRotate": 0,
"saturate": 0,
"brightness": 0,
"gaussianBlur": 0
},
"url": "https://st-gdx.dancf.com/gaodingx/307/design/20190616-195014-d325.jpg",
"originWidth": 720,
"originHeight": 340,
"effectedImage": null,
"effectedImageWidth": 0,
"effectedImageHeight": 0,
"effectedImageOffsetLeft": 0,
"effectedImageOffsetTop": 0,
"imageEffects": [
],
"imageEffectsHash": "",
"aggregatedColors": [
],
"mainColor": null,
"effectScale": 1,
"animationEffects": [
],
"version": "5.7.0",
"clip": {
"bottom": 0,
"right": 0,
"left": 0,
"top": 0
}
},
{
"type": "image",
"category": "",
"opacity": 1,
"padding": [
0,
0,
0,
0
],
"width": 720,
"height": 17,
"left": 15,
"top": 338,
"transform": {
"a": 1,
"b": 0,
"c": 0,
"d": 1,
"tx": 0,
"ty": 0
},
"boxShadow": {
"color": null
},
"resize": 7,
"dragable": true,
"rotatable": true,
"editable": true,
"frozen": false,
"hidden": false,
"lock": false,
"borderRadius": 0,
"filter": {
"hueRotate": 0,
"saturate": 0,
"brightness": 0,
"gaussianBlur": 0
},
"url": "https://st-gdx.dancf.com/gaodingx/307/design/20190616-195014-f46e.png",
"originWidth": 720,
"originHeight": 17,
"effectedImage": null,
"effectedImageWidth": 0,
"effectedImageHeight": 0,
"effectedImageOffsetLeft": 0,
"effectedImageOffsetTop": 0,
"imageEffects": [
],
"imageEffectsHash": "",
"aggregatedColors": [
],
"mainColor": null,
"effectScale": 1,
"animationEffects": [
],
"version": "5.7.0",
"clip": {
"bottom": 0,
"right": 0,
"left": 0,
"top": 0
}
},
{
"type": "image",
"category": "",
"opacity": 1,
"padding": [
0,
0,
0,
0
],
"width": 138,
"height": 138,
"left": 669,
"top": 152,
"transform": {
"a": 1,
"b": 0,
"c": 0,
"d": 1,
"tx": 0,
"ty": 0
},
"boxShadow": {
"color": null
},
"resize": 7,
"dragable": true,
"rotatable": true,
"editable": true,
"frozen": false,
"hidden": false,
"lock": false,
"borderRadius": 0,
"filter": {
"hueRotate": 0,
"saturate": 0,
"brightness": 0,
"gaussianBlur": 0
},
"url": "https://st-gdx.dancf.com/gaodingx/307/design/20190616-195018-c16e.png",
"originWidth": 138,
"originHeight": 138,
"effectedImage": null,
"effectedImageWidth": 0,
"effectedImageHeight": 0,
"effectedImageOffsetLeft": 0,
"effectedImageOffsetTop": 0,
"imageEffects": [
],
"imageEffectsHash": "",
"aggregatedColors": [
],
"mainColor": null,
"effectScale": 1,
"animationEffects": [
],
"version": "5.7.0",
"clip": {
"bottom": 0,
"right": 0,
"left": 0,
"top": 0
}
},
{
"type": "image",
"category": "",
"opacity": 1,
"padding": [
0,
0,
0,
0
],
"width": 15,
"height": 7,
"left": 574,
"top": 246,
"transform": {
"a": 1,
"b": 0,
"c": 0,
"d": 1,
"tx": 0,
"ty": 0
},
"boxShadow": {
"color": null
},
"resize": 7,
"dragable": true,
"rotatable": true,
"editable": true,
"frozen": false,
"hidden": false,
"lock": false,
"borderRadius": 0,
"filter": {
"hueRotate": 0,
"saturate": 0,
"brightness": 0,
"gaussianBlur": 0
},
"url": "https://st-gdx.dancf.com/gaodingx/307/design/20190616-195018-9afe.png",
"originWidth": 15,
"originHeight": 7,
"effectedImage": null,
"effectedImageWidth": 0,
"effectedImageHeight": 0,
"effectedImageOffsetLeft": 0,
"effectedImageOffsetTop": 0,
"imageEffects": [
],
"imageEffectsHash": "",
"aggregatedColors": [
],
"mainColor": null,
"effectScale": 1,
"animationEffects": [
],
"version": "5.7.0",
"clip": {
"bottom": 0,
"right": 0,
"left": 0,
"top": 0
}
},
{
"type": "image",
"category": "",
"opacity": 1,
"padding": [
0,
0,
0,
0
],
"width": 28,
"height": 17,
"left": 680,
"top": 86,
"transform": {
"a": 1,
"b": 0,
"c": 0,
"d": 1,
"tx": 0,
"ty": 0
},
"boxShadow": {
"color": null
},
"resize": 7,
"dragable": true,
"rotatable": true,
"editable": true,
"frozen": false,
"hidden": false,
"lock": false,
"borderRadius": 0,
"filter": {
"hueRotate": 0,
"saturate": 0,
"brightness": 0,
"gaussianBlur": 0
},
"url": "https://st-gdx.dancf.com/gaodingx/307/design/20190616-195018-6b81.png",
"originWidth": 28,
"originHeight": 17,
"effectedImage": null,
"effectedImageWidth": 0,
"effectedImageHeight": 0,
"effectedImageOffsetLeft": 0,
"effectedImageOffsetTop": 0,
"imageEffects": [
],
"imageEffectsHash": "",
"aggregatedColors": [
],
"mainColor": null,
"effectScale": 1,
"animationEffects": [
],
"version": "5.7.0",
"clip": {
"bottom": 0,
"right": 0,
"left": 0,
"top": 0
}
},
{
"type": "image",
"category": "",
"opacity": 1,
"padding": [
0,
0,
0,
0
],
"width": 109,
"height": 18,
"left": 626,
"top": 310,
"transform": {
"a": 1,
"b": 0,
"c": 0,
"d": 1,
"tx": 0,
"ty": 0
},
"boxShadow": {
"color": null
},
"resize": 7,
"dragable": true,
"rotatable": true,
"editable": true,
"frozen": false,
"hidden": false,
"lock": false,
"borderRadius": 0,
"filter": {
"hueRotate": 0,
"saturate": 0,
"brightness": 0,
"gaussianBlur": 0
},
"url": "https://st-gdx.dancf.com/gaodingx/307/design/20190616-195018-0bae.png",
"originWidth": 109,
"originHeight": 18,
"effectedImage": null,
"effectedImageWidth": 0,
"effectedImageHeight": 0,
"effectedImageOffsetLeft": 0,
"effectedImageOffsetTop": 0,
"imageEffects": [
],
"imageEffectsHash": "",
"aggregatedColors": [
],
"mainColor": null,
"effectScale": 1,
"animationEffects": [
],
"version": "5.7.0",
"clip": {
"bottom": 0,
"right": 0,
"left": 0,
"top": 0
}
},
{
"type": "image",
"category": "",
"opacity": 1,
"padding": [
0,
0,
0,
0
],
"width": 36,
"height": 13,
"left": 564,
"top": 321,
"transform": {
"a": 1,
"b": 0,
"c": 0,
"d": 1,
"tx": 0,
"ty": 0
},
"boxShadow": {
"color": null
},
"resize": 7,
"dragable": true,
"rotatable": true,
"editable": true,
"frozen": false,
"hidden": false,
"lock": false,
"borderRadius": 0,
"filter": {
"hueRotate": 0,
"saturate": 0,
"brightness": 0,
"gaussianBlur": 0
},
"url": "https://st-gdx.dancf.com/gaodingx/307/design/20190616-195018-cd4e.png",
"originWidth": 36,
"originHeight": 13,
"effectedImage": null,
"effectedImageWidth": 0,
"effectedImageHeight": 0,
"effectedImageOffsetLeft": 0,
"effectedImageOffsetTop": 0,
"imageEffects": [
],
"imageEffectsHash": "",
"aggregatedColors": [
],
"mainColor": null,
"effectScale": 1,
"animationEffects": [
],
"version": "5.7.0",
"clip": {
"bottom": 0,
"right": 0,
"left": 0,
"top": 0
}
},
{
"type": "image",
"category": "",
"opacity": 1,
"padding": [
0,
0,
0,
0
],
"width": 57,
"height": 57,
"left": 136,
"top": 38,
"transform": {
"a": 1,
"b": 0,
"c": 0,
"d": 1,
"tx": 0,
"ty": 0
},
"boxShadow": {
"color": null
},
"resize": 7,
"dragable": true,
"rotatable": true,
"editable": true,
"frozen": false,
"hidden": false,
"lock": false,
"borderRadius": 0,
"filter": {
"hueRotate": 0,
"saturate": 0,
"brightness": 0,
"gaussianBlur": 0
},
"url": "https://st-gdx.dancf.com/gaodingx/307/design/20190616-195017-a6f1.png",
"originWidth": 57,
"originHeight": 57,
"effectedImage": null,
"effectedImageWidth": 0,
"effectedImageHeight": 0,
"effectedImageOffsetLeft": 0,
"effectedImageOffsetTop": 0,
"imageEffects": [
],
"imageEffectsHash": "",
"aggregatedColors": [
],
"mainColor": null,
"effectScale": 1,
"animationEffects": [
],
"version": "5.7.0",
"clip": {
"bottom": 0,
"right": 0,
"left": 0,
"top": 0
}
},
{
"type": "image",
"category": "",
"opacity": 1,
"padding": [
0,
0,
0,
0
],
"width": 28,
"height": 17,
"left": 155,
"top": 163,
"transform": {
"a": 1,
"b": 0,
"c": 0,
"d": 1,
"tx": 0,
"ty": 0
},
"boxShadow": {
"color": null
},
"resize": 7,
"dragable": true,
"rotatable": true,
"editable": true,
"frozen": false,
"hidden": false,
"lock": false,
"borderRadius": 0,
"filter": {
"hueRotate": 0,
"saturate": 0,
"brightness": 0,
"gaussianBlur": 0
},
"url": "https://st-gdx.dancf.com/gaodingx/307/design/20190616-195017-8741.png",
"originWidth": 28,
"originHeight": 17,
"effectedImage": null,
"effectedImageWidth": 0,
"effectedImageHeight": 0,
"effectedImageOffsetLeft": 0,
"effectedImageOffsetTop": 0,
"imageEffects": [
],
"imageEffectsHash": "",
"aggregatedColors": [
],
"mainColor": null,
"effectScale": 1,
"animationEffects": [
],
"version": "5.7.0",
"clip": {
"bottom": 0,
"right": 0,
"left": 0,
"top": 0
}
},
{
"type": "image",
"category": "",
"opacity": 1,
"padding": [
0,
0,
0,
0
],
"width": 14,
"height": 8,
"left": 100,
"top": 244,
"transform": {
"a": 1,
"b": 0,
"c": 0,
"d": 1,
"tx": 0,
"ty": 0
},
"boxShadow": {
"color": null
},
"resize": 7,
"dragable": true,
"rotatable": true,
"editable": true,
"frozen": false,
"hidden": false,
"lock": false,
"borderRadius": 0,
"filter": {
"hueRotate": 0,
"saturate": 0,
"brightness": 0,
"gaussianBlur": 0
},
"url": "https://st-gdx.dancf.com/gaodingx/307/design/20190616-195017-ebb2.png",
"originWidth": 14,
"originHeight": 8,
"effectedImage": null,
"effectedImageWidth": 0,
"effectedImageHeight": 0,
"effectedImageOffsetLeft": 0,
"effectedImageOffsetTop": 0,
"imageEffects": [
],
"imageEffectsHash": "",
"aggregatedColors": [
],
"mainColor": null,
"effectScale": 1,
"animationEffects": [
],
"version": "5.7.0",
"clip": {
"bottom": 0,
"right": 0,
"left": 0,
"top": 0
}
},
{
"type": "image",
"category": "",
"opacity": 1,
"padding": [
0,
0,
0,
0
],
"width": 88,
"height": 195,
"left": 29,
"top": -34,
"transform": {
"a": 1,
"b": 0,
"c": 0,
"d": 1,
"tx": 0,
"ty": 0
},
"boxShadow": {
"color": null
},
"resize": 7,
"dragable": true,
"rotatable": true,
"editable": true,
"frozen": false,
"hidden": false,
"lock": false,
"borderRadius": 0,
"filter": {
"hueRotate": 0,
"saturate": 0,
"brightness": 0,
"gaussianBlur": 0
},
"url": "https://st-gdx.dancf.com/gaodingx/307/design/20190616-195017-0be6.png",
"originWidth": 88,
"originHeight": 195,
"effectedImage": null,
"effectedImageWidth": 0,
"effectedImageHeight": 0,
"effectedImageOffsetLeft": 0,
"effectedImageOffsetTop": 0,
"imageEffects": [
],
"imageEffectsHash": "",
"aggregatedColors": [
],
"mainColor": null,
"effectScale": 1,
"animationEffects": [
],
"version": "5.7.0",
"clip": {
"bottom": 0,
"right": 0,
"left": 0,
"top": 0
}
},
{
"type": "image",
"category": "",
"opacity": 1,
"padding": [
0,
0,
0,
0
],
"width": 121,
"height": 2,
"left": 14,
"top": 211,
"transform": {
"a": 1,
"b": 0,
"c": 0,
"d": 1,
"tx": 0,
"ty": 0
},
"boxShadow": {
"color": null
},
"resize": 7,
"dragable": true,
"rotatable": true,
"editable": true,
"frozen": false,
"hidden": false,
"lock": false,
"borderRadius": 0,
"filter": {
"hueRotate": 0,
"saturate": 0,
"brightness": 0,
"gaussianBlur": 0
},
"url": "https://st-gdx.dancf.com/gaodingx/307/design/20190616-195017-5b8c.png",
"originWidth": 121,
"originHeight": 2,
"effectedImage": null,
"effectedImageWidth": 0,
"effectedImageHeight": 0,
"effectedImageOffsetLeft": 0,
"effectedImageOffsetTop": 0,
"imageEffects": [
],
"imageEffectsHash": "",
"aggregatedColors": [
],
"mainColor": null,
"effectScale": 1,
"animationEffects": [
],
"version": "5.7.0",
"clip": {
"bottom": 0,
"right": 0,
"left": 0,
"top": 0
}
},
{
"type": "image",
"category": "",
"opacity": 1,
"padding": [
0,
0,
0,
0
],
"width": 29,
"height": 27,
"left": 113,
"top": 154,
"transform": {
"a": 1,
"b": 0,
"c": 0,
"d": 1,
"tx": 0,
"ty": 0
},
"boxShadow": {
"color": null
},
"resize": 7,
"dragable": true,
"rotatable": true,
"editable": true,
"frozen": false,
"hidden": false,
"lock": false,
"borderRadius": 0,
"filter": {
"hueRotate": 0,
"saturate": 0,
"brightness": 0,
"gaussianBlur": 0
},
"url": "https://st-gdx.dancf.com/gaodingx/307/design/20190616-195015-922b.png",
"originWidth": 29,
"originHeight": 27,
"effectedImage": null,
"effectedImageWidth": 0,
"effectedImageHeight": 0,
"effectedImageOffsetLeft": 0,
"effectedImageOffsetTop": 0,
"imageEffects": [
],
"imageEffectsHash": "",
"aggregatedColors": [
],
"mainColor": null,
"effectScale": 1,
"animationEffects": [
],
"version": "5.7.0",
"clip": {
"bottom": 0,
"right": 0,
"left": 0,
"top": 0
}
},
{
"type": "image",
"category": "",
"opacity": 1,
"padding": [
0,
0,
0,
0
],
"width": 33,
"height": 16,
"left": 111,
"top": 312,
"transform": {
"a": 1,
"b": 0,
"c": 0,
"d": 1,
"tx": 0,
"ty": 0
},
"boxShadow": {
"color": null
},
"resize": 7,
"dragable": true,
"rotatable": true,
"editable": true,
"frozen": false,
"hidden": false,
"lock": false,
"borderRadius": 0,
"filter": {
"hueRotate": 0,
"saturate": 0,
"brightness": 0,
"gaussianBlur": 0
},
"url": "https://st-gdx.dancf.com/gaodingx/307/design/20190616-195015-e52c.png",
"originWidth": 33,
"originHeight": 16,
"effectedImage": null,
"effectedImageWidth": 0,
"effectedImageHeight": 0,
"effectedImageOffsetLeft": 0,
"effectedImageOffsetTop": 0,
"imageEffects": [
],
"imageEffectsHash": "",
"aggregatedColors": [
],
"mainColor": null,
"effectScale": 1,
"animationEffects": [
],
"version": "5.7.0",
"clip": {
"bottom": 0,
"right": 0,
"left": 0,
"top": 0
}
},
{
"type": "image",
"category": "",
"opacity": 1,
"padding": [
0,
0,
0,
0
],
"width": 351,
"height": 355,
"left": 199,
"top": 22,
"transform": {
"a": 1,
"b": 0,
"c": 0,
"d": 1,
"tx": 0,
"ty": 0
},
"boxShadow": {
"color": null
},
"resize": 7,
"dragable": true,
"rotatable": true,
"editable": true,
"frozen": false,
"hidden": false,
"lock": false,
"borderRadius": 0,
"filter": {
"hueRotate": 0,
"saturate": 0,
"brightness": 0,
"gaussianBlur": 0
},
"url": "https://st-gdx.dancf.com/gaodingx/307/design/20190616-195015-c5db.png",
"originWidth": 351,
"originHeight": 355,
"effectedImage": null,
"effectedImageWidth": 0,
"effectedImageHeight": 0,
"effectedImageOffsetLeft": 0,
"effectedImageOffsetTop": 0,
"imageEffects": [
],
"imageEffectsHash": "",
"aggregatedColors": [
],
"mainColor": null,
"effectScale": 1,
"animationEffects": [
],
"version": "5.7.0",
"clip": {
"bottom": 0,
"right": 0,
"left": 0,
"top": 0
}
},
{
"type": "mask",
"category": "mainImg",
"opacity": 1,
"padding": [
0,
0,
0,
0
],
"width": 328,
"height": 332,
"left": 211,
"top": 34,
"transform": {
"a": 1,
"b": 0,
"c": 0,
"d": 1,
"tx": 0,
"ty": 0
},
"boxShadow": {
"color": null
},
"resize": 7,
"dragable": true,
"rotatable": true,
"editable": true,
"frozen": false,
"hidden": false,
"lock": false,
"borderRadius": 0,
"filter": {
"hueRotate": 0,
"saturate": 0,
"brightness": 0,
"gaussianBlur": 0
},
"image": null,
"clip": null,
"url": "https://st-gdx.dancf.com/gaodingx/307/design/20190616-195015-3a6c.png",
"mask": "https://st-gdx.dancf.com/gaodingx/307/design/20190616-195015-3a6c.png",
"imageUrl": "https://st-gdx.dancf.com/gaodingx/307/design/20190616-195219-f5ef.png",
"imageTransform": {
"a": 1,
"b": 0,
"c": 0,
"d": 1,
"tx": 0,
"ty": 0
},
"imageWidth": 328,
"imageHeight": 332,
"animationEffects": [
],
"originWidth": 328,
"originHeight": 332,
"effectedImage": null,
"effectedImageWidth": 0,
"effectedImageHeight": 0,
"effectedImageOffsetLeft": 0,
"effectedImageOffsetTop": 0,
"imageEffects": [
],
"imageEffectsHash": "",
"aggregatedColors": [
],
"mainColor": null,
"effectScale": 1,
"version": "5.7.0"
},
{
"type": "image",
"category": "",
"opacity": 1,
"padding": [
0,
0,
0,
0
],
"width": 255,
"height": 37,
"left": 155,
"top": 285,
"transform": {
"a": 1,
"b": 0,
"c": 0,
"d": 1,
"tx": 0,
"ty": 0
},
"boxShadow": {
"color": null
},
"resize": 7,
"dragable": true,
"rotatable": true,
"editable": true,
"frozen": false,
"hidden": false,
"lock": false,
"borderRadius": 0,
"filter": {
"hueRotate": 0,
"saturate": 0,
"brightness": 0,
"gaussianBlur": 0
},
"url": "https://st-gdx.dancf.com/gaodingx/307/design/20190616-195015-488a.png",
"originWidth": 255,
"originHeight": 37,
"effectedImage": null,
"effectedImageWidth": 0,
"effectedImageHeight": 0,
"effectedImageOffsetLeft": 0,
"effectedImageOffsetTop": 0,
"imageEffects": [
],
"imageEffectsHash": "",
"aggregatedColors": [
],
"mainColor": null,
"effectScale": 1,
"animationEffects": [
],
"version": "5.7.0",
"clip": {
"bottom": 0,
"right": 0,
"left": 0,
"top": 0
}
},
{
"type": "image",
"category": "",
"opacity": 1,
"padding": [
0,
0,
0,
0
],
"width": 188,
"height": 37,
"left": 155,
"top": 235,
"transform": {
"a": 1,
"b": 0,
"c": 0,
"d": 1,
"tx": 0,
"ty": 0
},
"boxShadow": {
"color": null
},
"resize": 7,
"dragable": true,
"rotatable": true,
"editable": true,
"frozen": false,
"hidden": false,
"lock": false,
"borderRadius": 0,
"filter": {
"hueRotate": 0,
"saturate": 0,
"brightness": 0,
"gaussianBlur": 0
},
"url": "https://st-gdx.dancf.com/gaodingx/307/design/20190616-195015-c99a.png",
"originWidth": 188,
"originHeight": 37,
"effectedImage": null,
"effectedImageWidth": 0,
"effectedImageHeight": 0,
"effectedImageOffsetLeft": 0,
"effectedImageOffsetTop": 0,
"imageEffects": [
],
"imageEffectsHash": "",
"aggregatedColors": [
],
"mainColor": null,
"effectScale": 1,
"animationEffects": [
],
"version": "5.7.0",
"clip": {
"bottom": 0,
"right": 0,
"left": 0,
"top": 0
}
},
{
"type": "text",
"category": "",
"opacity": 1,
"padding": [
0,
0,
0,
0
],
"width": 56,
"height": 199,
"left": 604.9874413689339,
"top": 122,
"transform": {
"a": 1,
"b": 0,
"c": 0,
"d": 1,
"tx": 0,
"ty": 0
},
"boxShadow": null,
"resize": 5,
"dragable": true,
"rotatable": true,
"editable": true,
"frozen": false,
"hidden": false,
"lock": false,
"borderRadius": 0,
"filter": {
"hueRotate": 0,
"saturate": 0,
"brightness": 0,
"gaussianBlur": 0
},
"color": "#4b7effff",
"backgroundColor": null,
"fontFamily": "Reeji-CloudYuanZhun-GB-Regular",
"fontStyle": "normal",
"fontWeight": 400,
"fontSize": 56,
"lineHeight": 1,
"letterSpacing": 0,
"textDecoration": "none",
"writingMode": "vertical-rl",
"textAlign": "left",
"verticalAlign": "top",
"contents": null,
"effectScale": 1,
"textShadow": null,
"autoScale": true,
"textEffects": [
],
"aggregatedColors": [
"rgb(75, 126, 255)"
],
"mainColor": null,
"animationEffects": [
],
"content": "夏上新",
"version": "5.7.0"
},
{
"type": "text",
"category": "",
"opacity": 1,
"padding": [
0,
0,
0,
0
],
"width": 47,
"height": 164,
"left": 554.9874413689339,
"top": 70,
"transform": {
"a": 1,
"b": 0,
"c": 0,
"d": 1,
"tx": 0,
"ty": 0
},
"boxShadow": null,
"resize": 5,
"dragable": true,
"rotatable": true,
"editable": true,
"frozen": false,
"hidden": false,
"lock": false,
"borderRadius": 0,
"filter": {
"hueRotate": 0,
"saturate": 0,
"brightness": 0,
"gaussianBlur": 0
},
"color": "#5595f3ff",
"backgroundColor": null,
"fontFamily": "Reeji-CloudYuanZhun-GB-Regular",
"fontStyle": "normal",
"fontWeight": 400,
"fontSize": 47,
"lineHeight": 1,
"letterSpacing": 0,
"textDecoration": "none",
"writingMode": "vertical-rl",
"textAlign": "left",
"verticalAlign": "top",
"contents": null,
"effectScale": 1,
"textShadow": null,
"autoScale": true,
"textEffects": [
],
"aggregatedColors": [
"rgb(85, 149, 243)"
],
"mainColor": null,
"animationEffects": [
],
"content": "换新衣",
"version": "5.7.0"
},
{
"type": "text",
"category": "",
"opacity": 1,
"padding": [
0,
0,
0,
0
],
"width": 160,
"height": 26,
"left": 174,
"top": 241.45,
"transform": {
"a": 1,
"b": 0,
"c": 0,
"d": 1,
"tx": 0,
"ty": 0
},
"boxShadow": null,
"resize": 5,
"dragable": true,
"rotatable": true,
"editable": true,
"frozen": false,
"hidden": false,
"lock": false,
"borderRadius": 0,
"filter": {
"hueRotate": 0,
"saturate": 0,
"brightness": 0,
"gaussianBlur": 0
},
"color": "#ffffffff",
"backgroundColor": null,
"fontFamily": "Reeji-CloudYuanZhun-GB-Regular",
"fontStyle": "normal",
"fontWeight": 400,
"fontSize": 22,
"lineHeight": 1.2,
"letterSpacing": 0,
"textDecoration": "none",
"writingMode": "horizontal-tb",
"textAlign": "left",
"verticalAlign": "top",
"contents": null,
"effectScale": 1,
"textShadow": null,
"autoScale": true,
"textEffects": [
],
"aggregatedColors": [
"rgb(255, 255, 255)"
],
"mainColor": null,
"animationEffects": [
],
"content": "这个夏天不怕晒",
"version": "5.7.0"
},
{
"type": "text",
"category": "",
"opacity": 1,
"padding": [
0,
0,
0,
0
],
"width": 229,
"height": 26,
"left": 174,
"top": 292.45,
"transform": {
"a": 1,
"b": 0,
"c": 0,
"d": 1,
"tx": 0,
"ty": 0
},
"boxShadow": null,
"resize": 5,
"dragable": true,
"rotatable": true,
"editable": true,
"frozen": false,
"hidden": false,
"lock": false,
"borderRadius": 0,
"filter": {
"hueRotate": 0,
"saturate": 0,
"brightness": 0,
"gaussianBlur": 0
},
"color": "#ffffffff",
"backgroundColor": null,
"fontFamily": "Reeji-CloudYuanZhun-GB-Regular",
"fontStyle": "normal",
"fontWeight": 400,
"fontSize": 22,
"lineHeight": 1.2,
"letterSpacing": 0,
"textDecoration": "none",
"writingMode": "horizontal-tb",
"textAlign": "left",
"verticalAlign": "top",
"contents": null,
"effectScale": 1,
"textShadow": null,
"autoScale": true,
"textEffects": [
],
"aggregatedColors": [
"rgb(255, 255, 255)"
],
"mainColor": null,
"animationEffects": [
],
"content": "全场满200-50 300-30",
"version": "5.7.0"
},
{
"type": "text",
"category": "",
"opacity": 1,
"padding": [
0,
0,
0,
0
],
"width": 78,
"height": 70,
"left": 36,
"top": 258,
"transform": {
"a": 1,
"b": 0,
"c": 0,
"d": 1,
"tx": 0,
"ty": 0
},
"boxShadow": null,
"resize": 5,
"dragable": true,
"rotatable": true,
"editable": true,
"frozen": false,
"hidden": false,
"lock": false,
"borderRadius": 0,
"filter": {
"hueRotate": 0,
"saturate": 0,
"brightness": 0,
"gaussianBlur": 0
},
"color": "#4b7effff",
"backgroundColor": null,
"fontFamily": "Reeji-CloudYuanCu-GB-Regular",
"fontStyle": "normal",
"fontWeight": 400,
"fontSize": 14,
"lineHeight": 1.03,
"letterSpacing": 1.4000000000000001,
"textDecoration": "none",
"writingMode": "horizontal-tb",
"textAlign": "left",
"verticalAlign": "top",
"contents": null,
"effectScale": 1,
"textShadow": null,
"autoScale": true,
"textEffects": [
],
"aggregatedColors": [
"rgb(75, 126, 255)"
],
"mainColor": null,
"animationEffects": [
],
"content": "FULL~<br>MINUS<br><br>-<br>SUMMER",
"version": "5.7.0",
"ruleIndex": -1
},
{
"type": "text",
"category": "",
"opacity": 1,
"padding": [
0,
0,
0,
0
],
"width": 197,
"height": 18,
"left": 516.3168862342834,
"top": 36.625,
"transform": {
"a": 1,
"b": 0,
"c": 0,
"d": 1,
"tx": 0,
"ty": 0
},
"boxShadow": null,
"resize": 5,
"dragable": true,
"rotatable": true,
"editable": true,
"frozen": false,
"hidden": false,
"lock": false,
"borderRadius": 0,
"filter": {
"hueRotate": 0,
"saturate": 0,
"brightness": 0,
"gaussianBlur": 0
},
"color": "#4b7effff",
"backgroundColor": null,
"fontFamily": "Reeji-CloudYuanZhun-GB-Regular",
"fontStyle": "normal",
"fontWeight": 400,
"fontSize": 15,
"lineHeight": 1.2,
"letterSpacing": 13.2,
"textDecoration": "none",
"writingMode": "horizontal-tb",
"textAlign": "right",
"verticalAlign": "top",
"contents": null,
"effectScale": 1,
"textShadow": null,
"autoScale": true,
"textEffects": [
],
"aggregatedColors": [
"rgb(75, 126, 255)"
],
"mainColor": null,
"animationEffects": [
],
"content": "NEW.2019",
"version": "5.7.0"
},
{
"type": "image",
"category": "",
"opacity": 1,
"padding": [
0,
0,
0,
0
],
"width": 12,
"height": 1,
"left": 723,
"top": 42,
"transform": {
"a": 1,
"b": 0,
"c": 0,
"d": 1,
"tx": 0,
"ty": 0
},
"boxShadow": {
"color": null
},
"resize": 7,
"dragable": true,
"rotatable": true,
"editable": true,
"frozen": false,
"hidden": false,
"lock": false,
"borderRadius": 0,
"filter": {
"hueRotate": 0,
"saturate": 0,
"brightness": 0,
"gaussianBlur": 0
},
"url": "https://st-gdx.dancf.com/gaodingx/307/design/20190616-195015-73d7.jpg",
"originWidth": 12,
"originHeight": 1,
"effectedImage": null,
"effectedImageWidth": 0,
"effectedImageHeight": 0,
"effectedImageOffsetLeft": 0,
"effectedImageOffsetTop": 0,
"imageEffects": [
],
"imageEffectsHash": "",
"aggregatedColors": [
],
"mainColor": null,
"effectScale": 1,
"animationEffects": [
],
"version": "5.7.0",
"clip": {
"bottom": 0,
"right": 0,
"left": 0,
"top": 0
}
}
],
"top": 0
}
]
}