Jürg Lehni
07c0b6ce6a
Improve Path#moveTo behavior()
...
Allowing it to be called multiple times before any other drawing commands.
2012-11-03 19:45:02 -07:00
Jürg Lehni
b22ff5ecca
Revert a recent change in selection handling.
2012-11-02 16:27:59 -07:00
Jürg Lehni
f73717a7e7
Fix issues in Numerical.solveQuadratic(), solveCubic() and Path#contains().
...
Closes #71 .
2012-10-22 18:21:33 -04:00
Jürg Lehni
317fcf5432
Only include strokeWidth in roughBounds if a strokeColor is actually set.
2012-10-20 16:01:53 -04:00
Jürg Lehni
f87eadecda
Correct default value for clockwise in arcTo().
2012-10-19 09:18:10 -04:00
Jürg Lehni
6441a682a8
Fix new error in quadraticCurveTo().
...
We don't seem to have test-cases for these yet.
2012-10-18 14:29:53 -07:00
Jürg Lehni
30374ae3b4
Implement proper index independent argument list reading of basic types.
...
Implemented for Point, Size, Rectangle and Color.
2012-10-18 14:24:15 -07: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
ef59ad2875
Improve selection handling and drawing for Path item.
...
In a way that makes more sense when building tools.
2012-10-10 19:33:42 -07:00
Jürg Lehni
6b08d96c45
Fix issue where out handle was compared to the wrong segment point when drawing.
...
This should fix #106 but needs to be verified before we can close the bug.
2012-10-05 19:08:31 -07:00
Jonathan Puckey
d20fb61c7c
Cleanup code.
2012-04-25 20:47:53 +02:00
Oliver Beattie
3c7563a3bf
When a path is transformed, the _length cache of its Curves should be invalidated
2012-03-17 17:09:54 +00:00
Jonathan Puckey
c339ffca35
Close closed paths when drawing using Context#closePath(). Fixes #72
2012-03-01 23:25:00 +01:00
Jonathan Puckey
7093b73d31
Cleanup last merged pull request.
2012-03-01 17:06:39 +01:00
Alex Buchanan
f1a6357a05
Path.reverse() should adjust segment indices
2012-02-18 15:13:23 -08:00
Jürg Lehni
96f7d140a7
Use faster Point.create(x, y) internally.
2011-12-27 20:39:28 +01:00
Jürg Lehni
ad2abfb71f
Inline drawDashes() code.
2011-12-27 20:18:02 +01:00
Jürg Lehni
28806fe977
Ue the faster Matrix#_transformPoint().
...
And reuse Point objects if possible.
2011-12-26 11:06:36 +01:00
Jürg Lehni
7af06502bc
Fix Path#transform() to also return a reference to 'this'.
2011-12-25 16:39:08 +01:00
Jürg Lehni
783d2782c0
Fix wrong HitResult type when hitting Segment#point.
2011-12-25 16:38:43 +01:00
Jürg Lehni
1e690a68e0
Add TODO about HitResult points requiring transformations.
2011-12-25 12:39:10 +01:00
Jürg Lehni
3b0b1184a3
Implement checkSegment() without relying on #_transformCoordinates().
2011-12-25 12:34:51 +01:00
Jürg Lehni
c30ff47930
Remove matrix argument from all hit-testing related methods.
...
We better inverse-transform the point and save the code!
2011-12-25 00:19:01 +01:00
Jürg Lehni
98c82856ea
Override #matrix accessors in Path to do nothing.
...
For the same reasons as described in the previous commit.
2011-12-23 22:46:53 +01:00
Jürg Lehni
627961627e
Have Path always directly apply any transformation to its Segments.
...
This is required so the coordinates of its bounds, length and SegmentPoints are always in the same space.
2011-12-23 22:43:27 +01:00
Jürg Lehni
97b66582f8
Rename Item#applyMatrix() to shorter #apply().
2011-12-23 22:41:05 +01:00
Jürg Lehni
93ede28f3b
Implement new selection drawing mechanism.
...
Using the new Item#globalMatrix.
2011-12-20 11:42:00 +01:00
Jürg Lehni
daca14efb8
Add optional matrix in Path drawing code.
...
Required for new selection drawing mechanism to be implemented.
2011-12-20 11:40:31 +01:00
Jürg Lehni
42087071e7
Fix #strokeBounds for square caps.
...
Calculate the right points at both ends of paths.
2011-12-19 23:30:02 +01:00
Jürg Lehni
1e768e6c83
Fix #strokeBounds for strokes scaled using #matrix.
...
Gotta do the right thing, not the same buggy thing as Illustrator.
2011-12-19 23:21:13 +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
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