mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-03 19:45:44 -05:00
Merge remote-tracking branch 'origin/develop' into boolean-fix
; Conflicts: ; src/path/PathItem.Boolean.js
This commit is contained in:
commit
fa9eb8be99
3 changed files with 6 additions and 27 deletions
|
@ -186,14 +186,14 @@ var PaperScope = Base.extend(/** @lends PaperScope# */{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Injects the paper scope into any other given scope. Can be used for
|
* Injects the paper scope into any other given scope. Can be used for
|
||||||
* examle to inject the currently active PaperScope into the window's global
|
* example to inject the currently active PaperScope into the window's
|
||||||
* scope, to emulate PaperScript-style globally accessible Paper classes and
|
* global scope, to emulate PaperScript-style globally accessible Paper
|
||||||
* objects.
|
* classes and objects.
|
||||||
*
|
*
|
||||||
* <b>Please note:</b> Using this method may override native constructors
|
* <b>Please note:</b> Using this method may override native constructors
|
||||||
* (e.g. Path, RGBColor). This may cause problems when using Paper.js in
|
* (e.g. Path). This may cause problems when using Paper.js in conjunction
|
||||||
* conjunction with other libraries that rely on these constructors. Keep
|
* with other libraries that rely on these constructors. Keep the library
|
||||||
* the library scoped if you encounter issues caused by this.
|
* scoped if you encounter issues caused by this.
|
||||||
*
|
*
|
||||||
* @example
|
* @example
|
||||||
* paper.install(window);
|
* paper.install(window);
|
||||||
|
|
|
@ -25,7 +25,6 @@
|
||||||
*
|
*
|
||||||
* Not supported yet
|
* Not supported yet
|
||||||
* - Boolean operations on self-intersecting Paths
|
* - Boolean operations on self-intersecting Paths
|
||||||
* - Paths are clones of each other that overlap exactly on top of each other!
|
|
||||||
*
|
*
|
||||||
* @author Harikrishnan Gopalakrishnan
|
* @author Harikrishnan Gopalakrishnan
|
||||||
* http://hkrish.com/playground/paperjs/booleanStudy.html
|
* http://hkrish.com/playground/paperjs/booleanStudy.html
|
||||||
|
|
|
@ -1283,23 +1283,3 @@ var Color = Base.extend(new function() {
|
||||||
*/
|
*/
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
// Expose Color.RGB, etc. constructors, as well as RgbColor, RGBColor, etc.for
|
|
||||||
// backward compatibility.
|
|
||||||
Base.each(Color._types, function(properties, type) {
|
|
||||||
var ctor = this[Base.capitalize(type) + 'Color'] = function(arg) {
|
|
||||||
var argType = arg != null && typeof arg,
|
|
||||||
components = argType === 'object' && arg.length != null
|
|
||||||
? arg
|
|
||||||
: argType === 'string'
|
|
||||||
? null
|
|
||||||
: arguments;
|
|
||||||
return components
|
|
||||||
? new Color(type, components)
|
|
||||||
: new Color(arg);
|
|
||||||
};
|
|
||||||
if (type.length == 3) {
|
|
||||||
var acronym = type.toUpperCase();
|
|
||||||
Color[acronym] = this[acronym + 'Color'] = ctor;
|
|
||||||
}
|
|
||||||
}, Base.exports);
|
|
||||||
|
|
Loading…
Reference in a new issue