flymis/WebRoot/dojojs/src/gfx/shape.js
(开头部分) 6KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
/*
Copyright (c) 2004-2006, The Dojo Foundation
All Rights Reserved.
Licensed under the Academic Free License version 2.1 or above OR the
modified BSD license. For more information on Dojo licensing, see:
http://dojotoolkit.org/community/licensing.shtml
*/
dojo.provide("dojo.gfx.shape");
dojo.require("dojo.lang.declare");
dojo.require("dojo.gfx.common");
// this is a Shape object, which knows how to apply graphical attributes and a transformation
dojo.declare("dojo.gfx.Shape", null, {
initializer: function(){
// underlying node
this.rawNode = null;
// abstract shape object
this.shape = null;
// transformation matrix
this.matrix = null;
// graphical attributes
this.fillStyle = null;
this.strokeStyle = null;
// virtual group structure
this.parent = null;
this.parentMatrix = null;
// bounding box
this.bbox = null;
},
// trivial getters
getNode: function(){ return this.rawNode; },
getShape: function(){ return this.shape; },
getTransform: function(){ return this.matrix; },
getFill: function(){ return this.fillStyle; },
getStroke: function(){ return this.strokeStyle; },
getParent: function(){ return this.parent; },
getBoundingBox: function(){ return this.bbox; },
getEventSource: function(){ return this.rawNode; },
// empty settings
setShape: function(shape) { return this; }, // ignore
setStroke: function(stroke){ return this; }, // ignore
setFill: function(fill) { return this; }, // ignore
// z-index
moveToFront: function(){ return this; }, // ignore
moveToBack: function(){ return this; }, // ignore
// apply transformations
setTransform: function(matrix){
this.matrix = dojo.gfx.matrix.clone(matrix ? dojo.gfx.matrix.normalize(matrix) : dojo.gfx.identity, true);
return this._applyTransform();
},
后面还有 178 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。