Jürg Lehni
7f8d9d9e90
Support options.tolerance in Shape#hitTest()
2013-10-29 19:17:42 +01:00
Jürg Lehni
9d60662a28
Check for the occurrence of 'radius' rather than 'center' when deciding to read a center / radius pair for ellipses.
2013-10-29 18:53:55 +01:00
Jürg Lehni
c3aed5277d
Use center and radius in all ellipse code, rather than bounding rect.
...
Simplifies things.
2013-10-29 18:10:30 +01:00
Jürg Lehni
d649b1bb21
Define insert argument for Path#toShape() and Shape#toPath()
2013-10-29 16:45:50 +01:00
Jürg Lehni
5d0fd8f970
Implement Style#windingRule and use it in Path#contains().
2013-10-18 14:54:13 +02:00
Jürg Lehni
73d2c34088
Implement item-level #equals() method and clean up other equals methods.
2013-10-17 13:08:54 +02:00
Jürg Lehni
9956a6ff51
Implement Shape#toPath(), analogue to Path#toShape().
...
This way is much simpler though.
2013-10-16 23:44:50 +02:00
Jürg Lehni
c4c7a37993
Implement Path#toShape(), Segment#isColinear(), Segment#isOrthogonal() and Segment#isArc().
2013-10-16 23:10:03 +02:00
Jürg Lehni
be5a73a61d
SVG: Implement support for Shape.
2013-10-16 16:47:00 +02:00
Jürg Lehni
8ab6c61b0d
Rename Shape#type to Shape#shape, to avoid clash with Item#type.
2013-10-16 16:46:22 +02:00
Jürg Lehni
9eb1c104da
Implement Shape#clone()
2013-10-16 15:04:50 +02:00
Jürg Lehni
b35296ef3e
Improve Shape.Ellipse to support center & radius parameters, and update documentation.
2013-10-16 15:04:37 +02:00
Jürg Lehni
2263afea59
Start implementing rounded rectangles in Shape.Rectangle.
2013-10-14 19:57:28 +02:00
Jürg Lehni
b9ba2364fe
Move Shape#isEmpty() to right place.
2013-10-14 09:15:34 +02:00
Jürg Lehni
198305b75c
Remove doc comment since Item#isEmpty() is already documented, and move it to an inline comment.
2013-10-14 09:14:59 +02:00
Oliver Jones
df7f1fe874
Override default isEmpty method for Shape
...
Fixes (new Group([new Shape.Rectangle(...)])).bounds throwing ReferenceError when using Item's isEmpty
2013-10-12 19:28:45 +01:00
Jürg Lehni
aa4d990c90
Move and unify handling of Item#_set(props) to new Item#_initialize(), and add support for props.insert = false.
2013-07-21 15:45:22 -07:00
Jürg Lehni
09f04a597f
Write documentation for Shape constructors.
2013-06-27 18:04:02 -07:00
Jürg Lehni
9311b38894
Define Shape#size and #radius.
2013-06-27 16:05:44 -07:00
Jürg Lehni
1866e4ff15
Remove need for all special arguments in minification, and restructure code to avoid warnings.
2013-06-24 10:15:54 -07:00
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
f758fb306b
Rename #_applyMatrix to #_transformContent.
...
And swap names with private function...
2013-06-18 15:50:11 -07:00
Jürg Lehni
ae474131cc
Implement stroke hittesting for Shape.Rectangle.
2013-06-13 10:40:54 -07:00
Jürg Lehni
48fa889e0d
Start implementing proper hit-testing for Shapes with strokes.
...
Support for Shape.Rectangle is still missing.
2013-06-13 10:31:21 -07:00
Jürg Lehni
40dbe7ec74
Fix drawing of Shape.Ellipse items.
2013-06-13 10:30:54 -07:00
Jürg Lehni
5250281ab1
Fully support object literal arguments in Shape constructors.
2013-06-12 20:13:39 -07:00
Jürg Lehni
fe10c99d1b
Implement standard behavior of #_hitTest() for items without children, based on #_contains().
...
This should cover the minimum of what's needed for PointText.
2013-06-12 19:30:23 -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
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
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
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
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
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
acd3236989
Optimize Shape constructors by passing along point.
2013-04-20 20:24:16 -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
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