Jürg Lehni
9ccba17fbe
Clean up white-space, comments and jshint errors.
2014-04-14 18:29:26 +02:00
Jürg Lehni
f002c633a7
Remove trailing white spaces and ensure newlines at the end.
2014-04-06 13:48:03 +02:00
Jürg Lehni
dfacc16788
Fix regular expression in Style#getFontStyle()
2014-04-03 17:19:07 +02:00
Jürg Lehni
59da291d54
Remove tabs in examples in favor of 4 spaces.
...
To remove all these annoying JSHint complaints.
2014-04-02 21:03:35 +02:00
Jürg Lehni
fa9786b344
Switch to new simpler convention for control of beans creation in straps.js
2014-04-02 20:53:18 +02:00
Jürg Lehni
8c45786759
Fix a regression in Style#fontSize.
...
Closes #432 .
2014-03-26 16:58:43 +01:00
Jürg Lehni
946e0d5b2c
Fix spelling mistakes.
2014-03-18 15:25:25 +01:00
Jürg Lehni
e998083156
Rename Shape#shape to Shape#type.
2014-03-18 12:47:54 +01:00
Jürg Lehni
0aa73d90c5
Change the way context dependent font sizes are handled by delegating handling to view.
...
Closes #425
2014-03-17 16:41:57 +01:00
Jürg Lehni
db1d87b843
Fix GradientStop.readAll() call that was omitted in the recent function signature change.
2014-03-14 15:43:16 +01:00
Jürg Lehni
86c5894822
No need to use parseFloat() in color parsing, a + does enough.
2014-03-12 23:06:13 +01:00
Jürg Lehni
737466d15c
Fix all faulty {@true} doc statements.
2014-02-26 15:39:00 +01:00
Jürg Lehni
4a95f6e4a6
Some more optimizations for JS minifier and V8.
2014-01-05 21:07:11 +01:00
Jürg Lehni
706fe2c77d
Rearrange Base.read argument sequence.
...
options are used more often than length.
2014-01-05 18:31:24 +01:00
Jürg Lehni
e3f3a9c9d2
Merge branch 'refs/heads/master' into v8-optimizations
2014-01-05 17:42:59 +01:00
Jürg Lehni
1d37944c89
Fix alpha support in new Color#toCSS() code.
2014-01-05 17:42:46 +01:00
Jürg Lehni
6cb25fafe3
Use changes in latest Straps.js to remove as many hidden parameters as possible.
...
Hidden parameters through arguments[] are bad news for JS optimizer engines.
2014-01-05 17:40:54 +01:00
Jürg Lehni
6ed264a775
No need to clamp colors in conversions, just make sure hue stays within 360°
2014-01-05 05:10:42 +01:00
Jürg Lehni
ea63d4c288
Merge branch 'refs/heads/master' into v8-optimizations
...
Conflicts:
src/core/Base.js
src/style/Color.js
2014-01-05 05:01:13 +01:00
Jürg Lehni
9dea3f3b74
Implement Color component clamping for color conversion.
2014-01-04 19:10:52 +01:00
Jürg Lehni
0dddd897ab
Remove internal clamping of color values to facilitate proper mathematical calculations with colors.
...
Clamp only when producing CSS values. Closes #271 .
2014-01-04 18:16:52 +01:00
Jürg Lehni
e22fa3a664
Update copyright notice.
2014-01-04 01:47:16 +01:00
Jürg Lehni
10aa8d7b4a
Fix accidental documentation leakage into global scope.
2013-12-28 22:34:00 +01:00
Jürg Lehni
81651a7379
Prevent V8 "assignment to parameter in arguments object" deoptimizations.
...
Some getter-like functions still need fixing, but this might require a fix in Straps.js first.
2013-12-17 23:28:55 +01:00
Jürg Lehni
3dbad9c477
Replace delete in favor of setting to undefined to prevent V8 deoptimization.
2013-12-17 23:27:48 +01:00
Jürg Lehni
d60e99c608
Minor documentation fixes.
2013-12-13 16:21:57 +01:00
Jürg Lehni
5482f2e5f7
Define the default value for Color#alpha.
2013-12-13 15:50:08 +01:00
Jürg Lehni
007b780763
Make font properties disappear in JSON.
2013-12-09 15:15:10 +01:00
Jürg Lehni
44e913201d
Switch back to instanceof checks.
...
As people are started to subclass Paper.js classes...
2013-12-09 15:04:44 +01:00
Jürg Lehni
5197dd81c5
Fix #fontWeight examples and documentation.
2013-12-09 10:17:10 +01:00
Jürg Lehni
3cd141170a
Implement Style#fontFamily and #fontWeight as a replacement for #font.
...
Closes #60 .
2013-12-08 21:12:51 +01:00
Jürg Lehni
0797202b22
Fix and improve Color documentation.
2013-12-06 20:18:47 +01:00
Jürg Lehni
fb493959d0
Fix faulty Color documentation.
2013-12-06 19:50:51 +01:00
Jürg Lehni
7e65426158
Implement Item#data cloning.
...
Closes #340 .
2013-11-28 22:27:14 +01:00
Jürg Lehni
91a5bb9f88
Remove unnecessary Color#clone() since it's doing the same as Base#clone() now.
2013-11-28 22:24:29 +01:00
Jürg Lehni
593e0d8d7f
Remove Base.merge() and use a new Straps.js feature instead.
...
A more clever Base() constructor that allows merging.
2013-11-28 22:20:00 +01:00
Jürg Lehni
d56e5552b0
Handle RGB alpha correctly.
2013-11-24 00:29:13 +01:00
Jürg Lehni
b8b02417a0
Implement proper parsing of rgb / rgba CSS strings.
2013-11-24 00:23:32 +01:00
Jürg Lehni
847529eca7
Add support for hex output to Color#toCSS()
2013-11-23 23:51:59 +01:00
Jürg Lehni
70ae7486e9
Clean up white-space.
2013-10-31 12:17:34 +01:00
Jürg Lehni
2a88042315
Handle importing of SVG gradients for shapes, and drawing of canvas gradients correctly.
...
Closes #312 .
2013-10-30 01:25:13 +01:00
Jürg Lehni
4869376c41
Fix issue with cloning gradient colors.
2013-10-30 00:41:14 +01:00
Jürg Lehni
eecf68b7c3
Clear ctx.shadowColor after ctx.fill() to avoid application to both fill and stroke.
...
Closes #314 .
2013-10-30 00:00:04 +01:00
Jürg Lehni
c43752dc3e
Use #hasFill() and #hasStroke() more broadly and avoid drawing strokes when strokeWidth is set to 0.
2013-10-29 20:05:39 +01:00
Jürg Lehni
5d0fd8f970
Implement Style#windingRule and use it in Path#contains().
2013-10-18 14:54:13 +02:00
Jürg Lehni
73d2c34088
Implement item-level #equals() method and clean up other equals methods.
2013-10-17 13:08:54 +02:00
Jürg Lehni
c2a34d9f1f
Implement an easier approach in serialization to handle the default value of leading.
2013-10-17 11:53:34 +02:00
Jürg Lehni
1eb6b49e8a
Allow serialization values to mark themselves as _default.
...
Solves unnecessarily serialized leading values.
2013-10-17 11:47:46 +02:00
Jürg Lehni
efe8bab129
Revert previous Style change.
2013-10-17 11:40:44 +02:00
Jürg Lehni
2324fbc565
Define correct style default for leading.
2013-10-17 11:14:34 +02:00
Jürg Lehni
f63cb40723
Fix SVG error in importing transformed gradients with highlights.
2013-10-16 15:09:23 +02:00
Jürg Lehni
03efd56df7
Fix strange issue on iOS 7 where a simple regular expression appears to cause a complete browser crash.
...
Closes #306 .
2013-10-10 14:47:27 +02:00
Jürg Lehni
5a45260740
Docs: Fix shadow example.
2013-09-12 15:30:07 -07:00
Jürg Lehni
19c7788617
Fix documentation irregularities.
2013-08-23 19:45:28 -07:00
Jürg Lehni
1a1c2674fd
Take Item#matrix into account when drawing gradients.
...
Closes #267 .
2013-08-14 11:27:04 -07:00
Jürg Lehni
6b19f25f4b
Fix typos in comments.
2013-08-08 15:21:35 -07:00
Jürg Lehni
f466473bfb
Add support for shadows.
...
Closes #36 .
2013-07-19 17:48:29 -07:00
Jürg Lehni
f68f1ad518
Docs: Fix some faulty object parameters.
2013-07-02 12:22:45 -07:00
Jürg Lehni
8ee52d2983
Export legacy Color constructors.
2013-07-01 06:50:20 -07:00
Jürg Lehni
d369984196
Allow math operands larger than 1 when multiplying and dividing colors.
2013-06-28 07:59:33 -07:00
Jürg Lehni
e8765d18d5
Make argument reading more flexible by introducing options object for readNull and clone, and passing it on to the constructor through this.__options for additional values.
2013-06-28 07:37:03 -07:00
Jürg Lehni
2c578d0558
Start implementing math operators for Color.
2013-06-28 07:19:53 -07:00
Jürg Lehni
22df17c192
Docs: Minor cleanups.
2013-06-28 06:41:36 -07:00
Jürg Lehni
b588f3234c
Docs: Improve documentation for Color constructors.
2013-06-28 06:41:21 -07:00
Jürg Lehni
1866e4ff15
Remove need for all special arguments in minification, and restructure code to avoid warnings.
2013-06-24 10:15:54 -07:00
Jürg Lehni
a4535edbb9
Bring back _class names, since code minification breaks reliance on constructor.name.
...
Closes #248 .
2013-06-23 20:18:32 -07:00
Jürg Lehni
db49718015
No need for white-space in CSS color format.
2013-06-18 14:33:50 -07:00
Jürg Lehni
2196ef2a74
Streamline various #equals() methods.
2013-06-12 18:57:12 -07:00
Jürg Lehni
4a8469b740
Define Base.isPlainValue() and use it to implement more flexible #equals() for Color and Rectangle.
2013-06-12 18:55:14 -07:00
Jürg Lehni
6fe60cff9d
Fix trailing comas.
2013-06-12 17:42:38 -07:00
Jürg Lehni
34ad9045cc
Fix wrong default fillColor on TextItems.
2013-06-12 17:30:35 -07:00
Jürg Lehni
b581f8b33e
Implement Style#selectedColor and Item#selectedColor as a way to control appearance of selections.
...
Closes #219 .
2013-06-12 14:17:34 -07:00
Jürg Lehni
9977ec5c28
Rename #toCss() to #toCSS()
2013-06-12 14:04:59 -07:00
Jürg Lehni
ce7d584c05
Revert readNull and clone parameter sequence in arguments reading code.
2013-06-11 19:49:35 -07:00
Jürg Lehni
72082bdcff
Fix new failing test.
2013-06-11 13:57:28 -07:00
Jürg Lehni
10d5de3ed6
Implement a better way to name and export class constructors.
...
This change also simplified the way classes are exported to PaperScope objects.
2013-05-27 12:48:58 -07:00
Jürg Lehni
c533dda7b5
Finally found a better and faster alternative for this.base() calls, by setting base on the function object instead.
...
base can be accessed on named functions very easily, leading to another measurable speed increase. Finally all performance reasons against straps.js are eliminated!
2013-05-27 10:04:05 -07:00
Jürg Lehni
7c2e57e105
Remove Item#applyMatrix boolean, go back to previous way of directly applying transformations to children in Group and Layer, and introduce new Clip class for non-transformed nested matrices.
2013-05-13 18:57:17 -07:00
Jürg Lehni
731a873884
Check for radial property as well when predicting gradient color type.
2013-05-08 20:19:40 -07:00
Jürg Lehni
fcb697264f
Make sure alpha channel is included in serialization of Color.
...
Fixes #215 .
2013-05-07 22:51:23 -07:00
Jürg Lehni
ead3646581
Handle alpha channels correctly in Raster#get/setPixel.
...
Closes #209 .
2013-04-24 16:29:28 -07:00
Jürg Lehni
6029f59494
More uppercase changes.
2013-04-23 07:29:30 -07:00
Jürg Lehni
6800a6d534
Use separate id ranges for different classes.
2013-04-22 19:09:59 -07:00
Jürg Lehni
2a53dbe60f
Restructure Color constructor to remove need for Color.create().
2013-04-22 19:07:38 -07:00
Jonathan Puckey
e4203c2e36
Improve Color documentation.
2013-04-21 15:36:20 +02:00
Jonathan Puckey
d4d1a0fdae
Improve Style example code.
2013-04-21 15:36:03 +02:00
Jonathan Puckey
191213f362
Improve GradientStop example code.
2013-04-21 15:35:45 +02:00
Jonathan Puckey
fbc3985bbf
Add Gradient class examples.
2013-04-21 15:35:31 +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
e1807214f4
Large refactoring of Style handling for notable speed improvements.
2013-04-19 19:31:29 -07:00
Jürg Lehni
bb546decae
Various improvements to Color caching mechanisms.
2013-04-19 12:51:53 -07:00
Jürg Lehni
e2a118e43e
Make sure color components cannot be anything else than numbers.
2013-04-09 17:43:18 -07:00
Jürg Lehni
fbe8a558bd
Refactor Format literal to Formatter class that keeps precision stored.
2013-04-09 17:32:19 -07:00
Jürg Lehni
8da8f116d1
Restructure style related class organization.
2013-04-09 17:08:09 -07:00
Jürg Lehni
b3b0fa649b
Minor Style refactoring clean-ups.
2013-04-09 16:51:57 -07:00
Jürg Lehni
b4a99415d0
Merge PathStyle, CharacterStyle and ParagraphStyle into Style.
...
Closes #130 .
2013-04-09 16:46:20 -07:00
Jürg Lehni
a48e6e5bf9
More work on Color refactoring.
2013-04-08 00:11:43 -07:00
Jürg Lehni
136c028d29
Increase performance of Style getters / setters.
2013-04-07 17:36:35 -07:00