Jürg Lehni
119e5acbf9
Move #_setProperties() and #set() from Item to Base, rename it to #_set and use it for Tool too.
2013-02-15 18:28:49 -08:00
Jürg Lehni
23b51915eb
Implement CompoundPath#firstSegment, #lastSegment, #firstCurve and #lastCurve.
2013-02-15 18:05:16 -08:00
Jürg Lehni
d3ccec2256
Use the code from Group#isEmpty() and CompoundPath#isEmpty() for Item#isEmpty(), since any item that does not have children overrides it.
2013-02-15 18:01:23 -08:00
Jürg Lehni
6c9c16ad3d
Update copyright information comments, and year.
2013-01-28 18:03:27 -08:00
Jürg Lehni
e4d98f7865
Add internal _cloning parameter to all insertion methods.
2013-01-20 16:14:30 -08:00
Jürg Lehni
677ea374c5
Only change #clockwise on closed Paths when inserting into CompoundPaths.
2013-01-20 15:48:06 -08:00
Jürg Lehni
c5ede2e955
Add support for _setProperties() to CompoundPath constructor.
2013-01-20 15:20:10 -08:00
Jürg Lehni
22ddd7a37e
Implement CompoundPath#curves.
2012-12-18 14:53:38 +01:00
Jürg Lehni
d16155f4fe
Fix CompoundPath#clone() so that it does not alter the #clockwise state on its children.
2012-12-01 11:31:03 -08:00
Jürg Lehni
f14b685c1d
Use #_type comparisson rather than slower instanceof operator wherever we can.
2012-12-01 11:17:09 -08:00
Jürg Lehni
61b6026361
Rename CompoundPath#flatten() to #reduce(), to avoid clash with Path#flatten().
2012-11-23 01:16:21 -08:00
Jürg Lehni
e9a9066d7f
Use group creation without explicit array declaration, as that's been supported all along.
2012-11-06 20:37:50 -08:00
Jürg Lehni
f110038104
Improve clipping mask drawing, and remove some unneeded ctx.save() / ctx.restore() calls.
2012-11-06 20:14:21 -08:00
Jürg Lehni
4b6207bdb6
Do not allow adding of items other than paths to CompoundPath.
2012-11-06 14:01:52 -08:00
Jürg Lehni
fd8fe9c08e
Rename CompoundPath#simplify() to #flatten() to avoid clashes with Path#simplify(), and add Path#flatten(), returning itself.
2012-11-06 10:16:03 -08:00
Jonathan Puckey
33c13b36a3
Fix drawing of groups where a compound path is used as a clip mask.
2012-11-06 18:07:51 +01:00
Jürg Lehni
19d145f281
Introduce Item#type, returning a simple item type string identifier.
2012-11-03 23:43:18 -07:00
Jürg Lehni
f6f80e4061
Implement CompoundPath#contains() and #hitTest() correctly.
...
And change the way that styles are stored on CompoundPaths: Not in the first child but in the item itself.
2012-10-22 18:48:51 -04:00
Jürg Lehni
e17e94b50b
Implement Item#isEmpty() for the various types.
...
And use it to tell #getBounds() when to ignore items.
2012-10-10 20:11:11 -07:00
Jürg Lehni
adb2ddc615
Fix CompoundPath#insertChild.
...
It was not returning success values and thus broke some tests.
2012-10-10 19:54:32 -07:00
Jürg Lehni
4a46c8ac98
Fix recently introduced error with stroke/fillColor handling
...
Since CanvasContext#stroke/fillStyle cannot be set to null, we have to keep checking Style#fill/strokeColor even after calling #_setStyles().
2011-12-19 23:07:14 +01:00
Jürg Lehni
cc26fdc5d1
Optimise handling and setting of fill and stroke styles.
...
Handle setting of fillColor and strokeColor in Item#_setStyles() instead of the various #draw() methods, directly access internal styles instead of using accessor calls and fix PointText#draw().
2011-12-19 22:40:14 +01:00
Jonathan Puckey
60a4292691
Fix the way children of CompoundPath have their orientation set by overriding Item#insertChild(index, item).
2011-07-27 20:30:39 +02:00
Jonathan Puckey
63628be923
Fix bug in CompoundPath#draw(ctx, draw) which was causing an error when a compound path didn't have any children.
2011-07-25 21:41:09 +02:00
Jürg Lehni
79c0ad8cc5
Update copyright notices.
2011-07-01 12:17:45 +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
c1fcd6f3bb
Documentation: Convert more Array return types to Type[].
2011-06-20 14:27:54 +01:00
Jürg Lehni
6f4a9d5c7b
Merge branch 'master' of github.com:scriptographer/paper.js
...
Conflicts:
test/tests/Item.js
2011-06-17 16:36:58 +01:00
Jonathan Puckey
6fc08c6417
Item: implement #addChild(item), #insertChild(index, item), #insertAbove(item) and #insertBelow(item) Deprecate: #moveAbove, #moveBelow, #appendTop, #appendBottom.
2011-06-17 16:58:41 +02:00
Jürg Lehni
503a031bdf
Allow CompoundPath to have named children.
2011-06-17 14:11:37 +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
cb463b74f5
Fix @extends tags in documentation: Only the immediately following class is required.
2011-06-16 21:43:31 +01:00
Jürg Lehni
ffa79f4fd1
Clean up white spaces in comments.
2011-06-14 22:59:45 +01:00
Jonathan Puckey
a96b272f7a
Documentation edits.
2011-06-04 15:50:29 +02:00
Jürg Lehni
29967153c3
Clean up TODO comments...
2011-06-01 10:49:43 +01:00
Jonathan Puckey
17fcb923ff
Documentation: rearrange @example tags, improve examples, rename boolean -> Boolean and misc smaller edits.
2011-05-30 19:42:17 +02:00
Jonathan Puckey
6b63bb8a36
Documention: add postscript methods to CompoundPath
2011-05-29 16:49:52 +02:00
Jonathan Puckey
41bf1f4543
CompoundPath: document #moveTo and #moveBy.
2011-05-29 16:13:30 +02:00
Jonathan Puckey
373e14dd76
Improve CompoundPath documentation.
2011-05-27 13:54:34 +02:00
Jonathan Puckey
349e4023f3
CompoundPath documentation: adjust constructor docs.
2011-05-23 01:53:57 +02:00
Jonathan Puckey
ae6606e11c
Add CompoundPath docs.
2011-05-23 01:49:01 +02:00
Jürg Lehni
eafc0d202e
Add comment about #clockwise magic happening in #append*() methods.
2011-05-16 20:17:14 +01:00
Jürg Lehni
ebdf5a2dfd
Shorten CompoundPath#moveBy().
2011-05-15 19:58:09 +01:00
Jürg Lehni
54161f81f1
Add expected parameters to function signature.
2011-05-15 19:57:48 +01:00
Jürg Lehni
c4c4f51eb9
Shorten getCurrentPath().
2011-05-15 19:31:25 +01:00
Jürg Lehni
7ba2fcad2a
Allow passing of Paths to CompoundPath constructor as arguments, without an array object.
2011-05-15 19:14:09 +01:00
Jürg Lehni
4cee442a05
Rename items parameter to paths.
2011-05-15 18:05:47 +01:00
Jürg Lehni
3d76034600
Use Path#setClockwise() in CompoundPath constructor to reverse top path so that the others appear as holes cut out from it.
2011-05-15 18:05:00 +01:00
Jürg Lehni
813b70c70b
Update comment a bit to make code more clear.
2011-05-15 17:59:57 +01:00
Jonathan Puckey
42ae3ce42e
CompoundPath#draw: set param.compound to false when done drawing.
2011-05-14 20:36:58 +02:00
Jürg Lehni
0bab694a01
Rename Item#children to private Item#_children and add #getChildren getter.
2011-05-14 18:07:10 +01:00
Jonathan Puckey
2bfe42da05
Have the CompoundPath constructor reverse the segments of all paths passed to it except for the first one. Introduce 'keepDirection' option to allow importing of already existing CompoundPath items.
2011-05-14 13:03:18 +02:00
Jonathan Puckey
032d19b0d2
Fix bug in CompoundPath where toCssString was being called instead of getCanvasStyle, resulting in problems when gradients were used.
2011-05-12 15:30:56 +02:00
Jürg Lehni
70d0dd9c0c
Move #moveTo() to the same scope as the other drawing commands, and add explaining comments.
2011-05-07 17:11:06 +01:00
Jürg Lehni
781b315808
Add getter/setter for Path#closed.
2011-04-30 23:22:29 +01:00
Jürg Lehni
f69153844b
Make #setContextStyles() a 'protected' function.
2011-04-28 13:04:12 +01:00
Jürg Lehni
a9ea10ca7f
Move version of #getBounds() that handles children to Item, to eliminate duplicated code.
2011-04-28 10:04:36 +01:00
Jonathan Puckey
11063af8df
CompoundPath cleanups.
2011-04-21 21:12:48 +02:00
Jonathan Puckey
1ea0a811b5
Use internal variables in CompoundPath#moveBy and Segment#isSelected.
2011-04-21 21:06:35 +02:00
Jonathan Puckey
2a9bbd3dee
Fix Path#closePath & CompoundPath#closePath.
2011-04-11 23:33:08 +02:00
Jürg Lehni
b5fdecf3d1
Rename ObservedRectangle to LinkedRectangle, ObservedPoint to LinkedPoint, and add more comments about what it is they are doing.
2011-03-22 17:27:46 +00:00
Jürg Lehni
1267f41559
Add beginning of ObservedRectangle support and test it in animatedStar example.
2011-03-16 23:32:46 +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
deb78b78cf
Define fast Rectangle.create() and use it internally where applicable.
2011-03-06 18:45:56 +00:00
Jürg Lehni
4908ba5edf
Expand shortened name.
2011-03-05 01:37:02 +00:00
Jürg Lehni
ce74516228
Remove more beans access, this time related to various PathStyle getters / setters.
2011-03-05 01:36:27 +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
2b6dede883
Clean up white-spaces and line lengths.
2011-03-03 22:45:17 +00:00
Jürg Lehni
cbe29fd02b
Rename Color#getCssString() to #toCssString(), to go with #toString().
2011-03-03 17:36:53 +00:00
Jürg Lehni
46a0589547
Use Error constructor correctly.
2011-03-03 17:29:40 +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
Jürg Lehni
490ef78b53
Fix error in CompoundPath#closePath(): Forgot to pass 'this' to getCurrentPath().
2011-03-03 12:26:28 +00:00
Jürg Lehni
1d37c7b76f
Use 'that' variable for private instance method.
2011-03-03 12:25:41 +00:00
Jürg Lehni
26ebe2f2c0
Refacture CompoundPath to only use injection scope for methods that require getCurrentPath().
2011-03-03 12:23:46 +00:00
Jürg Lehni
07fcc000cf
Move the new refactored CanvasDraw functionality to static Item.draw() and #draw() instance methods on each prototype.
2011-03-03 12:19:43 +00:00
Jonathan Puckey
8ff04b6614
Unify canvas drawing commands in CanvasDraw.js and rework compositing code.
2011-03-03 02:22:21 +01:00
Jonathan Puckey
74f797a9dd
Clean up whitespace.
2011-02-28 18:30:08 +01:00
Jonathan Puckey
8828ed7e25
CompoundPath - check for this.blendMode != 'normal'.
2011-02-26 01:02:17 +01:00
Jonathan Puckey
c9d04d33f8
Implement BlendMode class.
2011-02-25 12:47:52 +01:00
Jonathan Puckey
f65625b591
Change CompoundPath#moveBy to be relative to the previous position in lack of an argument.
2011-02-24 17:13:41 +01:00
Jonathan Puckey
ad82be1bec
Add CompoundPath#bounds
2011-02-24 17:11:02 +01:00
Jonathan Puckey
b9d37e1b9b
Only draw a CompoundPath if it is visible.
2011-02-21 03:52:03 +01:00
Jonathan Puckey
357a8af6ec
Clean up white spaces.
2011-02-21 03:32:39 +01:00
Jonathan Puckey
5e271359b9
Add todo.
2011-02-21 01:16:53 +01:00
Jonathan Puckey
c2849b3692
Change PathStyle, CompoundPath and Path to work with new Color classes.
2011-02-19 17:25:16 +01:00
Jonathan Puckey
bd5c906047
Fix error in CompoundPath.
2011-02-19 14:12:05 +01:00
Jürg Lehni
b14c9ae21b
For the closure injection to work properly we need an iterator function that provides a scope to the referenced key value. Rely on Base.each() for this, which even in a scaled down Bootstrap will be available and not harmful, as it won't rely on modified native prototypes.
2011-02-17 23:34:03 +00:00
Jürg Lehni
bc33ae8084
Add missing #closePath() to both Path and CompoundPath.
2011-02-17 23:01:18 +00:00
Jürg Lehni
4c2e1ee5c9
Optimise and simplfy CompoundPath code, by moving scope into extend() call, and only compiling one fields object inside it that is return at the end.
2011-02-17 22:58:56 +00:00
Jonathan Puckey
deb1699f13
Tidy up code.
2011-02-17 16:00:03 +01:00
Jonathan Puckey
1953c17f41
CompoundPath: move getCurrentPath into the outer scope and implement smooth and simplify.
2011-02-17 14:33:25 +01:00
Jonathan Puckey
0c1f29ce29
Implement CompoundPath and move most of PathItem into Path.
2011-02-17 13:36:40 +01:00