Commit graph

3670 commits

Author SHA1 Message Date
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
hkrish
07aeadac6c Using CurveLocation objects now 2013-04-21 13:51:51 +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
163036ec72 Define unit tests for Path#contains, some are currently failing. 2013-04-20 17:25:37 -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
hkrish
9f844eb69a Changed the URL on the header 2013-04-20 19:54:45 +02: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
hkrish
cfe1bc0329 Added some complex test cases 2013-04-20 02:04:51 +02: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
8fc2a69136 Improve comment. 2013-04-19 13:52:17 -07:00
hkrish
aa9f569931 Trying getParameterOf instead of getNearestLocation.parameter 2013-04-19 22:35:36 +02:00
Jürg Lehni
fad9d8649d Update BouncingBalls.html example. 2013-04-19 13:16:22 -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
50287cde96 Update JSDoc. 2013-04-19 11:53:59 -07:00
hkrish
aabec49446 Boolean Subtraction added 2013-04-19 19:49:44 +02:00
hkrish
27eeb24c4f Compound Paths working now. Also pulled in jLehni's changes on resolving transformations on compoundpaths 2013-04-19 14:46:27 +02: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
hkrish
7b6b94fc21 Boolean Union and Intersection working 2013-04-18 20:27:19 +02: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