Commit graph

601 commits

Author SHA1 Message Date
Jürg Lehni
de739b42a8 Clean up white spaces. 2011-06-13 19:05:17 +01:00
Jürg Lehni
064f17eaec Fix default value for end in Path#removeSegments(), so the last segment gets removed too. 2011-06-13 19:00:39 +01:00
Jürg Lehni
4a23e35eee Merge remote-tracking branch 'origin/master' 2011-06-12 18:42:24 +01:00
Jürg Lehni
c341ec220a Fix white space. 2011-06-12 18:40:30 +01:00
Jürg Lehni
065777291e Fix filtering of duplace points in path fitting code. 2011-06-12 18:40:24 +01:00
Jonathan Puckey
20fc389020 Documentation: add see tag to Path#closePath(). 2011-06-10 13:33:14 +02:00
Jonathan Puckey
87c1b564d2 Document Path#lineBy(vector). 2011-06-10 13:32:37 +02:00
Jonathan Puckey
ac703f1baa Path: add example of pointToCurves(). 2011-06-10 00:07:25 +02:00
Jürg Lehni
928b7df01e Fix typo introduced in previous refactoring. 2011-06-06 17:18:22 +01:00
Jürg Lehni
046f9cef6e Add comments. 2011-06-05 23:14:36 +01:00
Jürg Lehni
2fe21586df Further simplifications of path fitter code. 2011-06-05 23:14:28 +01:00
Jürg Lehni
3a4af3f854 Rename variables forgotten in previous refactoring. 2011-06-05 23:13:45 +01:00
Jürg Lehni
b035077d31 Simplify code. 2011-06-05 23:00:33 +01:00
Jürg Lehni
9e25047b91 Further clean ups. 2011-06-05 22:09:19 +01:00
Jürg Lehni
68eb14c00d Clean up code. 2011-06-05 22:06:24 +01:00
Jürg Lehni
10e1417dc2 Check for denominator == 0 with tolerance. 2011-06-05 21:59:42 +01:00
Jürg Lehni
0366752a6f Merge remote-tracking branch 'origin/master' 2011-06-05 21:56:17 +01:00
Jürg Lehni
73a188742e Fix bug in singularity check. 2011-06-05 21:56:04 +01:00
Jürg Lehni
ee7147d58e Rename forgotten variables in previous refactoring. 2011-06-05 21:51:01 +01:00
Jonathan Puckey
b385b859f9 Merge remote branch 'origin/master' 2011-06-05 22:46:22 +02:00
Jürg Lehni
6ea63fde43 Handle case of nearly singular matrix separately. 2011-06-05 21:45:29 +01:00
Jürg Lehni
27c7248a2d Clean up and shorten code. 2011-06-05 21:44:34 +01:00
Jonathan Puckey
d2759c2371 Improve Segment constructor example. 2011-06-05 22:44:32 +02:00
Jonathan Puckey
9d4afcfe9c Add another Path#add example. 2011-06-05 22:44:01 +02:00
Jonathan Puckey
5513687daa Add Path#smooth examples. 2011-06-05 22:43:36 +02:00
Jürg Lehni
12e770c032 Merge remote-tracking branch 'origin/master' 2011-06-05 21:32:10 +01:00
Jürg Lehni
bcb5df9f04 Clean up. 2011-06-05 21:31:58 +01:00
Jürg Lehni
ca18b20785 Remove Douglas–Peucker algorithm again since it produced ackward results. 2011-06-05 21:29:19 +01:00
Jürg Lehni
42f5b5e26e Implement Douglas–Peucker algorithm for point reduction before the curve fitting. 2011-06-05 21:28:49 +01:00
Jürg Lehni
aef8dcf2d3 Check for determinant singularity and handle separately. 2011-06-05 21:27:24 +01:00
Jürg Lehni
7d2742cd94 Rename PathFitter#process() -> #fit(). 2011-06-05 21:26:01 +01:00
Jürg Lehni
4854e56e1d Filter out adjacent duplicate points. 2011-06-05 21:25:38 +01:00
Jonathan Puckey
fe901fa96b Add to and improve Path documentation. 2011-06-05 22:02:30 +02:00
Jürg Lehni
28c680ac94 Implement PathFitter and Path#pointsToCurves(). 2011-06-05 19:27:18 +01:00
Jürg Lehni
caec7599be Fix a bug with Segment constructor where two passed points with the first one having an x-coordinate of 0 would accidentaly be considered the two coordinate values for the point property. 2011-06-05 18:41:58 +01:00
Jonathan Puckey
e4eb463204 Path: document arcTo and curveTo. 2011-06-05 18:40:33 +02:00
Jonathan Puckey
14e2a61d25 Add examples to Path#arcTo docs. 2011-06-05 17:22:35 +02:00
Jonathan Puckey
ab09a44dc6 Add examples to Path#join documentation. 2011-06-05 16:12:31 +02:00
Jonathan Puckey
c10aa01de0 Fix a bug in Path#join. 2011-06-05 15:56:37 +02:00
Jonathan Puckey
5770ebc9ff Merge remote branch 'origin/master' 2011-06-05 15:04:43 +02:00
Jonathan Puckey
deec7512cc Path: fix return type in #getLocationAt documentation. 2011-06-05 15:04:34 +02:00
Jonathan Puckey
34b510bf1c Path: add examples to #getPointAt, #getNormalAt and #getTangentAt. 2011-06-05 15:00:43 +02:00
Jonathan Puckey
bb956c890f Add documentation stub for Path#arcTo(through, to) 2011-06-05 14:52:01 +02:00
Jonathan Puckey
4e0a857ee7 Fix a problem in Path#arcTo where it wasn't defaulting to a clockwise arc. 2011-06-05 14:51:37 +02:00
Jürg Lehni
b3d771a870 Remove Curve#transform() which is currently broken anyhow. 2011-06-05 13:27:39 +01:00
Jürg Lehni
e76c4e0de1 Implement Path#curvesToPoints() using the new PathFlattener class. 2011-06-05 13:21:00 +01:00
Jürg Lehni
74b9da9882 Define PathFlattener#evaluate() for curve evaluation at given offsets. 2011-06-05 13:20:20 +01:00
Jürg Lehni
c296eb0883 Fix wrong direction of tangent evaluation at t = 1. 2011-06-05 13:09:53 +01:00
Jürg Lehni
c2c5955717 Rename Curve#getCurvesValues() -> #getValues(). 2011-06-05 12:40:07 +01:00
Jürg Lehni
cb3834f41c Expose the previously private evalutate() function through Curve.evaluate(), make it work with curve value arrays, and use it the for various evaluation methods (#getPoint/Tangent/Normal). 2011-06-05 12:37:43 +01:00
Jürg Lehni
14816a872e Define Curve constructor for 8 parameters and implement Curve#getPart() that returns a new sub curve. 2011-06-05 12:36:26 +01:00
Jürg Lehni
3a0f43050e Rename length to offset. 2011-06-05 11:34:40 +01:00
Jürg Lehni
ef10c2797c Add Curve#getPart but hide for now as more work is required. 2011-06-05 11:34:24 +01:00
Jürg Lehni
b5a0979f58 Access internal Curve coordinate properties directly rather than through beans. 2011-06-05 11:33:55 +01:00
Jürg Lehni
47085e44ca Fix drawing of closed paths that was broken in recent commit. 2011-06-05 11:20:28 +01:00
Jürg Lehni
6095723e70 Fix single equal compare. 2011-06-04 21:46:48 +01:00
Jürg Lehni
90be683113 Clean up and add more comments. 2011-06-04 19:25:50 +01:00
Jürg Lehni
263fa8cbd9 Add comments. 2011-06-04 18:35:00 +01:00
Jürg Lehni
fafb6d1d76 Convert CurveFlattener to PathFlattener, which can handle drawing of parts accross curve boundaries. 2011-06-04 18:25:41 +01:00
Jürg Lehni
e097ff1303 Include copyright notice and clean up. 2011-06-04 16:12:55 +01:00
Jürg Lehni
5fa43efb79 Merge remote-tracking branch 'origin/master' 2011-06-04 16:08:52 +01:00
Jürg Lehni
6c74ace1ed Implement dashed stroke support. Work in progress. 2011-06-04 16:08:40 +01:00
Jürg Lehni
e5290c3f47 More work on Path#draw(). 2011-06-04 15:28:06 +01:00
Jürg Lehni
45a04891ee Clean up. 2011-06-04 15:16:30 +01:00
Jürg Lehni
91886211b5 Simplify Path#draw() by defining a private drawSegment() that's used to close paths too. 2011-06-04 15:16:21 +01:00
Jonathan Puckey
a96b272f7a Documentation edits. 2011-06-04 15:50:29 +02:00
Jürg Lehni
ce01d2cc59 Start implementing CurveFlattener, as required for dashing. 2011-06-04 12:40:58 +01:00
Jürg Lehni
bff3e14155 Implement a first crude version of Curve.isSufficientlyFlat() 2011-06-04 12:40:36 +01:00
Jürg Lehni
5581eefd0c Define default value of t = 0.5 in Curve.subdivide(). 2011-06-04 12:40:07 +01:00
Jonathan Puckey
5e05f38df0 Path docs: add return tag for #getLocationAt. 2011-06-03 23:06:05 +02:00
Jonathan Puckey
d77e9cfb4f Path docs: add Positions on Paths and Curves group title and temporary Path Smoothing group title. 2011-06-03 23:05:22 +02:00
Jonathan Puckey
083099a919 Add Path#closed example. 2011-06-03 23:04:18 +02:00
Jonathan Puckey
7d1297fcf4 Path#draw: Fix drawing of selected path handles. 2011-06-03 11:33:34 +02:00
Jürg Lehni
29967153c3 Clean up TODO comments... 2011-06-01 10:49:43 +01:00
Jonathan Puckey
2b8f1b71ec Documentation: use inline code tags for boolean and number values, 2011-05-31 14:28:42 +02:00
Jonathan Puckey
17fcb923ff Documentation: rearrange @example tags, improve examples, rename boolean -> Boolean and misc smaller edits. 2011-05-30 19:42:17 +02:00
Jonathan Puckey
16f521b8a2 Path.Constructors docs: move @example tags to the end of the comments and shorten the lines of the examples. 2011-05-30 17:13:19 +02:00
Jürg Lehni
9d00541987 Clean up PORT comments. 2011-05-29 19:20:10 +01:00
Jonathan Puckey
742d7f809d Segment: document #toString and #selected. 2011-05-29 16:57:48 +02:00
Jonathan Puckey
6b63bb8a36 Documention: add postscript methods to CompoundPath 2011-05-29 16:49:52 +02:00
Jonathan Puckey
41bf1f4543 CompoundPath: document #moveTo and #moveBy. 2011-05-29 16:13:30 +02:00
Jonathan Puckey
0b9c034e0d Path: document #addSegments and #insertSegments 2011-05-29 16:06:23 +02:00
Jonathan Puckey
78ab493709 Documentation: add todo to Path#add 2011-05-29 16:05:47 +02:00
Jonathan Puckey
cd76c8c0e1 Documentation: remove ^n from method names, since this isn't necessary anymore. 2011-05-28 02:18:10 +02:00
Jonathan Puckey
1520cad144 Documentation: capitalize basic types in @ tags. 2011-05-27 21:21:49 +02:00
Jonathan Puckey
8e84c79aa6 Documentation: capitalize 'string' and 'number' types. 2011-05-27 20:15:15 +02:00
Jonathan Puckey
25c3534dc1 Documentation: remove part of the constructor explanation of CurveLocation until the mentioned functions have been added. 2011-05-27 20:06:57 +02:00
Jonathan Puckey
4015b022ad Docs: use @true tag in boolean return descriptions and add Key.isDown param options. 2011-05-27 18:43:27 +02:00
Jonathan Puckey
373e14dd76 Improve CompoundPath documentation. 2011-05-27 13:54:34 +02:00
Jonathan Puckey
ca3230c1ad Documentation: reorder functions, add group titles and todos. 2011-05-27 13:28:13 +02:00
Jürg Lehni
397d3676ed Merge remote-tracking branch 'origin/master' 2011-05-26 21:00:05 +01:00
Jonathan Puckey
6b611add37 More documentation edits and function reordering. 2011-05-26 20:09:25 +02:00
Jonathan Puckey
65fa7fb01d Path documentation: use Type[] for 'typed' arrays. 2011-05-26 16:50:13 +02:00
Jürg Lehni
8130ee458f Rename #_countSelectedSegment() to #_updateSelection(). 2011-05-26 11:52:28 +01:00
Jürg Lehni
3e7806ae50 Move #_countSelectedSegment(). 2011-05-26 11:38:26 +01:00
Jürg Lehni
e31081f2fc Use Path#_countSelectedSegment() in #removeSegments() as well. 2011-05-26 11:38:08 +01:00
Jürg Lehni
c67209f889 Optimize Curve#initialize for minifying. 2011-05-26 11:09:02 +01:00
Jürg Lehni
362eca7061 Further optimize Segment#initialize for minifying. 2011-05-26 11:08:07 +01:00
Jürg Lehni
d8fbca0d68 Shorten Segment#_changed(). 2011-05-26 11:04:57 +01:00
Jürg Lehni
5b6bc1263c Allow selection state of Segments to be changed before they are added to a Path (Part two of fixing selection cloning). 2011-05-26 10:59:22 +01:00
Jürg Lehni
2d218dbb19 Change and optimise the way SegmentPoints are created, so that selected state is actually copied over properly (Part one of fixing selection cloning). 2011-05-26 10:58:16 +01:00
Jonathan Puckey
26aa3c00d7 Add CurveLocation documentation. 2011-05-23 17:39:26 +02:00
Jonathan Puckey
0e63f11b72 Add Curve documentation. 2011-05-23 17:24:57 +02:00
Jonathan Puckey
a389be30cf Add Path.Constructors documentation. 2011-05-23 14:33:22 +02:00
Jonathan Puckey
2a4f5b93f0 Path documentation: whitespace. 2011-05-23 13:37:40 +02:00
Jonathan Puckey
211635f206 Cleanup last commit. 2011-05-23 04:20:11 +02:00
Jonathan Puckey
6db1f6c54c Documentation: ignore various classes. 2011-05-23 04:18:21 +02:00
Jonathan Puckey
349e4023f3 CompoundPath documentation: adjust constructor docs. 2011-05-23 01:53:57 +02:00
Jonathan Puckey
ae6606e11c Add CompoundPath docs. 2011-05-23 01:49:01 +02:00
Jonathan Puckey
06a6d5cc70 Add documentation to Segment. 2011-05-23 00:42:22 +02:00
Jonathan Puckey
5cea863ccb Add documentation to Path. 2011-05-23 00:26:08 +02:00
Jonathan Puckey
469f72d36f Remove todo. 2011-05-21 21:39:27 +02:00
Jonathan Puckey
7cdacc5536 Optimize Segment#initialize for minification. 2011-05-21 19:21:13 +02:00
Jürg Lehni
2b5d648e96 Change SegmentPoint.create() to copy over selected state from a provided other point or object. 2011-05-21 14:27:29 +01:00
Jürg Lehni
b15eecc34d Use new internal Item#_clone() to improve Path#clone() and PointText#clone(). 2011-05-20 08:54:44 +01:00
Jürg Lehni
7401e42316 Implement #clone() for Item, Group and Path. Needs testing. 2011-05-19 21:56:23 +01:00
Jürg Lehni
2dcb09a662 Define Path#clone(). 2011-05-19 21:34:19 +01:00
Jürg Lehni
09612c4623 Remove the versions of #clone() that follow the scheme provided by Base#clone() now. 2011-05-19 18:35:38 +01:00
Jürg Lehni
ac213e94b4 Fix bug introduced in recent change to #getStrokeBounds(): We need to pass matrix as optional argument to #getBounds(). 2011-05-18 21:32:00 +01:00
Jonathan Puckey
0a385d56a7 Replace accidental beans access with direct access of internal property. 2011-05-18 20:22:57 +02:00
Jonathan Puckey
b4807b9b7c Fix Path#getStrokeBounds: use Path#getBounds when no strokeColor or strokeWidth are set. 2011-05-18 20:08:10 +02:00
Jonathan Puckey
241d98a1cf Merge remote branch 'origin/master' 2011-05-18 16:01:36 +02:00
Jonathan Puckey
8810563a8f Improve Raster#getAverageColor. 2011-05-18 16:00:55 +02:00
Jürg Lehni
eafc0d202e Add comment about #clockwise magic happening in #append*() methods. 2011-05-16 20:17:14 +01:00
Jürg Lehni
34110fa82d Move #_setStyle() closer to the related styles hash. 2011-05-16 19:19:18 +01:00
Jürg Lehni
c8c47bf641 get styles directly from _style object rather than passing through getters on Item. 2011-05-16 18:57:47 +01:00
Jonathan Puckey
4ad47ed3aa Fix accidental internal bean access to #fillColor and #strokeColor in Path#_transform. 2011-05-16 15:11:13 +02:00
Jürg Lehni
cfe968d30e Rename Document -> Project, DocumentView -> ProjectView, paper.document -> paper.project and paper.documents -> paper.projects, to avoid name clashing with window.document. 2011-05-16 13:33:15 +01:00
Jürg Lehni
a601cfdd6d Clear the indices and path references of the removed segments. 2011-05-16 01:37:31 +01:00
Jürg Lehni
3a15360efc Rename ChangeFlags.PATH to GEOMETRY. 2011-05-16 00:01:06 +01:00
Jürg Lehni
ebdf5a2dfd Shorten CompoundPath#moveBy(). 2011-05-15 19:58:09 +01:00
Jürg Lehni
54161f81f1 Add expected parameters to function signature. 2011-05-15 19:57:48 +01:00
Jürg Lehni
c4c4f51eb9 Shorten getCurrentPath(). 2011-05-15 19:31:25 +01:00
Jürg Lehni
7ba2fcad2a Allow passing of Paths to CompoundPath constructor as arguments, without an array object. 2011-05-15 19:14:09 +01:00
Jürg Lehni
c9d0f982c2 Don't set _clockwise in Path#isClockwise(), as it should only be set once the use explicitely does so. 2011-05-15 19:02:50 +01:00
Jürg Lehni
4cee442a05 Rename items parameter to paths. 2011-05-15 18:05:47 +01:00
Jürg Lehni
3d76034600 Use Path#setClockwise() in CompoundPath constructor to reverse top path so that the others appear as holes cut out from it. 2011-05-15 18:05:00 +01:00
Jürg Lehni
813b70c70b Update comment a bit to make code more clear. 2011-05-15 17:59:57 +01:00
Jürg Lehni
40c988b313 Add Path#is/setClockwise(), as a way to check and define a path's orientation. 2011-05-15 17:59:06 +01:00
Jürg Lehni
252a3635dc Replace {@true} tags in documentation ({@true ([^}]*)} -> true $1, false otherwise.) 2011-05-15 15:06:10 +01:00
Jürg Lehni
c91cbe2175 Merge remote-tracking branch 'origin/master' 2011-05-15 14:37:34 +01:00
Jürg Lehni
057b71ff4c Don't overuse variable chaining - use only were readibility does not suffer. 2011-05-15 14:29:00 +01:00
Jonathan Puckey
1a82ef4a34 Merge remote branch 'origin/master' 2011-05-15 14:09:57 +02:00
Jürg Lehni
51dbd85db5 Add experimental orientation detection for Paths. 2011-05-15 11:33:09 +01:00
Jonathan Puckey
42ae3ce42e CompoundPath#draw: set param.compound to false when done drawing. 2011-05-14 20:36:58 +02:00
Jürg Lehni
0bab694a01 Rename Item#children to private Item#_children and add #getChildren getter. 2011-05-14 18:07:10 +01:00
Jonathan Puckey
2bfe42da05 Have the CompoundPath constructor reverse the segments of all paths passed to it except for the first one. Introduce 'keepDirection' option to allow importing of already existing CompoundPath items. 2011-05-14 13:03:18 +02:00
Jonathan Puckey
032d19b0d2 Fix bug in CompoundPath where toCssString was being called instead of getCanvasStyle, resulting in problems when gradients were used. 2011-05-12 15:30:56 +02:00
Jonathan Puckey
bbccb25184 Transform gradient when path is transformed. 2011-05-08 14:05:47 +01:00
Jürg Lehni
2f4f003873 Have Base.read() clone owned objects such as SegmentPoint or LinkedPoint. 2011-05-08 13:38:09 +01:00
Jürg Lehni
327515a9de Add missing header. 2011-05-08 09:59:37 +01:00
Jürg Lehni
70d0dd9c0c Move #moveTo() to the same scope as the other drawing commands, and add explaining comments. 2011-05-07 17:11:06 +01:00
Jürg Lehni
979bda52ab We don't need the empty #initialize(). 2011-05-07 17:05:42 +01:00
Jürg Lehni
8c7b253bc2 Add Base.splice() to handle lists of items with _index referneces and use it for paper.documents and Item#children. 2011-05-07 16:11:05 +01:00
Jürg Lehni
b44e796475 Make sure getters dont return undefined but null instead. 2011-05-07 16:10:38 +01:00
Jürg Lehni
81c1b2dcce Clean up Path#_add() a bit. 2011-05-07 15:38:36 +01:00
Jürg Lehni
59e2783979 Use tripple equal operators for string compares now. 2011-05-07 14:32:27 +01:00
Jürg Lehni
4e6e855461 Change '// TODO: Port' comments to '// PORT:'. 2011-05-07 14:18:27 +01:00
Jürg Lehni
dabc2b97ed Implement change-notification in a proper way, using ChangeFlags that tell it what exactly has changed, and clearing caches accordingly. 2011-05-07 13:39:17 +01:00
Jürg Lehni
53cc1cd908 Apply #position optimisation through caching to all items, not just PlacedSymbol. 2011-05-07 13:13:19 +01:00
Jürg Lehni
6af787e475 Move access to Numerical.TOLERANCE out of the injection scope into getBounds(), so util files can be included at the end of the library again. 2011-05-07 11:23:46 +01:00
Jürg Lehni
0fc7216f1c Fix typos introduced in recent commit. 2011-05-06 13:40:43 +01:00
Jürg Lehni
c36db3a55c Introduce private faster Matrix#_transform* methods that lack arguments checks, and use them internally. 2011-05-06 13:28:35 +01:00
Jürg Lehni
aed1bb0878 Use Numerical.TOLERANCE instead of hardcoded one. 2011-05-06 12:06:05 +01:00
Jürg Lehni
66602c9cec Remove comment about necessity to reverse coordinate system. 2011-05-06 01:27:47 +01:00
Jürg Lehni
0b082289a6 Simplify Path#arcTo() a lot (get rid of necessity to reverse coordinate system in y-direction, etc). 2011-05-06 01:26:23 +01:00
Jürg Lehni
18ef19649c Remove comment about unnecessary change. 2011-05-06 00:45:46 +01:00
Jürg Lehni
680ae49ec8 Clean up code a bit and add comment about possible further optimsiations. 2011-05-06 00:44:54 +01:00
Jürg Lehni
a3065a59d1 Simplify Path#arcTo(). 2011-05-06 00:42:10 +01:00
Jürg Lehni
a4b37a6278 Simplify addJoin(). 2011-05-06 00:39:44 +01:00
Jürg Lehni
a3da96e8be Remove notify parameter again from _add(). 2011-05-06 00:18:56 +01:00
Jürg Lehni
20cf32d599 Resolve question about wether last segment should be included in join or not. 2011-05-06 00:14:09 +01:00
Jürg Lehni
93fe0216d2 Add Path#addSegment(s) and #insertSegment(s) and define #add() and #insert() as a switch between these versions based on the amount and nature of parameters. 2011-05-05 12:35:14 +01:00
Jürg Lehni
7894a48ace Add parameter to Path#_add() that controls wether path is notified of change. 2011-05-05 11:40:46 +01:00
Jürg Lehni
ee6d593620 Cache strokeBounds and bounds only if no transformation matrix is passed. 2011-05-05 11:21:09 +01:00
Jürg Lehni
1279e820aa Use arc() instead of rect() to draw handles. 2011-05-05 11:01:20 +01:00
Jürg Lehni
bc80c58558 Add Base.formatNumber() to format numbers in the same way as Scriptographer (precision of up to 5 fractional digits) and use it in the various #toString() functions. 2011-05-04 19:42:50 +01:00
Jürg Lehni
a5099fd51d Add support for insertion of multiple segments at once to Path#_add(), #add() and #insert(), and change code that relies on these methods. 2011-05-04 18:42:40 +01:00
Jürg Lehni
728bf0441c Clean up Path#moveTo() and #lineTo() commands. 2011-05-03 09:12:07 +01:00
Jürg Lehni
52a73e86ce Clean up code (for() -> for ()). 2011-05-03 08:54:13 +01:00
Jürg Lehni
3af24e6178 Replace hidden getter call with direct access of internal property. 2011-05-03 08:47:52 +01:00
Jürg Lehni
a0e211c691 Big refactoring of how curves are kept in sync with segments (direct references rather than indices), along with various tests. 2011-05-03 00:25:23 +01:00
Jonathan Puckey
2ee7081c14 Merge remote branch 'origin/master' 2011-05-02 12:25:32 +02:00
Jonathan Puckey
41120cf4d9 Various small code cleanups. 2011-05-02 12:23:42 +02:00
Jürg Lehni
98ab342235 Shorten #_transformCoordinates() a bit. 2011-05-02 08:59:51 +01:00
Jürg Lehni
26b70309a8 Improve various #toString() functions. 2011-05-02 08:57:55 +01:00
Jürg Lehni
0a4150a5c9 Add beginning of value caching (_length, _bounds) and change tracking to invalidate cached values. 2011-05-02 00:17:21 +01:00
Jürg Lehni
2cdb15f2d6 Fix recently renamed functions in commented out code. 2011-05-01 23:29:15 +01:00
Jürg Lehni
b0282b9bd4 Change Segment to be aware of its index in the segment list and have the curves list update automatically on each change to segments. 2011-05-01 13:27:53 +01:00
Jürg Lehni
0680a50fd2 Fix yet another two bugs in CurveLocation. 2011-05-01 13:18:36 +01:00
Jürg Lehni
08e779d560 Fix two bugs in CurveLocation. 2011-05-01 13:16:25 +01:00
Jürg Lehni
6bbfd55240 Clean up Path#setSegments and begin moving of logic to keep Path#curves in sync away from Path#getCurves() to Path#setClosed(). Requires more work, e.g. Path#_add(). 2011-04-30 23:44:37 +01:00
Jürg Lehni
6cca355e20 Add Curve.create() as faster internal constructor. 2011-04-30 23:29:10 +01:00
Jürg Lehni
053fb2d955 Move Path#get/setSegments back to top and remove test-code for array object extension. 2011-04-30 23:24:39 +01:00
Jürg Lehni
781b315808 Add getter/setter for Path#closed. 2011-04-30 23:22:29 +01:00
Jürg Lehni
bf3bd13540 Simplify Path#cubicCurveTo(). 2011-04-30 23:17:19 +01:00
Jürg Lehni
6d84dc3351 Segment#isSelected() only checks for selection state of point. We need to check _selectionState instead to mirror behaviour in #_setSelected(). 2011-04-28 19:04:00 +01:00
Jürg Lehni
d098c6e8b2 Fix index issue in #removeSegments(). 2011-04-28 19:03:05 +01:00
Jürg Lehni
121ec5a93f Allow #removeSegments() to be called without arguments, in which case all segments are removed. 2011-04-28 19:02:34 +01:00
Jürg Lehni
ea510c2403 Separate Path#remove(), #remove(index) & #remove(from, to) into #removeSegment(index) and #removeSegments(from, to). 2011-04-28 15:42:16 +01:00