2012-11-05 22:03:42 -05:00
|
|
|
/*
|
2013-01-28 21:03:27 -05:00
|
|
|
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
2012-11-05 22:03:42 -05:00
|
|
|
* http://paperjs.org/
|
|
|
|
*
|
2013-01-28 21:03:27 -05:00
|
|
|
* Copyright (c) 2011 - 2013, Juerg Lehni & Jonathan Puckey
|
2012-11-05 22:03:42 -05:00
|
|
|
* http://lehni.org/ & http://jonathanpuckey.com/
|
|
|
|
*
|
|
|
|
* Distributed under the MIT license. See LICENSE file for details.
|
|
|
|
*
|
|
|
|
* All rights reserved.
|
|
|
|
*/
|
|
|
|
|
2012-11-05 21:58:16 -05:00
|
|
|
var SvgStyles = Base.each({
|
2012-11-05 22:26:54 -05:00
|
|
|
fillColor: ['fill', 'color'],
|
|
|
|
strokeColor: ['stroke', 'color'],
|
|
|
|
strokeWidth: ['stroke-width', 'number'],
|
|
|
|
strokeCap: ['stroke-linecap', 'string'],
|
|
|
|
strokeJoin: ['stroke-linejoin', 'string'],
|
|
|
|
miterLimit: ['stroke-miterlimit', 'number'],
|
|
|
|
dashArray: ['stroke-dasharray', 'array'],
|
|
|
|
dashOffset: ['stroke-dashoffset', 'number']
|
|
|
|
}, function(entry, key) {
|
|
|
|
var part = Base.capitalize(key);
|
|
|
|
this.attributes[entry[0]] = this.properties[key] = {
|
|
|
|
type: entry[1],
|
|
|
|
property: key,
|
|
|
|
attribute: entry[0],
|
2012-11-05 22:03:42 -05:00
|
|
|
get: 'get' + part,
|
|
|
|
set: 'set' + part
|
2012-11-05 21:58:16 -05:00
|
|
|
};
|
|
|
|
}, {
|
|
|
|
properties: {},
|
|
|
|
attributes: {}
|
|
|
|
});
|