Jürg Lehni
61dca0b4d0
Introduce standard way of passing matrices/points to Item constructors.
2011-12-20 23:33:53 +01:00
Jürg Lehni
a21d180150
Use faster Point.create().
2011-12-20 23:32:53 +01:00
Jürg Lehni
a1ec8b7db1
Fix PointText#point test.
2011-12-20 23:32:28 +01:00
Jürg Lehni
f2d7b85616
Introduce Matrix#setIdentity().
2011-12-20 23:14:30 +01:00
Jürg Lehni
a8392fbf68
Implement local caching for the calculation of concatenated global matrices in the drawing of selected items in Project#draw().
2011-12-20 23:09:49 +01:00
Jürg Lehni
16113d5462
Declare all Character/ParagraphStyle properties that change GEOMETRY.
...
Fixing a failing test that showed up after debugging code was removed in recent commit, which disabled speed optimisations.
2011-12-20 22:37:46 +01:00
Jürg Lehni
0fcee7d8df
Move _owner / _style declarations to the top.
2011-12-20 22:36:24 +01:00
Jürg Lehni
8888ca912a
The internal Item#_position is no longer a LinkedPoint.
...
Make sure it stays that way when it's kept up-to-date in Item#transform().
2011-12-20 22:35:06 +01:00
Jürg Lehni
0592038b9f
Remove debugging code that lead to slow-down regressions.
2011-12-20 22:34:08 +01:00
Jürg Lehni
e59f076992
Now that Path#strokeBounds produces correct results, the tests need fixing too.
2011-12-20 22:04:55 +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
010209c70f
Pass on view matrix to Project#draw.
...
So selection drawing is not zoomed.
2011-12-20 11:41:23 +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
89a1d2fe73
Define Item#globalMatrix.
...
For now uncached.
2011-12-20 11:39:36 +01:00
Jürg Lehni
5797b78c2c
Clean up Matrix concatenation code.
2011-12-20 11:39:10 +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
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
e30a0ae26d
Define CharacterStyle#getFontStyle()
...
And use it in PointText.
2011-12-19 23:05:22 +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
ea0eaf04ea
Make TextItem#style a reference to #characterStyle.
...
Internally, CharacterStyle extends PathStyle and is now stored in TextItem#_style.
2011-12-19 22:26:09 +01:00
Jürg Lehni
19429d9b6d
Automate generation of style accessors through Style class.
...
Shaving off some byes by adding more magic.
2011-12-19 22:14:10 +01:00
Jürg Lehni
9e79514b54
Add documentation about observed discrepancy between TextItem#characterStyle and #style.
2011-12-19 22:03:36 +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
e89b2e5be1
Remove recursive argument from Item#applyMatrix().
...
Always apply transforms recursively.
2011-12-19 21:20:10 +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
daa1343155
Add comment about perhaps renaming Path.Oval to Path.Ellipse.
2011-12-19 13:16:29 +01:00
Jürg Lehni
83df011e1d
Add missing colon.
2011-12-19 13:16:06 +01:00
Jürg Lehni
4514c63ed4
Merge remote-tracking branch 'origin/master'
2011-12-18 21:30:22 +01:00
Jürg Lehni
3e87eed416
Fix tests using applyMatrix() calls after bounds are changed.
...
To be decided if changing bounds should implicitly apply matrices?
2011-12-18 16:57:29 +01:00
Jürg Lehni
e1c8c48f11
Increase default type size to 12px.
2011-12-18 16:56:31 +01:00
Jürg Lehni
e52d2a08b8
Use correct flags in _changed() call.
2011-12-18 16:56:18 +01:00
Jürg Lehni
554047ae38
Expose Item#_getCachedBounds and use it in PlacedSymbol for proper handling of nested matrices.
2011-12-18 16:55:56 +01:00
Jürg Lehni
d2b1c77686
No need to call #getDefinition() internally.
...
Use private value directly.
2011-12-18 16:55:24 +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
a76d47fcf1
Merge pull request #62 from dram/update-focus-fix
...
Use break to avoid uncaught exception in View.updateFocus
2011-12-10 11:08:03 -08:00
Jürg Lehni
b0b49d027a
Remove unused parameter.
2011-12-10 20:05:26 +01:00
Jürg Lehni
c8f3f3be27
Document Base.hyphenate()
2011-12-10 19:57:18 +01:00
Jürg Lehni
bc759274a1
Improve messages in bounds tests.
2011-12-09 21:29:22 +01:00
Jonathan Puckey
7fdb01cf77
More work on Item event handling documentation.
2011-12-07 12:45:04 +01:00
Jürg Lehni
120ead209e
Define Segment#clone().
2011-12-07 11:54:41 +01:00
Jürg Lehni
566aaed0be
Define Segment#equals().
2011-12-07 11:53:07 +01:00
Xin Wang
95b3bad6dc
Use break to avoid uncaught exception.
2011-12-06 09:41:40 +08:00
Jonathan Puckey
1414500f45
First version of documentation of Item event handlers and MouseEvent.
2011-12-01 11:57:10 +01:00
Jürg Lehni
6e5e54cfe6
Change sequence of position / bounds related properties.
2011-11-30 18:36:44 +01:00
Jürg Lehni
f895d3e6fb
Fix recently introduced error in Item#setSelected().
2011-11-30 18:28:11 +01:00
Jürg Lehni
d8f0105fb2
Document support for dontLink parameter.
2011-11-30 18:19:39 +01:00
Jürg Lehni
a26bc87686
Implement support for Item#matrix in Item#draw().
2011-11-30 18:19:23 +01:00