Jürg Lehni
588abe7189
Only test for fill in Item#_hitTest() if options.fill is set.
2013-07-19 17:55:31 -07:00
Jürg Lehni
f466473bfb
Add support for shadows.
...
Closes #36 .
2013-07-19 17:48:29 -07:00
Jürg Lehni
94c192495a
Add support for canvas compositing modes to Item#blendMode.
...
Closes #159 .
2013-07-19 15:23:16 -07:00
Jürg Lehni
175091a69f
Allow combinations of blendMode and opacity.
...
Closes #259 .
2013-07-19 11:46:13 -07:00
Jürg Lehni
47768779b7
Fix blurriness in Item#rasterize().
...
Closes #258 .
2013-07-18 20:06:22 -07:00
Jürg Lehni
affb44e0dd
Prevent double execution of onLoad event on Raster.
2013-07-03 19:02:29 -07:00
Jürg Lehni
e87307af41
Fix issue with Image.onLoad() events.
...
naturalWidth/Height seems unreliable.
2013-07-03 18:49:05 -07:00
Jürg Lehni
fdfb7abe58
Update exportSVG() documentation.
2013-06-27 18:14:51 -07:00
Jürg Lehni
09f04a597f
Write documentation for Shape constructors.
2013-06-27 18:04:02 -07:00
Jürg Lehni
41746d2d25
Docs: Write documentation for #import/export JSON/SVG, for both Item and Project.
2013-06-27 18:03:49 -07:00
Jürg Lehni
0c9914285f
Return Raster#size as a LinkedSize.
2013-06-27 16:06:11 -07:00
Jürg Lehni
9311b38894
Define Shape#size and #radius.
2013-06-27 16:05:44 -07:00
Jürg Lehni
3d5ae373a8
Remove static create() methods from LinkedPoint/Size/Rectangle, and give them initialize() methods instead that also name the classes in debugging.
2013-06-25 09:41:55 -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
f56794bad4
Remove global variable leakage.
2013-06-24 04:52:13 -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
dff39dff78
Use local bounds for hit-testing.
...
Fixes issue #247 .
2013-06-23 19:49:36 -07:00
Jürg Lehni
9f7167a47f
Clean up Item#hitTest() code.
2013-06-23 19:01:48 -07:00
Jürg Lehni
58f697abfc
Fix hit-testing for guides.
2013-06-23 19:01:36 -07:00
Jürg Lehni
76426c4cb3
Take #visible state into account when hit-testing.
...
Closes #243 .
2013-06-23 17:55:14 -07:00
Jürg Lehni
719b9d5e24
Move logic that determines if item can be directly composited into separate per-item #_canComposite() method.
2013-06-19 08:22:08 -07:00
Jürg Lehni
3d78e3729d
Fix issue with PaperScript and array[i++] expressions.
2013-06-18 18:18:39 -07:00
Jürg Lehni
b532390d9c
Remove Clip class again.
...
Group can handle that.
2013-06-18 15:58:58 -07:00
Jürg Lehni
177229f99f
Define Group#transformContent as a boolean to control #applyMatrix() behavior.
...
And use it for SVG Import.
2013-06-18 15:57:30 -07:00
Jürg Lehni
f758fb306b
Rename #_applyMatrix to #_transformContent.
...
And swap names with private function...
2013-06-18 15:50:11 -07:00
Jürg Lehni
d7d6da0af8
Pass right value for dontNotify.
2013-06-18 15:47:14 -07:00
Jürg Lehni
f433423789
Respect _applyMatrix setting when calling #applyMatrix() in Group#_changed.
...
Required for Clip to work correctly.
2013-06-18 15:39:46 -07:00
Jürg Lehni
75acdf1025
Add support for direct drawing of native blendModes for items that allow it.
...
Bypassing compositing into separate canvases completely.
2013-06-18 14:18:57 -07:00
Jürg Lehni
ad6124cf98
Take strokeWidth into account in Item#hasStroke()
2013-06-18 14:08:48 -07:00
Jürg Lehni
f4f97cda88
Fix a bug with wrong offsets when rendering nested clips and blend-modes.
...
And streamline blend-mode and opacity rendering code.
2013-06-18 12:35:57 -07:00
Jürg Lehni
414ac1d092
Fix offset in direct blitting of nested Clip items.
2013-06-18 12:20:21 -07:00
Jürg Lehni
f350f34eb4
Apply clipping fix not only to blend modes but any operation that draws into a separate canvas.
2013-06-17 16:22:23 -07:00
Jürg Lehni
ab2bfe2d40
Rename nativeDash to dash.
2013-06-17 15:52:16 -07:00
Jürg Lehni
d6db007765
Fix documentation warning.
2013-06-13 15:57:12 -07:00
Jürg Lehni
ae474131cc
Implement stroke hittesting for Shape.Rectangle.
2013-06-13 10:40:54 -07:00
Jürg Lehni
48fa889e0d
Start implementing proper hit-testing for Shapes with strokes.
...
Support for Shape.Rectangle is still missing.
2013-06-13 10:31:21 -07:00
Jürg Lehni
40dbe7ec74
Fix drawing of Shape.Ellipse items.
2013-06-13 10:30:54 -07:00
Jürg Lehni
7f6ac3d8af
Changing HIERARCHY also changes GEOMETRY.
...
Fixes #237 .
2013-06-13 08:47:45 -07:00
Jürg Lehni
5250281ab1
Fully support object literal arguments in Shape constructors.
2013-06-12 20:13:39 -07:00
Jürg Lehni
95ecab8a6f
Improve handling of merged CompoundPath style through #getStyle().
...
Only access _style directly in core code if you really know what you're doing!
2013-06-12 20:12:08 -07:00
Jürg Lehni
33eb750586
Simplify Path#hasFill() and implement #hasStroke() as well.
2013-06-12 19:57:05 -07:00
Jürg Lehni
fe10c99d1b
Implement standard behavior of #_hitTest() for items without children, based on #_contains().
...
This should cover the minimum of what's needed for PointText.
2013-06-12 19:30:23 -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
8c596927fb
Store _removeSets per project, not globally.
2013-06-12 13:50:05 -07:00
Jürg Lehni
94e07e77f0
Redraw clipItem when drawing into separate canvas for blend-modes.
...
Closes #228 .
2013-06-11 20:41:20 -07:00
Jürg Lehni
20f7c567aa
Use Base objects for drawing params, so we can use param.extend() on them for easier overriding.
2013-06-11 20:40:44 -07:00
Jürg Lehni
d76d573eb2
Reset transformation matrix when blitting off-screen canvas.
...
Closes #233 .
2013-05-29 13:52:47 -07:00
Jürg Lehni
0e2ae48b02
Fix regressions in Raster caused by faulty merge.
2013-05-28 13:54:47 -07:00
Jürg Lehni
73351cbda7
Store data in _data rather than on the image itself.
2013-05-28 08:10:51 -07:00
Jürg Lehni
c75a98c406
Clean up @trankek's fix for node a bit.
...
Fix prepro.js conditionals.
2013-05-28 08:05:40 -07:00
Jürg Lehni
e0856a0d31
Merge branch 'master' of https://github.com/tranek/paper.js into tranek-master
...
Conflicts:
src/item/Raster.js
2013-05-28 08:00:01 -07:00
Jürg Lehni
6fa6c022c9
Rename options.server to options.node
2013-05-28 00:01:55 -07:00
Jürg Lehni
cd7db56249
Remove all create() constructors for basic types since new constructors are now faster.
...
Woop!
2013-05-27 23:57:31 -07:00
Jürg Lehni
4e6f52c20c
Remove need for _needsRedraw() calls by replacing it with a boolean flag.
2013-05-27 23:40:23 -07:00
Jürg Lehni
fd3f698fe9
Apply "pending" matrix in group when it receives content.
2013-05-27 23:13:20 -07:00
Jürg Lehni
9b0d32651f
Move main Item insertion code from #insertChild() to #insertChildren().
...
Handles insertion and change notification much more efficiently.
2013-05-27 20:06:30 -07:00
Jürg Lehni
73388d6f9c
Fix documentation warning.
2013-05-27 18:30:57 -07:00
Jürg Lehni
e516e6f651
Only reset matrices in Groups when it could actually be applied to the content.
...
That way, empty groups in SVGImport still keep their transformation state.
2013-05-27 15:42:16 -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
369b329b23
Change straps.js to directly use initialize() as constructor function rather than redirecting calls to it.
...
Should yield some interesting performance improvements.
2013-05-27 09:11:50 -07:00
Jürg Lehni
094e35f2e5
No need for separate injection object for Item.extend()
2013-05-27 08:16:34 -07:00
Jürg Lehni
7f00ef8f05
Fix white-spaces.
2013-05-24 22:25:22 -07:00
tranek
1637127e09
Fixed data URLs src disappearing
2013-05-24 20:55:59 -04:00
tranek
cd7938e363
Fixed string equals in Raster data URL for Node.js
2013-05-24 16:41:02 -04:00
tranek
269b93e888
Added data URLs for Rasters in Node.js
2013-05-24 16:38:43 -04:00
Jürg Lehni
ae416f821c
Explain the booolean argument in color getter calls, and put _matrix in local variable for better minification.
2013-05-13 19:31:41 -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
f34fe102a4
Use new alias notation for deprecated functions, wherever we can.
2013-05-06 21:01:04 -07:00
Jürg Lehni
b59a98f7ce
Add jQuery style aliases to Callback and use #on() in the examples rather than #attach().
2013-05-06 20:56:58 -07:00
Jürg Lehni
883e3ad563
Define CurveLocation#intersection as a way to retrieve the CurveLocation on the intersecting path when using Path#getIntersections().
2013-04-30 18:41:26 -07:00
Jürg Lehni
420fb49230
Speed up Raster#getPixel().
2013-04-24 18:09:58 -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
96d9b6730f
Rename Svg acronyms in API to SVG.
2013-04-23 07:19:08 -07:00
Jürg Lehni
cebeb11301
Rename Json acronyms in API to JSON.
2013-04-23 07:13:51 -07:00
Jürg Lehni
faecb7e78a
Allow creation of items when project has no layers.
2013-04-22 23:25:34 -07:00
Jürg Lehni
1b61e4333c
Implement Project#clear().
2013-04-22 22:48:36 -07:00
Jürg Lehni
885d75296d
Fix Layer#isInserted() for nested Layers.
2013-04-22 22:47:48 -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
Jürg Lehni
2fc4ff10ee
Implement Item#_contains() with local coordinates, and have Item#contains() take Item#matrix into account.
2013-04-21 08:43:05 -07:00
Jonathan Puckey
a5997dcc24
Add example to Item#contains(point) docs.
2013-04-21 13:56:29 +02:00
Jonathan Puckey
daf8d0f881
Rename 'properties' constructor parameter to 'object' in docs.
2013-04-21 13:54:31 +02:00
Jonathan Puckey
0369f5aea9
Fix mistake in example code.
2013-04-21 13:53:13 +02:00
Jürg Lehni
4b24690207
Implement Shape#contains() and define unit tests for it.
2013-04-20 20:54:06 -07:00
Jürg Lehni
2793709935
Fix wrong Shape.Circle size.
2013-04-20 20:53:40 -07:00
Jürg Lehni
db7eb65bd7
Implement Item#contains() and use it for hit-testing Rasters.
2013-04-20 20:41:52 -07:00
Jürg Lehni
bb03c72ce8
Implement Item#hasFill().
2013-04-20 20:40:20 -07:00
Jürg Lehni
acd3236989
Optimize Shape constructors by passing along point.
2013-04-20 20:24:16 -07:00
Jürg Lehni
3025c63179
Simplify Style creation.
2013-04-19 20:00:30 -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
98f7c020bd
Use Item#type instead of instanceof checks for better performance.
2013-04-19 19:27:02 -07:00
Jürg Lehni
bf9acd4499
Correct Numerical.KAPPA value.
2013-04-19 18:57:31 -07:00
Jürg Lehni
9da392a99c
Commit initial support for Shape class.
...
Hit testing is still missing.
2013-04-19 17:25:50 -07:00
Jürg Lehni
9cc0822477
Move PlacedItem#_hitTest() to PlacedSymbol#_hitTest() since it was written for symbols, and remove PlacedItem as it's an empty class now.
2013-04-19 16:40:30 -07:00
Jürg Lehni
8d99aa5f95
Handle color transformation in Item#transform() rather than Path#_applyMatrix().
...
Fixes an issue with BoucingBalls.html, now that CompoundPath#applyMatrix is true.
2013-04-19 13:13:54 -07:00
Jürg Lehni
922b9b5bd0
Rename _cloning parameter to _preserve.
2013-04-19 11:54:16 -07:00
Jürg Lehni
517b2ee27f
Inline Item.drawSelectedBounds() code.
2013-04-18 17:07:32 -07:00
Jürg Lehni
9ee8590a4d
Move Item.draw() to Item#draw().
...
Makes more sense this way.
2013-04-18 17:04:06 -07:00