?? animatemotion.java
字號:
package com.mc.svg.shape.basicshape;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import com.mc.svg.SVGCanvas;
import com.mc.svg.shape.AbstractShape;
public class AnimateMotion extends AbstractShape {
private Element s = null;
public AnimateMotion(Document doc) {
this.doc = doc;
root = doc.createElementNS(SVGCanvas.svgNS, "animateMotion");
s = doc.createElementNS(SVGCanvas.svgNS, "mpath");
root.appendChild(s);
}
public void setXlinkHref(String id) {
s.setAttribute("xlink:href", "#" + id);
}
public void setDur(int dur) {
root.setAttribute("dur", dur + "s");
}
public void setBeginTime(int time){
root.setAttribute("begin", time + "s");
}
public void setRepeatDur(String repeat) {
root.setAttribute("repeatDur", repeat);
}
public void setRepeatCount(String repeat) {
root.setAttribute("repeatCount", repeat);
}
public void setRotate(String rotate) {
root.setAttribute("rotate", rotate);
}
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -