Jürg Lehni
7c5478cd93
Define first solution for correctly handling Rectangle(object) constructors.
...
Work in progress.
2013-06-12 14:57:47 -07:00
Jürg Lehni
b581f8b33e
Implement Style#selectedColor and Item#selectedColor as a way to control appearance of selections.
...
Closes #219 .
2013-06-12 14:17:34 -07:00
Jürg Lehni
9977ec5c28
Rename #toCss() to #toCSS()
2013-06-12 14:04:59 -07:00
Jürg Lehni
8c596927fb
Store _removeSets per project, not globally.
2013-06-12 13:50:05 -07:00
Jürg Lehni
f59882b757
Handle Tool._removeSets also when there is no corresponding event handler installed.
...
Closes #204 .
2013-06-12 13:46:14 -07:00
Jürg Lehni
f8c36b8276
Adopt Function#name regular expression to accommodate different scenarios of white-spaces.
2013-06-12 08:49:15 -07:00
Jürg Lehni
7a2f577b75
Implement Path#contains() correctly for open paths.
2013-06-12 00:35:34 -07:00
Jürg Lehni
f45a66d2ee
Filter out curves with zero length in Path#contains() algorithm.
...
Fixes #227
2013-06-12 00:19:54 -07:00
Jürg Lehni
3d99b5e931
Fix ADM support to avoid error messages.
2013-06-12 00:07:56 -07:00
Jürg Lehni
b99d54f8c3
Add support for AMD (e.g. require.js)
...
Fixes #223 .
2013-06-11 23:50:59 -07:00
Jürg Lehni
94e07e77f0
Redraw clipItem when drawing into separate canvas for blend-modes.
...
Closes #228 .
2013-06-11 20:41:20 -07:00
Jürg Lehni
20f7c567aa
Use Base objects for drawing params, so we can use param.extend() on them for easier overriding.
2013-06-11 20:40:44 -07:00
Jürg Lehni
a7750c3e67
Support null arguments in Point#equals().
2013-06-11 20:14:45 -07:00
Jürg Lehni
ce7d584c05
Revert readNull and clone parameter sequence in arguments reading code.
2013-06-11 19:49:35 -07:00
Jürg Lehni
2e565dcfce
Fix Function#name on browsers that don't support it.
...
Closes #236 .
2013-06-11 19:07:25 -07:00
Jürg Lehni
18383875eb
Fix global variable leakage.
2013-06-11 17:46:50 -07:00
Jürg Lehni
375156059d
Do not use pathData in JSON for CompoundPaths.
2013-06-11 15:27:04 -07:00
Jürg Lehni
03a7503789
Fix issue in getPathData() with closed CompoundPaths.
2013-06-11 15:26:44 -07:00
Jürg Lehni
f2bb5d07df
Let's not go too far with optimizations.
2013-06-11 15:10:02 -07:00
Jürg Lehni
875a766d19
Implement clipPath support in SVGExporter.
2013-06-11 14:50:13 -07:00
Jürg Lehni
35f17979df
Improve Node.js XMLSerializer workaround for lowercased tagNames.
2013-06-11 14:39:34 -07:00
Jürg Lehni
d41f79598e
Change exportDefinitions() to create an actual <defs> container for definitions.
2013-06-11 14:26:04 -07:00
Jürg Lehni
470cfae9f1
Clean up export code.
2013-06-11 14:15:54 -07:00
Jürg Lehni
a1cab3592b
No need to explicitly set fill to 'none' anymore since comparing style with parent handles this for us automatically now.
2013-06-11 14:15:43 -07:00
Jürg Lehni
72082bdcff
Fix new failing test.
2013-06-11 13:57:28 -07:00
Jürg Lehni
b4ff0d347e
Optimize SVG import for clipped groups.
2013-06-11 12:57:03 -07:00
Jürg Lehni
7faf2a9e70
Clean-up @hkrish's changes a bit.
2013-06-09 18:37:08 -07:00
hkrish
d8498b6418
Remove invalid code and unnecessary comments
2013-06-09 22:02:50 +05:30
hkrish
8758b232f4
Merge branch 'master' into fatline
...
* master:
Fix regression in importing SVG viewBox.
Minor code clean ups.
Properly fix exporting of classes into Base.exports.
Switch to HTML5 meta charset tags.
Fix issues with uglifyjs.
Include stats.js in distribution so all examples can work.
2013-06-09 18:08:31 +05:30
hkrish
ca2bfb8cab
Merge branch 'master' of https://github.com/paperjs/paper.js
...
* 'master' of https://github.com/paperjs/paper.js :
Fix regression in importing SVG viewBox.
2013-06-09 18:03:19 +05:30
Jürg Lehni
48651d5fb1
Fix regression in importing SVG viewBox.
2013-06-08 13:44:50 -07:00
hkrish
d6ed9890b8
Merge branch 'master' of https://github.com/paperjs/paper.js
...
* 'master' of https://github.com/paperjs/paper.js :
Minor code clean ups.
Properly fix exporting of classes into Base.exports.
Switch to HTML5 meta charset tags.
Fix issues with uglifyjs.
Include stats.js in distribution so all examples can work.
2013-06-08 23:26:45 +05:30
hkrish
d3405115c1
Use parameter on both curves in CurveLocation objects instead of Point in #getIntersection()
2013-06-08 21:37:43 +05:30
Jürg Lehni
75eddbcdba
Minor code clean ups.
2013-06-02 16:18:40 -07:00
Jürg Lehni
b896a98b1e
Properly fix exporting of classes into Base.exports.
2013-06-02 16:17:54 -07:00
hkrish
1e86aa4e97
Merge branch 'master' of https://github.com/paperjs/paper.js
...
* 'master' of https://github.com/paperjs/paper.js :
Explicitly use bash to avoid build problems on linux.
Bump version number to 0.9.2
Fix exporting of Base, Numerical and PaperScript into PaperScope.
2013-05-31 17:21:46 +02:00
Jürg Lehni
a81fdc2758
Fix exporting of Base, Numerical and PaperScript into PaperScope.
2013-05-30 14:37:04 -07:00
hkrish
8d1e5ea144
Merge branch 'master' of https://github.com/paperjs/paper.js
...
* 'master' of https://github.com/paperjs/paper.js :
Bump version number to 0.9.1
Fix issue with local paper variable shielding global one.
Reset transformation matrix when blitting off-screen canvas.
2013-05-30 23:21:05 +02:00
Jürg Lehni
178b09caa7
Fix issue with local paper variable shielding global one.
...
We need a cleaner fix for this on the long run.
2013-05-30 11:26:47 -07:00
Jürg Lehni
d76d573eb2
Reset transformation matrix when blitting off-screen canvas.
...
Closes #233 .
2013-05-29 13:52:47 -07:00
hkrish
cdaab794f2
Merge branch 'master' of https://github.com/paperjs/paper.js
...
* 'master' of https://github.com/paperjs/paper.js : (56 commits)
Fix regressions in Raster caused by faulty merge.
Store data in _data rather than on the image itself.
Clean up @trankek's fix for node a bit.
Explain compact = true in Project#_serialize()
Properly fix issue with Project#exportJSON() creating separate projects on import.
Update straps.js to version 1.1.0
Rename options.server to options.node
Remove all create() constructors for basic types since new constructors are now faster.
Make sure project we import into is active.
Unbox project data in Project#importJSON(), as we don't want to create a new project object.
Remove need for _needsRedraw() calls by replacing it with a boolean flag.
Apply "pending" matrix in group when it receives content.
Move main Item insertion code from #insertChild() to #insertChildren().
Fix documentation warning.
Handle exporting of Numerical and PaperScript in export.js
Update straps.js to latest version.
Accessors cannot define the writable property.
Properly export Numerical and PaperScript again.
Only reset matrices in Groups when it could actually be applied to the content.
Set options.stats = false for build.sh and Node.js
...
2013-05-29 19:09:07 +02:00
Jürg Lehni
0e2ae48b02
Fix regressions in Raster caused by faulty merge.
2013-05-28 13:54:47 -07:00
Jürg Lehni
73351cbda7
Store data in _data rather than on the image itself.
2013-05-28 08:10:51 -07:00
Jürg Lehni
a952e6f5ad
Merge branch 'master' of github.com:paperjs/paper.js
2013-05-28 08:07:26 -07:00
Jürg Lehni
277f7aabae
Merge branch 'refs/heads/tranek-master'
2013-05-28 08:06:06 -07:00
Jürg Lehni
c75a98c406
Clean up @trankek's fix for node a bit.
...
Fix prepro.js conditionals.
2013-05-28 08:05:40 -07:00
Jürg Lehni
e0856a0d31
Merge branch 'master' of https://github.com/tranek/paper.js into tranek-master
...
Conflicts:
src/item/Raster.js
2013-05-28 08:00:01 -07:00
Jürg Lehni
f0f7a7f35c
Explain compact = true in Project#_serialize()
2013-05-28 07:57:35 -07:00
Jürg Lehni
dd38e4aae6
Merge pull request #231 from NorthNick/master
...
Path.arcBy bug fix
2013-05-28 07:53:58 -07:00
Jürg Lehni
0b4bc678bc
Properly fix issue with Project#exportJSON() creating separate projects on import.
2013-05-28 07:42:38 -07:00
Jürg Lehni
6fa6c022c9
Rename options.server to options.node
2013-05-28 00:01:55 -07:00
Jürg Lehni
cd7db56249
Remove all create() constructors for basic types since new constructors are now faster.
...
Woop!
2013-05-27 23:57:31 -07:00
Jürg Lehni
0f74c01f75
Make sure project we import into is active.
2013-05-27 23:48:16 -07:00
Jürg Lehni
85920bbdb8
Unbox project data in Project#importJSON(), as we don't want to create a new project object.
2013-05-27 23:43:24 -07:00
Jürg Lehni
4e6f52c20c
Remove need for _needsRedraw() calls by replacing it with a boolean flag.
2013-05-27 23:40:23 -07:00
Jürg Lehni
fd3f698fe9
Apply "pending" matrix in group when it receives content.
2013-05-27 23:13:20 -07:00
Jürg Lehni
9b0d32651f
Move main Item insertion code from #insertChild() to #insertChildren().
...
Handles insertion and change notification much more efficiently.
2013-05-27 20:06:30 -07:00
Jürg Lehni
73388d6f9c
Fix documentation warning.
2013-05-27 18:30:57 -07:00
Jürg Lehni
961451b271
Handle exporting of Numerical and PaperScript in export.js
...
Allowing build.sh to work again.
2013-05-27 18:28:35 -07:00
Jürg Lehni
70d6050900
Accessors cannot define the writable property.
2013-05-27 18:12:25 -07:00
Jürg Lehni
5592bb57e0
Properly export Numerical and PaperScript again.
2013-05-27 15:55:44 -07:00
Jürg Lehni
e516e6f651
Only reset matrices in Groups when it could actually be applied to the content.
...
That way, empty groups in SVGImport still keep their transformation state.
2013-05-27 15:42:16 -07:00
Jürg Lehni
b92be7ecf3
Set options.stats = false for build.sh and Node.js
2013-05-27 15:33:28 -07:00
Jürg Lehni
d577b1bf48
Share one options.js file describing Paper.js options for Node.js, build.sh and the dev version.
2013-05-27 15:11:32 -07:00
Jürg Lehni
6ac5463630
Switch to using common string format for paper.version (major.minor.build)
2013-05-27 14:27:05 -07:00
Jürg Lehni
fef22f25e8
Remove node.js specific version of Base.isPlainObject(), since straps.js can handle it now.
2013-05-27 14:10:38 -07:00
Jürg Lehni
10d5de3ed6
Implement a better way to name and export class constructors.
...
This change also simplified the way classes are exported to PaperScope objects.
2013-05-27 12:48:58 -07:00
Jürg Lehni
15b1ea7af0
Solve issue with SVG gradients on Firefox.
2013-05-27 10:12:23 -07:00
Jürg Lehni
c533dda7b5
Finally found a better and faster alternative for this.base() calls, by setting base on the function object instead.
...
base can be accessed on named functions very easily, leading to another measurable speed increase. Finally all performance reasons against straps.js are eliminated!
2013-05-27 10:04:05 -07:00
Jürg Lehni
369b329b23
Change straps.js to directly use initialize() as constructor function rather than redirecting calls to it.
...
Should yield some interesting performance improvements.
2013-05-27 09:11:50 -07:00
Jürg Lehni
094e35f2e5
No need for separate injection object for Item.extend()
2013-05-27 08:16:34 -07:00
Jürg Lehni
f9267e7f5c
Some more code clean up and variable renaming.
2013-05-26 17:59:01 -07:00
Jürg Lehni
14962b5c45
Clean up code a bit more.
2013-05-26 17:52:05 -07:00
Jürg Lehni
32709a176b
Fix some comments.
2013-05-26 17:48:36 -07:00
Jürg Lehni
7050edd6e4
Fix point sequence.
2013-05-26 17:40:40 -07:00
Jürg Lehni
90f0679700
Further simplify getConvexHull() by using p0 … p3 point objects.
2013-05-26 17:39:13 -07:00
Jürg Lehni
487c4c4aef
Further simplify getConvexHull() by inlining cross product calculations.
2013-05-26 17:32:44 -07:00
Jürg Lehni
9edab9c3aa
Simplify convex hull algorithm by returning lists of points rather than lines.
...
We can avoid some data redundancy that way at no performance cost.
2013-05-26 17:18:54 -07:00
Jürg Lehni
9540b7f6a9
Use addLineIntersection() in subdivision algorithm as well.
2013-05-26 17:10:29 -07:00
Jürg Lehni
20737c6664
Rename various intersection methods.
2013-05-26 17:06:23 -07:00
Jürg Lehni
da8898abd2
Fix newly introduced bug in Line.getSide() through variable renaming.
2013-05-26 17:05:10 -07:00
Jürg Lehni
5d7cc2fb40
Use new Line.getSignedDistance().
2013-05-26 16:58:49 -07:00
Jürg Lehni
f771233d37
Speed up Line class by removing internal dependance on Point.
2013-05-26 16:58:34 -07:00
Jürg Lehni
80f9f6061c
Change the way the Line class handles direction vectors and infinite lines.
...
The beginning of performance improvements in the Line class.
2013-05-26 15:44:52 -07:00
NickNorth
3e520efe5f
arcBy recursively calls itself rather than arcTo.
2013-05-26 20:09:26 +01:00
Jürg Lehni
1fb0a3a13c
Always provide t parameter for CurveLocations if we know it.
2013-05-25 11:23:59 -07:00
hkrish
46a324722a
Merge branch 'master' of https://github.com/paperjs/paper.js
...
* 'master' of https://github.com/paperjs/paper.js : (90 commits)
Start merging fat-line clipping code into Curve class.
Fix white-spaces.
Merge handling of flat curves.
More getConvexHull() clean up.
Remove unused variable dqmin.
Further clean up clipFatLine()
Some clean up in clipFatLine()
Merge the two convergence checks to one.
Simplify convergence checks.
Rename p\d to part\d
Rename v\dt to range\d
Simplify handling of ranges and curve parts.
Switch to using arrays rather than objects for parameter ranges.
Reverse logic of v1t / _v1t naming and switch to using Numerical constants.
Re-implement Curve.getLocation2() as "hub" for all the different intersection methods.
Use break; instead of return; and untangle unnecessarily nested conditionals.
Define private addLocation() to reduce code redundancy.
Correctly handle calculation of CurveLocation point in getCurveIntersections().
Move Curve.getIntersection2 to private function and better name other private functions.
Always use parameter in getCurveLineIntersection() by flipping curve1 / 2 values as well.
...
2013-05-25 11:37:33 +02:00
Jürg Lehni
502c76dbce
Start merging fat-line clipping code into Curve class.
...
And add a prepro option for now.
2013-05-24 22:30:13 -07:00
Jürg Lehni
7f00ef8f05
Fix white-spaces.
2013-05-24 22:25:22 -07:00
Jürg Lehni
7e5f846190
Remove debugging code.
2013-05-24 17:57:13 -07:00
tranek
1637127e09
Fixed data URLs src disappearing
2013-05-24 20:55:59 -04:00
Jürg Lehni
bd3ac02bbe
Use Curve instead of this.
...
Compresses better and allows passing on function as callback.
2013-05-24 17:52:05 -07:00
Jürg Lehni
e359dd038c
Add explaining comment.
2013-05-24 17:14:39 -07:00
tranek
cd7938e363
Fixed string equals in Raster data URL for Node.js
2013-05-24 16:41:02 -04:00
tranek
269b93e888
Added data URLs for Rasters in Node.js
2013-05-24 16:38:43 -04:00
hkrish
cfbe6d8312
Merge branch 'master' of https://github.com/paperjs/paper.js
...
* 'master' of https://github.com/paperjs/paper.js :
Remove Item#applyMatrix boolean, go back to previous way of directly applying transformations to children in Group and Layer, and introduce new Clip class for non-transformed nested matrices.
Make sure the Base class is exposed in Node.js
2013-05-16 20:33:13 +02:00
Jürg Lehni
ae416f821c
Explain the booolean argument in color getter calls, and put _matrix in local variable for better minification.
2013-05-13 19:31:41 -07:00
Jürg Lehni
7c2e57e105
Remove Item#applyMatrix boolean, go back to previous way of directly applying transformations to children in Group and Layer, and introduce new Clip class for non-transformed nested matrices.
2013-05-13 18:57:17 -07:00
Jürg Lehni
c70b985911
Make sure the Base class is exposed in Node.js
2013-05-12 14:29:21 -07:00
hkrish
158001c154
Merge branch 'master' of https://github.com/paperjs/paper.js
...
* 'master' of https://github.com/paperjs/paper.js :
Fix: #initialize() to correctly convert #getValue() array back to Curve object.
Handle allowNull correctly again in SVGImport.
Simplify SVGImport attribute parsing and correctly handle failing tests with invalid coordinates.
Further refine Node.js integration.
Improve the Node version of Base.isPlainObject()
2013-05-11 14:42:56 +02:00
Harikrishnan Gopalakrishnan
ce600f4ea4
Fix: #initialize() to correctly convert #getValue() array back to Curve object.
2013-05-11 00:59:30 +03:00
Jürg Lehni
2b4dddbb1f
Handle allowNull correctly again in SVGImport.
2013-05-09 16:16:48 -07:00
Jürg Lehni
a4e875cf29
Simplify SVGImport attribute parsing and correctly handle failing tests with invalid coordinates.
2013-05-09 16:08:38 -07:00
Jürg Lehni
dd96d67fe1
Further refine Node.js integration.
2013-05-09 16:06:45 -07:00
Jürg Lehni
82b9cb3dbf
Improve the Node version of Base.isPlainObject()
2013-05-09 15:30:18 -07:00
hkrish
fce29e4b75
merge upstream
2013-05-09 14:30:28 +02:00
Jürg Lehni
093f4cf7ba
Fix issue with SVG transformations not being applied to gradient fills.
2013-05-09 02:37:48 -07:00
Jürg Lehni
04f2f19a43
Minor fix in Matrix#shear()
2013-05-09 02:31:26 -07:00
Jürg Lehni
9e5b47c1ac
Implement SVG transform attribute parser, to completely remove dependency on baseVal.
2013-05-09 02:31:10 -07:00
Jürg Lehni
8cc74820a8
Handel issue in node-canvas where color stop offsets cannot be strings.
2013-05-09 01:57:07 -07:00
Jürg Lehni
e2f4eb5a56
Improve Node's Base.isPlainObject() to rule out arrays.
2013-05-09 01:56:47 -07:00
Jürg Lehni
e9fb78aa08
Start removing dependencies on SVG baseVal.
2013-05-09 01:46:13 -07:00
Jürg Lehni
8cd57743c8
Switch to handling SVG tagNames case-insensitively across the whole codebase.
...
Since Node's jsdom doesn't provide case-sensitive tagNames.
2013-05-09 01:45:38 -07:00
Jürg Lehni
0174f7e2e5
Remove debug logging.
2013-05-09 00:26:41 -07:00
Jürg Lehni
aa757e1d7b
Use DOMParser to handle SVG strings.
2013-05-09 00:22:42 -07:00
Jürg Lehni
ee3fa3b00f
Implement DOMParser emulation based on jsdom.
2013-05-09 00:22:20 -07:00
Jürg Lehni
ecbde1af14
Rename browser subfolder to dom, since we'll be using it on Node too.
2013-05-09 00:21:58 -07:00
Jürg Lehni
7644016d66
Export paper version in node.
2013-05-08 20:59:54 -07:00
Jürg Lehni
c5627d141e
Fix PaperScript support in node.
2013-05-08 20:38:23 -07:00
Jürg Lehni
6f347c98b3
Fix formatting.
2013-05-08 20:29:37 -07:00
Jürg Lehni
731a873884
Check for radial property as well when predicting gradient color type.
2013-05-08 20:19:40 -07:00
Jürg Lehni
67aacb9552
Implement dontLink parameters for View getters.
2013-05-08 20:19:22 -07:00
Jürg Lehni
3fb22f0380
Implement XMLSerializer for node.
2013-05-08 20:18:46 -07:00
Jürg Lehni
892640172b
Fix issue with unshared core prototypes along different node scopes.
2013-05-08 20:18:17 -07:00
Jürg Lehni
b3d7f5aff6
Export view size and set svg attributes in project.exportSVG()
2013-05-08 20:16:53 -07:00
Jürg Lehni
041f3a6c4d
jsdom uses uppercase values for nodeName with SVG too.
2013-05-08 18:18:47 -07:00
Jürg Lehni
8dbe1f4927
Fix issues with running paper.js in node.
...
We need to export the Object and Array definition into new context, to make Base.isPlainObject() work. See http://nodejs.org/api/vm.html#vm_globals
2013-05-08 18:17:23 -07:00
Jürg Lehni
219ccd2fdd
Start making exportSVG() work for node, using jsdom.
2013-05-08 01:30:14 -07:00
Jürg Lehni
bc090dcf66
Switch from bootstrap.js to the renamed straps.js
2013-05-08 00:13:02 -07:00
Jürg Lehni
fcb697264f
Make sure alpha channel is included in serialization of Color.
...
Fixes #215 .
2013-05-07 22:51:23 -07:00
Jürg Lehni
9cca6d8a00
Move the node.js folder into src.
2013-05-07 22:07:12 -07:00
Jürg Lehni
7b8e27ddd9
Further simplify getNearestPoint() algorithm.
2013-05-07 00:07:18 -07:00
Jürg Lehni
f34fe102a4
Use new alias notation for deprecated functions, wherever we can.
2013-05-06 21:01:04 -07:00
Jürg Lehni
8e53829e9c
Define Callback#once()
2013-05-06 20:57:08 -07:00
Jürg Lehni
b59a98f7ce
Add jQuery style aliases to Callback and use #on() in the examples rather than #attach().
2013-05-06 20:56:58 -07:00
Jürg Lehni
d70c9b0464
Minor syntax fixes.
2013-05-05 23:19:22 -07:00
Jürg Lehni
3a7547a255
Bring back accidentally removed static functions on Curve.
2013-05-05 23:14:49 -07:00
Jürg Lehni
db42dfdfc1
Implement simpler strategy to iteratively find nearest points on paths.
...
Idea based on method described on http://pomax.github.io/bezierinfo/
2013-05-05 23:05:57 -07:00
Jürg Lehni
acb3d6f5f9
Update package.json for publishing to NPM.
2013-05-05 19:22:13 -07:00
Jürg Lehni
0fc4b9f28d
Remove intersection caching code.
2013-05-05 16:38:18 -07:00
Jürg Lehni
83b68cdb8e
Restore full validation check for resulting paths.
2013-05-05 16:36:25 -07:00
Jürg Lehni
c006b081f6
Fix issue that broke "Maximum possible intersections between 2 cubic bezier curve segments - 9" test.
2013-05-05 16:23:41 -07:00
Jürg Lehni
364f6dcd36
Improve code comments a bit.
2013-05-04 11:13:38 -07:00
Jürg Lehni
6da97b894f
Improve code comments a bit.
2013-05-04 11:13:38 -07:00
Jürg Lehni
656300ffb1
Write documentation for boolean path operations.
2013-05-04 10:58:50 -07:00
Jürg Lehni
d911c7b12a
Write documentation for boolean path operations.
2013-05-04 10:58:50 -07:00
Jürg Lehni
26b3beed5c
Implement static Line.intersect() and use it to speed up Curve.getIntersections()
...
Unfortunately doesn't seem to have any impact!
2013-05-04 10:22:10 -07:00
Jürg Lehni
f704b00e00
Implement static Line.intersect() and use it to speed up Curve.getIntersections()
...
Unfortunately doesn't seem to have any impact!
2013-05-04 10:22:10 -07:00
Jürg Lehni
86a26db2a2
Use variable names that better reflec functionality and original naming.
2013-05-04 09:58:46 -07:00
Jürg Lehni
4eff5bf45e
Use variable names that better reflec functionality and original naming.
2013-05-04 09:58:46 -07:00
Jürg Lehni
f58f58e406
Some more minor tweaks.
2013-05-04 03:38:19 -07:00
Jürg Lehni
3ab20ea3e9
Some more minor tweaks.
2013-05-04 03:38:19 -07:00
Jürg Lehni
023f768817
Further clean up.
...
Instead of removing temporary data structure, clone Segment.
2013-05-04 03:33:44 -07:00
Jürg Lehni
1e8947af63
Further clean up.
...
Instead of removing temporary data structure, clone Segment.
2013-05-04 03:33:44 -07:00
Jürg Lehni
cb66f6f2e2
Improve comments.
2013-05-04 03:20:53 -07:00
Jürg Lehni
31a45bad97
Improve comments.
2013-05-04 03:20:53 -07:00
Jürg Lehni
cbde2ea526
Fix accidental variable leakage.
2013-05-04 03:13:57 -07:00
Jürg Lehni
e1ef69f23a
Fix accidental variable leakage.
2013-05-04 03:13:57 -07:00
Jürg Lehni
b5abfcb515
One last optimization in computeBoolean().
2013-05-04 03:08:43 -07:00
Jürg Lehni
469d3129a6
One last optimization in computeBoolean().
2013-05-04 03:08:43 -07:00
Jürg Lehni
3ee10c1765
more optimizations in computeBoolean().
...
I think this is done now!
2013-05-04 03:00:31 -07:00
Jürg Lehni
7fdaa3e699
more optimizations in computeBoolean().
...
I think this is done now!
2013-05-04 03:00:31 -07:00
Jürg Lehni
9fb7340aac
Remove need for __segment property and further simplify computeBoolean() code.
2013-05-04 02:50:18 -07:00
Jürg Lehni
9aafb46e6c
Remove need for __segment property and further simplify computeBoolean() code.
2013-05-04 02:50:18 -07:00
Jürg Lehni
43b7afb961
Merge loops in reorientPath().
2013-05-03 23:25:26 -07:00
Jürg Lehni
a5d00e64cf
Merge loops in reorientPath().
2013-05-03 23:25:26 -07:00
Jürg Lehni
aab41752b4
Minor cleanup.
2013-05-03 23:08:00 -07:00
Jürg Lehni
37300455a8
Minor cleanup.
2013-05-03 23:08:00 -07:00
Jürg Lehni
737c2c36fe
More computeBoolean() optimizations and clean up.
2013-05-03 23:03:00 -07:00
Jürg Lehni
4a9e3924c6
More computeBoolean() optimizations and clean up.
2013-05-03 23:03:00 -07:00
Jürg Lehni
55c799dc2c
Clean up computeBoolean().
...
Work in progress.
2013-05-03 22:38:29 -07:00
Jürg Lehni
1031f4ecfb
Clean up computeBoolean().
...
Work in progress.
2013-05-03 22:38:29 -07:00
Jürg Lehni
f15deec334
Clean up reorientCompoundPath().
2013-05-03 22:09:56 -07:00
Jürg Lehni
d014ed3c68
Clean up reorientCompoundPath().
2013-05-03 22:09:56 -07:00
Jürg Lehni
d5543842e9
Define CompoundPath#reverse() and #clockwise, and replace reversePath() with it.
2013-05-03 21:41:22 -07:00
Jürg Lehni
25e5582a35
Define CompoundPath#reverse() and #clockwise, and replace reversePath() with it.
2013-05-03 21:41:22 -07:00
Jürg Lehni
3515574f65
Move fix for faulty _curves list after calls to Path#reverse() to the right place.
2013-05-03 21:33:17 -07:00
Jürg Lehni
bd3031cdff
Move fix for faulty _curves list after calls to Path#reverse() to the right place.
2013-05-03 21:33:17 -07:00
Jürg Lehni
81b4136775
Improve testOnCurve() code.
2013-05-03 21:24:02 -07:00
Jürg Lehni
f03283804b
Improve testOnCurve() code.
2013-05-03 21:24:02 -07:00
Jürg Lehni
98efa2f66b
Move private functions into private injection scope.
2013-05-03 21:21:53 -07:00
Jürg Lehni
99cf8ae9d4
Move private functions into private injection scope.
2013-05-03 21:21:53 -07:00
Jürg Lehni
d268c68ae5
Remove names from boolean operator functions and use parameter instead.
2013-05-03 21:16:36 -07:00
Jürg Lehni
990e8b4599
Remove names from boolean operator functions and use parameter instead.
2013-05-03 21:16:36 -07:00
Jürg Lehni
9a4c8bde19
Rewrite PathItem#_splitPath() to use Curve#divide().
...
Leading to faster code, due to less loop passes.
2013-05-03 21:05:44 -07:00
Jürg Lehni
fb8effe088
Rewrite PathItem#_splitPath() to use Curve#divide().
...
Leading to faster code, due to less loop passes.
2013-05-03 21:05:44 -07:00
Jürg Lehni
7e6519349a
Clean up Curve#divide() code.
2013-05-03 21:00:46 -07:00
Jürg Lehni
85de8a0b7d
Clean up Curve#divide() code.
2013-05-03 21:00:46 -07:00
Jürg Lehni
5f0feeb31f
Adjust precision of Curve#isFlatEnough() to cover rare edge cases.
2013-05-03 21:00:37 -07:00
Jürg Lehni
3101989974
Adjust precision of Curve#isFlatEnough() to cover rare edge cases.
2013-05-03 21:00:37 -07:00
Jürg Lehni
b07e52d361
More work on PathItem#__splitPath()
2013-05-03 18:52:03 -07:00
Jürg Lehni
af51edda34
More work on PathItem#__splitPath()
2013-05-03 18:52:03 -07:00
Jürg Lehni
f054f4a7e0
Allow better code compression by reducing property lookup.
2013-05-03 17:38:15 -07:00
Jürg Lehni
af84bb9988
Allow better code compression by reducing property lookup.
2013-05-03 17:38:15 -07:00
Jürg Lehni
8f7de47bb9
Clean up and simplify PathItem#_splitPath() code.
...
- Follow Paper.js variable scoping conventions (pretend we have Java-style variable scopes for better readability of code)
- Break lines at 80 chars
- Merge some duplicate code in segment handling.
2013-05-03 17:30:59 -07:00
Jürg Lehni
72a27d9732
Clean up and simplify PathItem#_splitPath() code.
...
- Follow Paper.js variable scoping conventions (pretend we have Java-style variable scopes for better readability of code)
- Break lines at 80 chars
- Merge some duplicate code in segment handling.
2013-05-03 17:30:59 -07:00
Jürg Lehni
410ceb8ff1
Simplify PathItem#exclude() and #divide()
2013-05-03 16:56:00 -07:00
Jürg Lehni
b8fcc9b105
Simplify PathItem#exclude() and #divide()
2013-05-03 16:56:00 -07:00
Jürg Lehni
1d55372ed4
Revert return strategy of boolean operators for simpler code, simplify operator logic and inline functions.
2013-05-03 16:52:37 -07:00
Jürg Lehni
c11967c81c
Revert return strategy of boolean operators for simpler code, simplify operator logic and inline functions.
2013-05-03 16:52:37 -07:00
Jürg Lehni
3fc200973e
Include BooleanOperations.html
2013-05-03 16:31:36 -07:00
Jürg Lehni
ee8a79449b
Include BooleanOperations.html
2013-05-03 16:31:36 -07:00
Jürg Lehni
68d67fcdcf
Start converting boolean code to Paper.js conventions.
...
- Tabs instead of white-space
- Different rules about spaces before / after parenthesis
2013-05-03 16:21:44 -07:00
Jürg Lehni
1fe83a482f
Start converting boolean code to Paper.js conventions.
...
- Tabs instead of white-space
- Different rules about spaces before / after parenthesis
2013-05-03 16:21:44 -07:00
Jürg Lehni
7ec53f74d1
Move boolean code into its own file, and add information comments again.
2013-05-03 16:16:52 -07:00
Jürg Lehni
90e3dd201a
Move boolean code into its own file, and add information comments again.
2013-05-03 16:16:52 -07:00
hkrish
d9d86f4ff7
Merge branch 'master' of https://github.com/paperjs/paper.js
...
* 'master' of https://github.com/paperjs/paper.js :
Undo recent change to Curve#getIntersection() since it breaks some boolean operations.
ý5:q
2013-05-03 19:24:03 +02:00
hkrish
e75cc32a3b
Merge branch 'master' of https://github.com/paperjs/paper.js
...
* 'master' of https://github.com/paperjs/paper.js :
Undo recent change to Curve#getIntersection() since it breaks some boolean operations.
ý5:q
2013-05-03 19:24:03 +02:00
Jürg Lehni
9e3b7eef50
Undo recent change to Curve#getIntersection() since it breaks some boolean operations.
2013-05-02 11:32:24 -07:00
Jürg Lehni
840e879ba8
Undo recent change to Curve#getIntersection() since it breaks some boolean operations.
2013-05-02 11:32:24 -07:00
hkrish
debce28bc4
Merge upstream
2013-05-02 14:18:24 +02:00
hkrish
10553c1bd8
Merge upstream
2013-05-02 14:18:24 +02:00
hkrish
381ee98cbc
Updated boolean operation methods.
...
The algorithm is based on paperjs' native segment and curve objects
rather than the generic Node and Link objects.
Also this is much smaller and faster! :)
2013-05-02 13:49:07 +02:00
hkrish
73b018f006
Updated boolean operation methods.
...
The algorithm is based on paperjs' native segment and curve objects
rather than the generic Node and Link objects.
Also this is much smaller and faster! :)
2013-05-02 13:49:07 +02:00
Jürg Lehni
f425c931a8
Improve Curve#getIntersections() by avoiding further subdivision of flat curves.
2013-05-01 18:40:57 -07:00
Jürg Lehni
e8fed1bdf0
Improve Curve#getIntersections() by avoiding further subdivision of flat curves.
2013-05-01 18:40:57 -07:00
Jürg Lehni
023c8b0432
Fix issue with recursive call of Curve.getIntersections().
2013-05-01 18:24:54 -07:00
Jürg Lehni
c61e8d57b9
Fix issue with recursive call of Curve.getIntersections().
2013-05-01 18:24:54 -07:00
hkrish
934ec8df7e
Fix: Update the getIntersections method signature in recursive calls
2013-05-01 13:29:02 +02:00
hkrish
f239a3980d
Fix: Update the getIntersections method signature in recursive calls
2013-05-01 13:29:02 +02:00
hkrish
d8dc762826
Merge branch 'master' of https://github.com/paperjs/paper.js
...
* 'master' of https://github.com/paperjs/paper.js :
Define CurveLocation#intersection as a way to retrieve the CurveLocation on the intersecting path when using Path#getIntersections().
ý5ý`qkb:q
2013-05-01 12:39:04 +02:00
hkrish
88b720be76
Merge branch 'master' of https://github.com/paperjs/paper.js
...
* 'master' of https://github.com/paperjs/paper.js :
Define CurveLocation#intersection as a way to retrieve the CurveLocation on the intersecting path when using Path#getIntersections().
ý5ý`qkb:q
2013-05-01 12:39:04 +02:00
Jürg Lehni
69f8bdc560
Define CurveLocation#intersection as a way to retrieve the CurveLocation on the intersecting path when using Path#getIntersections().
2013-04-30 18:41:26 -07:00
Jürg Lehni
883e3ad563
Define CurveLocation#intersection as a way to retrieve the CurveLocation on the intersecting path when using Path#getIntersections().
2013-04-30 18:41:26 -07:00
hkrish
30d9e322e8
Boolean Operations.
...
This is probably a crude integration. Need to resolve some issues,
such as finding the right place for constants, private classes etc.
2013-04-29 21:36:12 +02:00
hkrish
b4dd16bbfb
Boolean Operations.
...
This is probably a crude integration. Need to resolve some issues,
such as finding the right place for constants, private classes etc.
2013-04-29 21:36:12 +02:00
Jürg Lehni
c7ab32c501
Rearrange linear curve conditions.
2013-04-26 14:37:37 -07:00
Jürg Lehni
c513a24f46
Handle intersection between linear curves without recursive subdivision.
...
Closes #207 .
2013-04-26 14:31:42 -07:00
Jürg Lehni
06ffd8089d
Fix issue in Path#removeSegments() where curves are removed wrongly when start index is 0.
...
Closes #200 .
2013-04-26 08:46:57 -07:00
Jürg Lehni
74f6a93b33
Optimize Curve.getArea().
2013-04-25 17:47:11 -07:00
Jürg Lehni
898e216668
Implement Path#getArea() and CompoundPath#getArea().
2013-04-25 17:37:19 -07:00
Jürg Lehni
80a1129eab
Consistently use 'this' rather than 'Curve'.
2013-04-25 17:19:00 -07:00
Jürg Lehni
1b5ca4dec9
Rename Curve._addIntersections() to Curve.getIntersections()
2013-04-25 17:17:53 -07:00
Jürg Lehni
eaa6e3bb6b
Improve Curve#getCrossings() documentation and code.
2013-04-25 11:08:50 -07:00
Jürg Lehni
d7e075d316
Handle contour edge cases in Path#contains().
...
Closes #208 .
2013-04-25 11:03:49 -07:00
Jürg Lehni
edfd8f53de
Remove accidentally committed debugging code.
2013-04-24 19:28:46 -07:00
Jürg Lehni
c70b9e7d7d
Fix issue with Path#strokeBounds with #strokeJoin == 'miter' and clockwise orientation.
...
Closes #206 .
2013-04-24 19:27:31 -07:00
Jürg Lehni
420fb49230
Speed up Raster#getPixel().
2013-04-24 18:09:58 -07:00
Jürg Lehni
ead3646581
Handle alpha channels correctly in Raster#get/setPixel.
...
Closes #209 .
2013-04-24 16:29:28 -07:00
Jürg Lehni
69512ac396
Simplify and document Segment#_serialize().
2013-04-23 07:39:31 -07:00
Jürg Lehni
6029f59494
More uppercase changes.
2013-04-23 07:29:30 -07:00
Jürg Lehni
96d9b6730f
Rename Svg acronyms in API to SVG.
2013-04-23 07:19:08 -07:00
Jürg Lehni
cebeb11301
Rename Json acronyms in API to JSON.
2013-04-23 07:13:51 -07:00
Jürg Lehni
faecb7e78a
Allow creation of items when project has no layers.
2013-04-22 23:25:34 -07:00
Jürg Lehni
1b61e4333c
Implement Project#clear().
2013-04-22 22:48:36 -07:00
Jürg Lehni
885d75296d
Fix Layer#isInserted() for nested Layers.
2013-04-22 22:47:48 -07:00
Jürg Lehni
0c114883e1
Add unique ids to CurveLocation.
2013-04-22 19:11:42 -07:00
Jürg Lehni
6800a6d534
Use separate id ranges for different classes.
2013-04-22 19:09:59 -07:00
Jürg Lehni
2a53dbe60f
Restructure Color constructor to remove need for Color.create().
2013-04-22 19:07:38 -07:00
Jürg Lehni
dc9a9c42d2
Cleanup solveCubic() further.
2013-04-21 08:44:41 -07:00
Jürg Lehni
2fc4ff10ee
Implement Item#_contains() with local coordinates, and have Item#contains() take Item#matrix into account.
2013-04-21 08:43:05 -07:00
Jonathan Puckey
b8085c330f
Rename properties to object in Rectangle constructor docs.
2013-04-21 16:07:54 +02:00
Jonathan Puckey
3136480e5e
Clean up Segment object constructor example.
2013-04-21 16:02:26 +02:00
Jonathan Puckey
3517493f76
Improve PointText constructor examples.
2013-04-21 15:59:51 +02:00
Jonathan Puckey
52e7c39567
Improve Curve documentation.
2013-04-21 15:43:57 +02:00
Jonathan Puckey
e4203c2e36
Improve Color documentation.
2013-04-21 15:36:20 +02:00
Jonathan Puckey
d4d1a0fdae
Improve Style example code.
2013-04-21 15:36:03 +02:00
Jonathan Puckey
191213f362
Improve GradientStop example code.
2013-04-21 15:35:45 +02:00
Jonathan Puckey
fbc3985bbf
Add Gradient class examples.
2013-04-21 15:35:31 +02:00
Jonathan Puckey
fdd367e1c2
Add titles to Path.Constructors documentation examples.
2013-04-21 13:58:22 +02:00
Jonathan Puckey
a5997dcc24
Add example to Item#contains(point) docs.
2013-04-21 13:56:29 +02:00
Jonathan Puckey
daf8d0f881
Rename 'properties' constructor parameter to 'object' in docs.
2013-04-21 13:54:31 +02:00
Jonathan Puckey
0369f5aea9
Fix mistake in example code.
2013-04-21 13:53:13 +02:00
Jürg Lehni
4b24690207
Implement Shape#contains() and define unit tests for it.
2013-04-20 20:54:06 -07:00
Jürg Lehni
2793709935
Fix wrong Shape.Circle size.
2013-04-20 20:53:40 -07:00
Jürg Lehni
db7eb65bd7
Implement Item#contains() and use it for hit-testing Rasters.
2013-04-20 20:41:52 -07:00
Jürg Lehni
bb03c72ce8
Implement Item#hasFill().
2013-04-20 20:40:20 -07:00
Jürg Lehni
acd3236989
Optimize Shape constructors by passing along point.
2013-04-20 20:24:16 -07:00
Jürg Lehni
e8695dee9b
Replace solveCubic() code with version that does not use cbrt() calls.
2013-04-20 20:04:23 -07:00
Jürg Lehni
6fc2d50939
Remove cbrt() since we don't use it anymore.
2013-04-20 20:00:11 -07:00
Jürg Lehni
c45ad26b67
Remove tolerance parameter from solveCubic() / solveQuadratic() since we should always use EPSILON.
2013-04-20 19:58:42 -07:00
Jürg Lehni
14aa8e5dea
Improve precision of Numerical.solveCubic() and fix issues in Curve.getCrossings().
...
Closes #202 .
2013-04-20 19:14:19 -07:00
Jürg Lehni
461def5383
Fix issue with imprecise tangents / normals to curves at t = 0, 1.
2013-04-20 17:40:19 -07:00
Jürg Lehni
1952e3dc7d
Implement Curve#getCurvatureAt().
2013-04-20 17:26:51 -07:00
Jürg Lehni
bcb10a222f
Add SvgImport example for Inkscape and fix issue with multiple SVG path commands.
...
Closes #203 .
2013-04-20 14:54:21 -07:00
Jürg Lehni
3025c63179
Simplify Style creation.
2013-04-19 20:00:30 -07:00
Jürg Lehni
41a58acb8c
Document new approach to styles.
2013-04-19 19:51:04 -07:00
Jürg Lehni
f51dc65cca
Use Color object for default.
2013-04-19 19:39:05 -07:00
Jürg Lehni
53dac53ca0
Restructure code organization by separating canvas related utility classes into separate canvas folder, and move inclusion of utilities classes to beginning.
...
Was needed because Numerical.KAPPA is accessed at compile time.
2013-04-19 19:38:48 -07:00
Jürg Lehni
e1807214f4
Large refactoring of Style handling for notable speed improvements.
2013-04-19 19:31:29 -07:00
Jürg Lehni
98f7c020bd
Use Item#type instead of instanceof checks for better performance.
2013-04-19 19:27:02 -07:00
Jürg Lehni
bf9acd4499
Correct Numerical.KAPPA value.
2013-04-19 18:57:31 -07:00
Jürg Lehni
9da392a99c
Commit initial support for Shape class.
...
Hit testing is still missing.
2013-04-19 17:25:50 -07:00
Jürg Lehni
90f2614d52
Export Numerical object and move KAPPA constant there.
2013-04-19 17:03:41 -07:00
Jürg Lehni
9cc0822477
Move PlacedItem#_hitTest() to PlacedSymbol#_hitTest() since it was written for symbols, and remove PlacedItem as it's an empty class now.
2013-04-19 16:40:30 -07:00
Jürg Lehni
67203e753c
Move #applyMatrix setting to PathItem.
2013-04-19 13:16:00 -07:00
Jürg Lehni
8d99aa5f95
Handle color transformation in Item#transform() rather than Path#_applyMatrix().
...
Fixes an issue with BoucingBalls.html, now that CompoundPath#applyMatrix is true.
2013-04-19 13:13:54 -07:00
Jürg Lehni
bb546decae
Various improvements to Color caching mechanisms.
2013-04-19 12:51:53 -07:00
Jürg Lehni
9efbc288a1
Merge Path.Rectangle and Path.RoundRectangle.
2013-04-19 12:36:49 -07:00
Jürg Lehni
922b9b5bd0
Rename _cloning parameter to _preserve.
2013-04-19 11:54:16 -07:00
Jürg Lehni
2e265693ff
Make #drawSelected() protected.
2013-04-18 17:50:53 -07:00
Jürg Lehni
517b2ee27f
Inline Item.drawSelectedBounds() code.
2013-04-18 17:07:32 -07:00
Jürg Lehni
9ee8590a4d
Move Item.draw() to Item#draw().
...
Makes more sense this way.
2013-04-18 17:04:06 -07:00
Jürg Lehni
d23e21edd7
Make Item#draw() protected, so we know to not directly call it.
2013-04-18 16:58:35 -07:00
Jürg Lehni
d1c6b7134f
Fix Raster#getAverageColor() to work with new transforms history code.
2013-04-18 16:50:18 -07:00
Jürg Lehni
c50b940ff3
Fix Item#rasterize() to work with new matrices history code.
2013-04-18 16:23:27 -07:00
Jürg Lehni
1333f59d54
Have CompoundPath always apply transformations by default.
2013-04-18 16:22:21 -07:00
Jürg Lehni
d2b43b043a
Fix comment.
2013-04-16 19:41:45 -07:00
Jürg Lehni
96b886ae8d
Avoid endless recursion when changing view from onFrame handler.
...
Closes #184 .
2013-04-09 22:38:23 -07:00
Jürg Lehni
9fe1ff951a
Clean up code.
2013-04-09 20:36:38 -07:00
Jürg Lehni
7f245974e6
Implement a faster method to filter out beginnings of intersected curves.
2013-04-09 20:35:31 -07:00
Jürg Lehni
a9a0857ba4
Find a better strategy to avoid duplicate solutions in PathItem#getIntersections().
...
Closes #197 .
2013-04-09 20:27:55 -07:00
Jürg Lehni
2c3e8a32ab
Handle nested matrices correctly when drawing blend modes or transparency.
...
Closes #194 .
2013-04-09 20:01:10 -07:00
Jürg Lehni
f79e561512
Handle bounds correctly for groups with only empty children.
2013-04-09 19:24:41 -07:00
Jürg Lehni
0f19e72733
Minor tweaks.
2013-04-09 19:12:47 -07:00
Jürg Lehni
b55d89acda
Move handling of clipping outside of draw function, so canvas context can correctly be saved and restored for clipping paths too.
2013-04-09 19:08:41 -07:00
Jürg Lehni
90cc10cc4b
Calculate _globalMatrix for all drawn items and use it for the drawing of selections.
2013-04-09 18:52:47 -07:00
Jürg Lehni
e9aad895ae
Import and export Item#data in SVG as well.
...
Closes #188 .
2013-04-09 17:53:26 -07:00
Jürg Lehni
e2a118e43e
Make sure color components cannot be anything else than numbers.
2013-04-09 17:43:18 -07:00
Jürg Lehni
fbe8a558bd
Refactor Format literal to Formatter class that keeps precision stored.
2013-04-09 17:32:19 -07:00
Jürg Lehni
8da8f116d1
Restructure style related class organization.
2013-04-09 17:08:09 -07:00
Jürg Lehni
2d3f9c36eb
Update JSDoc and fix documentation issues.
2013-04-09 17:07:41 -07:00
Jürg Lehni
b3b0fa649b
Minor Style refactoring clean-ups.
2013-04-09 16:51:57 -07:00
Jürg Lehni
b4a99415d0
Merge PathStyle, CharacterStyle and ParagraphStyle into Style.
...
Closes #130 .
2013-04-09 16:46:20 -07:00
Jürg Lehni
a4f36a59a6
Minor code simplification.
2013-04-09 14:04:25 -07:00
Jürg Lehni
8feb510ea1
Make sure highlight remains an optional component.
2013-04-09 09:34:39 -07:00
Jürg Lehni
9d0b9dc4c6
Allow implicit Gradient declaration in Color object literals.
2013-04-09 09:27:46 -07:00
Jürg Lehni
0d125e1a12
Make sure Gradient#stops and #radial are alway set.
2013-04-09 09:23:08 -07:00
Jürg Lehni
26efbdb451
Implement argument reading for Gradient objects.
2013-04-09 09:20:32 -07:00
Jürg Lehni
b9532f6a1a
Rename Color#hilite -> Color#highlight.
2013-04-09 08:51:14 -07:00
Jürg Lehni
10c0a44940
Make sure _components are always defined before parsers are called.
2013-04-09 08:40:09 -07:00
Jürg Lehni
da7b32a18e
Clean up code references to GradientColor.
2013-04-09 08:36:17 -07:00
Jürg Lehni
bf21e32082
Implement calling of _removeOwner() for gradients.
2013-04-09 08:36:02 -07:00
Jürg Lehni
9b50020721
Check for gradient Colors correctly.
2013-04-09 08:35:42 -07:00
Jürg Lehni
5550ecaf25
Bring back missing Color constructor documentation.
2013-04-09 08:29:39 -07:00
Jürg Lehni
fd0f4f0929
Remove GradientColor and move all documentation to Color.
2013-04-09 08:23:20 -07:00
Jürg Lehni
a99c91e729
Implement Color component parsers.
2013-04-09 08:17:57 -07:00
Jürg Lehni
d3bb68d0e0
Use faster Array construction.
2013-04-09 07:55:09 -07:00
Jürg Lehni
b3256684fb
Make Color#toString() work for gradients.
2013-04-09 01:26:51 -07:00
Jürg Lehni
5209e97c8d
Merge GradientColor into Color.
...
Work in progress.
2013-04-09 01:21:36 -07:00
Jürg Lehni
380fce3946
Simplify GradientColor code before merge with Color.
2013-04-08 23:29:15 -07:00
Jürg Lehni
9cdc4b9372
Switch back to only one Gradient constructor for both linear and radial Gradients.
2013-04-08 20:52:21 -07:00
Jürg Lehni
ca1a395dbd
Invert Color#gray component.
2013-04-08 20:20:47 -07:00
Jürg Lehni
727db4c5f2
Further improve Color constructors.
2013-04-08 20:06:29 -07:00
Jürg Lehni
3ffb2e6a75
Refactor Color conversion code.
2013-04-08 19:42:17 -07:00
Jürg Lehni
062abab78b
More work on Color refactoring.
...
Improve backward compatible constructors.
2013-04-08 13:50:12 -07:00
Jürg Lehni
01673d675d
Fix issues with new Color serialization.
2013-04-08 13:10:49 -07:00
Jürg Lehni
cf21da75fc
Improve Color constructor and simplify serialization.
2013-04-08 07:27:48 -07:00
Jürg Lehni
3a893600ca
Handle overlapping HSB / HSL properties and make sure conversions are only performed when needed.
2013-04-08 07:12:50 -07:00
Jürg Lehni
8292112ecd
More work on Color and testing.
2013-04-08 07:07:41 -07:00
Jürg Lehni
a48e6e5bf9
More work on Color refactoring.
2013-04-08 00:11:43 -07:00
Jürg Lehni
09824e6b91
More work on Color refactoring.
2013-04-07 23:01:49 -07:00
Jürg Lehni
136c028d29
Increase performance of Style getters / setters.
2013-04-07 17:36:35 -07:00
Jürg Lehni
218732e320
Implement a row of simple optimizations to increase performance of Item constructors.
2013-04-07 17:36:09 -07:00
Jürg Lehni
232ea221b4
First batch of large Color refactoring and simplification.
...
Work in progress.
2013-04-07 10:03:51 -07:00
Jürg Lehni
fa143ad545
Fix typo.
2013-04-07 09:49:34 -07:00
Jürg Lehni
a0b903e49c
Simply call slice() instead of slice(0).
2013-04-06 18:39:17 +02:00
Jürg Lehni
4bc3882c82
Do not access internal _alpha property.
2013-04-06 18:14:45 +02:00
Jürg Lehni
18ed9010a6
Derive Item#type from Item#_class and use that instead in code that depends on Item types.
2013-04-06 18:07:30 +02:00
Jürg Lehni
f43b322d2a
Rename Base#_type property to #_class.
2013-04-06 09:16:08 +02:00
Jürg Lehni
cb62c6053a
Switch back to persistence of segments for good.
2013-04-05 17:34:09 +02:00
Jürg Lehni
9adfc01c8d
Handle both strings and objects in Base.importJson().
...
And keep returning strings from #exportJson().
2013-04-05 16:58:00 +02:00
Jürg Lehni
e63b3a0797
Use short-cut to Math.abs()
2013-03-23 17:05:48 -07:00
Jürg Lehni
d0c763f27d
Use CanvasContext#save() and #restore() in Item#rasterize().
2013-03-19 21:36:11 -07:00
Jürg Lehni
be8b46899d
Simplify Matrix#applyToContext()
2013-03-19 21:35:41 -07:00
Jürg Lehni
1392f87d85
Switch back to serializing segment lists for now, so we can fix other failing tests.
2013-03-19 18:48:59 -07:00
Jürg Lehni
606389238d
Have Color always serialize in non-compact mode.
2013-03-19 18:47:34 -07:00
Jürg Lehni
5ff911f68c
Have Path#closePath() handle merging of first and last segment, if doubled.
...
So we finally found a reason for #closePath() to stick around :)
2013-03-19 18:47:18 -07:00
Jürg Lehni
9c38a76525
Add support for Item#data serialization.
2013-03-19 17:52:46 -07:00
Jürg Lehni
16b60d1b9e
Allow all basic types to properly serialize themselves in non-compact form.
2013-03-19 17:52:17 -07:00
Jürg Lehni
a0066b61c3
Rearrange method sequence in basic types.
2013-03-19 17:51:50 -07:00
Jürg Lehni
3f634f6420
Use same precision in Path#getPathData() as everywhere else.
2013-03-19 16:23:36 -07:00
Jürg Lehni
e854254986
Insert linear segments when dividing linear curves.
2013-03-19 16:17:12 -07:00
Jonathan Puckey
e3760afecd
Fix handling of param.clip in CompoundPath#draw.
2013-03-17 22:27:20 +01:00
Jonathan Puckey
e5c32b9520
Actually fix handling of param.clip in Path#draw.
2013-03-17 21:59:07 +01:00
Jonathan Puckey
4c4258d2e1
Fix Raster#getAverageColor by having Path#draw clip the context, when param.clip is true.
2013-03-17 21:41:46 +01:00
Jonathan Puckey
58247ea232
Fix bug in Raster#getSubImage and add test.
2013-03-17 18:57:16 +01:00
Jonathan Puckey
0d3f746c10
Have Raster constructor set Raster#_size to [0, 0] if it was not set.
2013-03-17 17:04:56 +01:00
Jonathan Puckey
5777c7a772
Fix problem where calling new Raster().setSize(size) threw an error.
2013-03-17 16:55:57 +01:00
Jonathan Puckey
f4c1f6a3c1
Remove todo.
2013-03-17 16:40:59 +01:00
Jonathan Puckey
9f466bbc97
Fix mistake in Raster#setPixel.
2013-03-17 16:39:23 +01:00
Jonathan Puckey
1cfe34089a
Remove double space in docs.
2013-03-17 15:01:30 +01:00
Jonathan Puckey
4b87860b30
Add documentation of Path#getLocationOf
2013-03-16 18:39:53 +01:00
Jonathan Puckey
6f490d8b34
Add documentation for Path#split.
2013-03-16 17:59:31 +01:00
Jonathan Puckey
2b7f526c62
Fix hit-testing documentation: change options.guide to options.guides.
2013-03-16 14:16:02 +01:00
Jonathan Puckey
b76f69b517
Improve Layer documentation.
2013-03-16 14:03:13 +01:00
Jonathan Puckey
7ee7a26ef4
Improve item documentation.
2013-03-16 14:02:59 +01:00
Jonathan Puckey
b23a4ede56
Improve Group documentation.
2013-03-16 13:44:58 +01:00
Jonathan Puckey
1393825bc2
Add object literal constructor docs to Rectangle.
2013-03-16 13:15:21 +01:00
Jonathan Puckey
c6bcd7d97a
Improve Size documentation.
2013-03-16 13:04:33 +01:00
Jürg Lehni
780e842d74
Use === instead of ==.
2013-03-10 20:15:45 -07:00
Jonathan Puckey
28d21bf5b1
Improve Raster documentation.
2013-03-10 23:19:59 +01:00
Jonathan Puckey
d8b0da9103
Fix small bug in Raster constructor.
2013-03-10 22:15:28 +01:00
Jonathan Puckey
2d9b0b2e8e
Improve Path documentation.
2013-03-10 19:48:46 +01:00
Jonathan Puckey
4292b90bd4
Improve Segment documentation.
2013-03-10 19:48:28 +01:00
Jonathan Puckey
38b9b327ae
Add Path.Constructor examples.
2013-03-10 19:09:09 +01:00
Jonathan Puckey
71b63b0e9d
Fix documentation.
2013-03-10 19:06:37 +01:00
Jonathan Puckey
177f799bde
Rename Path.Star parameter from numPoints to points.
2013-03-10 18:09:05 +01:00
Jonathan Puckey
097a9c958f
Rename Path.RegularPolygon parameter from numSides to sides.
2013-03-10 18:02:16 +01:00
Jonathan Puckey
fd3fc7f2d7
Implement Item#setParent, making Item#parent writeable. Closes #186 .
2013-03-10 15:35:33 +01:00
Jonathan Puckey
25d34be59b
Implement Item#data. Closes #188 .
2013-03-10 14:59:53 +01:00
Jürg Lehni
b8ca30a4cd
Add support for GradientColor object literal constructor.
...
And introduce getter / setter for #gradient.
2013-03-05 20:41:36 -08:00
Jürg Lehni
1d1e6425fa
Remove all left-overs of call chaining, except for where it's in use.
2013-03-05 20:39:07 -08:00
Jürg Lehni
0e72dbd2e0
Rename Color#getCanvasStyle() to #toCanvasStyle().
2013-03-05 19:58:41 -08:00
Jürg Lehni
52af99de6b
Fix issue with click events on items.
...
Closes #179 .
2013-03-05 15:44:22 -08:00
Jürg Lehni
8185cc07e7
Clean up mouse-handling code and add support for Project#options.hitTolerance.
2013-03-05 15:44:03 -08:00
Jürg Lehni
80600d2a2b
Fix issue with removeOnMove() calls sometimes removing items too early.
...
Closes #181 .
2013-03-05 15:22:44 -08:00
Jürg Lehni
7ca22cd260
Clean up mouse handling code.
2013-03-05 14:57:41 -08:00
Jürg Lehni
31c06b4a61
Switch to short form of _type for GradientColor, similar to all other colors.
2013-03-05 11:00:50 -08:00
Jürg Lehni
97e85d66db
Fix issue with object literal properties being accidentally misread as path segments.
...
Closes #177 .
2013-03-05 00:28:21 -08:00