Jürg Lehni
a4535edbb9
Bring back _class names, since code minification breaks reliance on constructor.name.
...
Closes #248 .
2013-06-23 20:18:32 -07:00
Jürg Lehni
719b9d5e24
Move logic that determines if item can be directly composited into separate per-item #_canComposite() method.
2013-06-19 08:22:08 -07:00
Jürg Lehni
6fe60cff9d
Fix trailing comas.
2013-06-12 17:42:38 -07:00
Jürg Lehni
cb0dcf1719
Fix accidental global leakage.
2013-06-12 17:27:20 -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
5592bb57e0
Properly export Numerical and PaperScript again.
2013-05-27 15:55:44 -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
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
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
d70c9b0464
Minor syntax fixes.
2013-05-05 23:19:22 -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
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
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
1b5ca4dec9
Rename Curve._addIntersections() to Curve.getIntersections()
2013-04-25 17:17:53 -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
67203e753c
Move #applyMatrix setting to PathItem.
2013-04-19 13:16:00 -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
fa143ad545
Fix typo.
2013-04-07 09:49:34 -07: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
849d3efc2e
Have PathItem#setPathData() clear the previous content.
2013-03-03 16:56:48 -08:00
Jonathan Puckey
3cdb11fe36
GradientStop & PathItem example documentation.
2013-03-03 19:47:32 +01:00
Jürg Lehni
12d4d563d9
Further shorten path data code.
2013-03-01 01:18:42 -08:00
Jürg Lehni
13a567bcaa
Fix handling of multiple h / v commands in path data.
2013-03-01 01:18:27 -08:00
Jürg Lehni
5fbc6e939d
Fix small SVG path-data parser issue.
2013-02-28 19:33:08 -08:00
Jürg Lehni
82cefa9846
Fix typo.
2013-02-28 19:29:44 -08:00
Jürg Lehni
0f140e391d
Minor clean ups.
2013-02-28 19:21:46 -08:00
Jürg Lehni
78b3621cf6
Implement PathItem#pathData getter and setter for SVG style path data.
...
And use it fro SvgImport too.
2013-02-28 19:14:06 -08:00
Jürg Lehni
6c9c16ad3d
Update copyright information comments, and year.
2013-01-28 18:03:27 -08:00
Jürg Lehni
cb8f3291d3
Clean up some comments.
2012-12-27 20:19:23 +01:00
Jürg Lehni
00898908d3
Write documentation for PathItem#getIntersections().
2012-12-27 19:26:40 +01:00
Jürg Lehni
68ad4bb5ba
Implement PathItem#getIntersections(path) and Curve#getIntersections(curve) using divide-and-conquer approach, and new Curve.getBounds().
2012-12-27 19:23:03 +01:00
Jürg Lehni
c025c41ec0
Start implementing PathItem#getIntersections().
2012-12-21 16:13:38 +01:00
Jürg Lehni
77296c4640
Update documentation a bit.
2012-10-05 16:09:15 -07:00
Jürg Lehni
733d879bb6
Add / improve comments about DOCS.
2011-12-23 22:47:10 +01:00
Jonathan Puckey
3ac171a304
Path#smooth() example: select path using fullySelected instead of selected, so we can see its handles.
2011-11-12 16:45:33 +01:00
Jürg Lehni
79c0ad8cc5
Update copyright notices.
2011-07-01 12:17:45 +02:00
Jürg Lehni
7211e68245
Add documentation to PathItem class.
2011-07-01 11:22:33 +02:00
Richard D. Worth
ac39873693
Whitespace. Removed all trailing whitespace from .js files
2011-06-30 06:01:51 -04:00
Jürg Lehni
7cd749e63d
Change all documentation to new convention of defining @class outside injection scope, fix some comments and a few errors with examples.
2011-06-22 23:56:05 +01:00
Jürg Lehni
8d49d2377b
Fix documentation for PathItem#smooth().
2011-06-16 23:37:45 +01:00
Jürg Lehni
6e7d23faa4
Improve #arcTo() documentation.
2011-06-16 22:38:58 +01:00
Jürg Lehni
aa825302e4
Clean up documentation for PathItem, Path & CompoundPath, by moving shared documentation to PathItem, for methods that are supposed to be abstract in PathItem and shared between the two classes.
2011-06-16 22:07:00 +01:00
Jürg Lehni
9deabbee8d
Start adding documentation to PathItem.
2011-06-14 23:04:32 +01:00
Jürg Lehni
979bda52ab
We don't need the empty #initialize().
2011-05-07 17:05:42 +01:00
Jürg Lehni
6a67052090
Update copyright / licensing comments.
2011-03-08 01:41:50 +00:00
Jürg Lehni
e1a7aff2f0
Add copyright notice and license file.
2011-03-07 00:50:44 +00:00
Jürg Lehni
c313e702c9
Clean up a whole lot of beans access, and in the process of the refactoring improve canvas, context, size and bounds handling in Raster and PlacedSymbol.
2011-03-05 01:26:12 +00:00
Jürg Lehni
92bf51a7cc
Simplify the way the paper namespace is created and populated.
2011-03-04 13:34:31 +00:00
Jürg Lehni
941c3c7346
Declare all classes as local variables, so they can be scoped.
2011-03-03 13:33:41 +00:00
Jonathan Puckey
0c1f29ce29
Implement CompoundPath and move most of PathItem into Path.
2011-02-17 13:36:40 +01:00
Jürg Lehni
9d1458e6ae
Rely on new Array.isArray() now for array checks.
2011-02-15 23:15:13 +00:00
Jürg Lehni
91e8a3b652
Update Bootstrap to fix issues with beans (requiring definition of setter when getter is redefined in sub-class), and remove setBounds in PathItem that was introduced for that reason.
2011-02-14 10:28:27 +00:00
Jürg Lehni
ed55dc39fb
Fix PathItem constructor by no redefining arguments variable that results in arguments array changing as well on some browsers.
2011-02-14 01:47:56 +00:00
Jürg Lehni
38f4dd353d
Make Item#bounds setter work for PathItem, and add two TODO comments about Bootstrap shortcommings that cause it to break.
2011-02-14 01:24:22 +00:00
Jürg Lehni
3af5d549f6
Add comments about possible optimisations in PathItem#transformContent().
2011-02-14 01:14:03 +00:00
Jürg Lehni
ee8c30b518
Implement Matrix, Item#position, Item#bounds (setter too), Item#transform(), Item#scale(), Item#rotate(), Item#transalte() and Item#shear(). Some of it work in progress.
2011-02-14 01:05:16 +00:00
Jürg Lehni
420ffaa7ea
No need to check for existance of handleIn/Out, as they are always defined.
2011-02-13 18:56:06 +00:00
Jürg Lehni
08d4826441
Reformating code to follow Scriptotgrapher coding conventions.
2011-02-13 16:26:24 +00:00
Jürg Lehni
d67055b09b
Add documentation to PathItem#bounds.
2011-02-13 15:59:22 +00:00
Jürg Lehni
515439c4df
Optimize PathItem#bounds by using less coordinate lookups.
2011-02-13 15:55:43 +00:00
Jürg Lehni
71d1ff3cb3
Make PathItem#getBounds() work for closed paths too.
2011-02-13 15:51:54 +00:00
Jürg Lehni
d59d514a55
Fix bug in PathItem#bounds (wrongly used variable name twice), now works properly for open paths.
2011-02-13 15:49:36 +00:00
Jürg Lehni
e08359f49d
Beginning of PathItem#bounds and tests to go along with it, not functional yet.
2011-02-13 15:40:30 +00:00
Jürg Lehni
a30e4057e3
Fix PathItem constructor to support passing of segments both as array and arguments.
2011-02-13 15:39:24 +00:00
Jürg Lehni
771d9d0efe
Fix a couple of bugs in shape drawing code, and switch to consistently use this.currentSegment rather than this._segments[this._segments.length - 1], to use the internal check for a starting point.
2011-02-13 15:12:25 +00:00
Jürg Lehni
4b2341b3c2
Add gettter/setters for Path#segments, and fix bug in Segment#previous.
2011-02-13 13:52:51 +00:00
Jonathan Puckey
9b5e18c795
PathItem: replace this.segments.push(segment) to this.addSegment(segment)
2011-02-12 19:08:34 +01:00
Jonathan Puckey
c0e2101c32
Clean up src directory and move Bootstrap.js into lib.
2011-02-12 17:59:39 +01:00