graph的属性
var textNode = graph.createText("Text and
Rotatable", -240, 110);
var hello = graph.createNode("Hello", -100, -50);
node 的属性
//图片支持png,svg,gif .image = Q.Graphs.server; //内置服务器图片 .image = "./images/SVG_logo.svg"; .size = {width: 203,height: 70}; .rotate = Math.PI / 6;//设置旋转角度 .setStyle(Q.Styles.ALPHA, 0.5);//设置透明度 .setStyle(Q.Styles.IMAGE_ADJUST, Q.Consts.IMAGE_ADJUST_MIRROR);//设置镜像
Q.Styles
textNode.setStyle(Q.Styles.LABEL_FONT_SIZE, 20);
textNode.setStyle(Q.Styles.LABEL_FONT_STYLE, "italic lighter");
textNode.setStyle(Q.Styles.BORDER, 1);
textNode.setStyle(Q.Styles.BORDER_COLOR, "#DDD");
textNode.setStyle(Q.Styles.PADDING, 5);
nodeWithScale.setStyle(Q.Styles.RENDER_COLOR, "#E21667");//渲染颜色
//阴影
nodeWithScale.setStyle(Q.Styles.SHADOW_COLOR, "#888");
nodeWithScale.setStyle(Q.Styles.SHADOW_OFFSET_X, 5);
nodeWithScale.setStyle(Q.Styles.SHADOW_OFFSET_Y, 5);
nodeWithScale.setStyle(Q.Styles.SHADOW_BLUR, 5);