2011-05-07 08:39:17 -04:00
|
|
|
/*
|
2013-01-28 21:03:27 -05:00
|
|
|
* Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
2011-05-07 08:39:17 -04:00
|
|
|
* http://paperjs.org/
|
2011-06-30 06:01:51 -04:00
|
|
|
*
|
2013-01-28 21:03:27 -05:00
|
|
|
* Copyright (c) 2011 - 2013, Juerg Lehni & Jonathan Puckey
|
2011-05-07 08:39:17 -04:00
|
|
|
* http://lehni.org/ & http://jonathanpuckey.com/
|
2011-06-30 06:01:51 -04:00
|
|
|
*
|
2011-07-01 06:17:45 -04:00
|
|
|
* Distributed under the MIT license. See LICENSE file for details.
|
|
|
|
*
|
2011-05-07 08:39:17 -04:00
|
|
|
* All rights reserved.
|
|
|
|
*/
|
|
|
|
|
2011-06-19 17:21:14 -04:00
|
|
|
var ChangeFlag = {
|
2011-06-19 17:20:28 -04:00
|
|
|
// Anything affecting the appearance of an item, including GEOMETRY,
|
|
|
|
// STROKE, STYLE and ATTRIBUTE (except for the invisible ones: locked, name)
|
|
|
|
APPEARANCE: 1,
|
|
|
|
// Change in item hierarchy
|
|
|
|
HIERARCHY: 2,
|
|
|
|
// Item geometry (path, bounds)
|
|
|
|
GEOMETRY: 4,
|
|
|
|
// Stroke geometry (excluding color)
|
|
|
|
STROKE: 8,
|
|
|
|
// Fill style or stroke color / dash
|
|
|
|
STYLE: 16,
|
|
|
|
// Item attributes: visible, blendMode, locked, name, opacity, clipMask ...
|
2011-06-19 17:36:04 -04:00
|
|
|
ATTRIBUTE: 32,
|
2011-06-19 18:28:41 -04:00
|
|
|
// Text content
|
|
|
|
CONTENT: 64,
|
2011-06-20 15:13:24 -04:00
|
|
|
// Raster pixels
|
|
|
|
PIXELS: 128,
|
2011-06-19 17:36:04 -04:00
|
|
|
// Clipping in one of the child items
|
2011-06-20 15:13:24 -04:00
|
|
|
CLIPPING: 256
|
2011-06-19 17:20:28 -04:00
|
|
|
};
|
|
|
|
|
2011-06-19 17:36:04 -04:00
|
|
|
// Shortcuts to often used ChangeFlag values including APPEARANCE
|
2011-06-19 17:20:28 -04:00
|
|
|
var Change = {
|
2013-06-13 11:47:45 -04:00
|
|
|
// HIERARCHY also changes GEOMETRY, since removing children from groups
|
|
|
|
// change bounds
|
|
|
|
HIERARCHY: ChangeFlag.HIERARCHY | ChangeFlag.GEOMETRY
|
|
|
|
| ChangeFlag.APPEARANCE,
|
2011-06-19 17:21:14 -04:00
|
|
|
GEOMETRY: ChangeFlag.GEOMETRY | ChangeFlag.APPEARANCE,
|
2011-06-20 10:21:42 -04:00
|
|
|
STROKE: ChangeFlag.STROKE | ChangeFlag.STYLE | ChangeFlag.APPEARANCE,
|
2011-06-19 17:21:14 -04:00
|
|
|
STYLE: ChangeFlag.STYLE | ChangeFlag.APPEARANCE,
|
2011-06-19 18:28:41 -04:00
|
|
|
ATTRIBUTE: ChangeFlag.ATTRIBUTE | ChangeFlag.APPEARANCE,
|
2013-02-21 03:09:40 -05:00
|
|
|
CONTENT: ChangeFlag.CONTENT | ChangeFlag.GEOMETRY | ChangeFlag.APPEARANCE,
|
2011-06-20 15:13:24 -04:00
|
|
|
PIXELS: ChangeFlag.PIXELS | ChangeFlag.APPEARANCE
|
2011-05-07 11:52:54 -04:00
|
|
|
};
|