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
Jürg Lehni
f5c1125709
Move Path#_setStyles() to Item, so it can be used in PointText too.
2011-12-19 21:25:39 +01:00
Jürg Lehni
466857659c
Unroll loop in Path#_setStyles().
2011-12-19 21:23:28 +01:00
Jürg Lehni
12dbb11ec3
Optimise and simplify ellipse code.
2011-12-19 13:51:26 +01:00
Jürg Lehni
3ccb4a6ebe
Fix strokeBounds calculation when a rotation matrix is in use.
...
The bounding box of the rotated pen ellipse was calculated wrongly.
2011-12-19 13:47:30 +01:00
Jürg Lehni
9e5eb17264
Improve Item#transform() and implement #applyMatrix() to support nested matrices. Work in progress.
2011-12-18 16:54:21 +01:00
Jürg Lehni
3ece08bea1
Fix handling of recursion in Item#setSelected() / #setFullySelected().
2011-11-30 17:16:52 +01:00
Jürg Lehni
b51cf064b0
Make baseItem to last optional parameter of _getBounds.
2011-11-26 11:55:19 +01:00
Jürg Lehni
f799c85e76
Switch to using 'this' in private getBounds methods to point to path item rather than 'that'.
2011-11-26 11:48:08 +01:00
Jürg Lehni
a0ad81b576
Pass on the baseItem of a getBounds call, required to implement proper caching later.
2011-11-26 11:24:48 +01:00
Jürg Lehni
569c415b2f
Start implementing bounds caching the new way.
...
Work in progress still.
2011-11-24 15:37:44 +01:00
Jürg Lehni
c989d3ee3f
Restructure code a bit for easier reading.
2011-11-24 15:18:57 +01:00
Jürg Lehni
ea87be166e
Part one of big refactoring of bouding box handling. Functional, but caching is broken right now.
2011-11-24 15:13:21 +01:00
Jürg Lehni
b96cd4e1c8
Add comments about possible optimization of accessing of style properties.
2011-11-24 14:53:38 +01:00
Jürg Lehni
3f5e68aa76
Document the private getPendPadding() function.
2011-11-24 10:21:12 +01:00
Jürg Lehni
29aaf38320
Improve comments.
2011-11-24 10:17:31 +01:00
Jürg Lehni
cd1810e6a3
Fix arguments check in Path#getHandleBounds().
2011-11-23 18:13:05 +01:00
Jürg Lehni
b9f6c99dcd
Add comments and clean up code.
2011-11-17 19:28:05 +01:00
Jürg Lehni
c8e1a9c959
Merge remote-tracking branch 'origin/master'
2011-11-12 23:57:39 +01:00
Jürg Lehni
4ba752d42a
Add note and TODO about Path#contains() only working correctly for no-zero winding rule, which is not used by Canvas...
2011-11-12 19:49:12 +01:00
Jürg Lehni
ddf7c6534b
Fix Path#hitTest() to only consider strokeWidth if a strokeColor is provided too.
2011-11-12 19:48:39 +01:00
Jonathan Puckey
52385451f6
Resolve a few documentation todos.
2011-11-12 18:30:21 +01:00
Jürg Lehni
af9df0e1b8
Provide point of hit handles and segments too in HitResult.
2011-11-11 14:47:03 +01:00
Jürg Lehni
571ca31dbf
Move ctx.restore() to same level as ctx.save(). Closes #51 .
2011-09-18 10:56:04 +02:00
Jürg Lehni
7e0307dd6a
Correct comments.
2011-08-16 13:36:58 +02:00
Jürg Lehni
a8c08b3301
Docs: Document Path#getNearestLocation() and #getNearestPoint().
2011-08-01 11:48:27 +01:00
Jonathan Puckey
53a602fb56
Path#_hitTest: check that a stroke hit test was requested.
2011-07-15 14:50:42 +02:00
Jonathan Puckey
91ab38ffd1
Path#getHandleBounds: remove optimization as it leads to problems when hit testing handles.
2011-07-15 12:58:34 +02:00
Jürg Lehni
254aee47f8
Implement Path#getLocation(point)
2011-07-09 17:12:27 +02:00
Jürg Lehni
ebd3bfc092
Introduce faster versions of Rectangle#contains() that do not perform checks.
2011-07-09 11:07:12 +02:00
Jürg Lehni
833d4968ce
Change root solvers to not produce new arrays each time but fill a passed one that can be reused. Yields io impressive performance improvements.
2011-07-09 10:50:47 +02:00
Jürg Lehni
23f38c6e5b
Fix Path#flatten(), where we don't want to add last segment again for closed paths.
2011-07-09 09:51:06 +02:00
Jürg Lehni
74b23c1882
Use #roughBounds rather than #bounds in #contains() check.
2011-07-09 09:27:54 +02:00
Jürg Lehni
0a7f5a12a5
Fix bug in 'stroke' hit-results.
2011-07-08 23:32:29 +02:00
Jürg Lehni
c033a5a7bc
Implement hit-test options: segments, handles and ends.
2011-07-08 23:26:21 +02:00
Jürg Lehni
dfbe3135ad
Remove HitResult inheritance from CurveLocation, but have a #location property pointing to it.
2011-07-08 22:25:42 +02:00
Jonathan Puckey
36be78c671
Fix small problem in Item#_hitTest.
2011-07-08 18:41:29 +02:00
Jürg Lehni
23c4499d15
Add comments about how to potentially improve getBounds() accuracy.
2011-07-07 23:00:40 +02:00
Jürg Lehni
69a7d0bfd4
Implement a first version of Item#hitTest(), so far working only for Path items. Work in progress.
2011-07-07 22:14:58 +02:00
Jürg Lehni
64ae48af0b
Remove solved TODO.
2011-07-07 16:10:06 +02:00
Jürg Lehni
e573fe5dcd
Do not pass prevSlope to Curve#getCrossings(), rely on #getPrevious() instead.
2011-07-07 16:08:10 +02:00
Jürg Lehni
4a53503130
Add support for optional matrix in Path#contains(), Path#getNearestLocation(), Curve#getValues(), Curve#getCrossings(), Curve#getNearestLocation()
2011-07-07 16:07:29 +02:00
Jürg Lehni
b13c7622c8
Rename Curve#getParameter(length) -> Curve#getParameterAt(offset)
2011-07-06 23:13:38 +02:00
Jürg Lehni
d6b666024b
Define #getNearestLocation() / #getNearestPoint() for Path.
2011-07-06 22:25:20 +02:00
Jürg Lehni
8b6d9746ce
Rename Curve#getCrossingsFor() -> #getCrossings()
2011-07-06 22:07:34 +02:00
Jürg Lehni
5c3a6f72b6
Fix comments.
2011-07-06 15:31:16 +02:00
Jürg Lehni
4110a56521
Improve comments.
2011-07-05 01:20:25 +02:00
Jürg Lehni
6cc7417201
Handle edge case in crossing number algorithm where the beam in right x-direction is touching a tip where the curves change y-direction but do not interesect with the shape, by checking for slope changes.
2011-07-05 01:15:45 +02:00
Jürg Lehni
c5269ecbab
Implement Path#contains(point) efficiently using the crossing number algorithm and our cubic polynomial solver.
2011-07-04 23:32:15 +02:00
Jürg Lehni
45a3e7f873
Big refactoring of the way bounds are handled and cached, properly supporting Groups inside Symbols, and also adding #roughBounds, to be used by upcoming hit testing code.
2011-07-04 19:45:53 +02:00