Prebuilt module for commit 2237c90cabf141d1f8c25bd7ec78a0315e24c05f

This commit is contained in:
Paper.js Bot 2021-03-21 03:57:58 +00:00
parent 8b167dd000
commit 12d6ed29ba
47 changed files with 201 additions and 17634 deletions

View file

@ -1,5 +1,34 @@
# Change Log
## `0.12.15`
### Fixed
- Fix NPM installation problem with `husky` introduced in `v0.12.13`
## `0.12.13`
### Fixed
- Fix faulty positioning regression in `Item#rasterize()` (#1905).
## `0.12.12`
### Fixed
- Fix installation problems on Windows by switching from NPM to Yarn for development (#1833).
### Changed
- Change `Item#raster({ resolution, insert })` to receive options object, while remaining backward compatible.
- Change `Raster#smoothing` to support the values `'low'`, `'medium'`, `'high'`
and `'off'`. Setting to a boolean value is still supported, translating `false`
`'off'` and `true``'low'`.
### Added
- Allow reusing of raster items in `Item#rasterize({ raster })`: By providing an existing raster in `options.raster`, the raster and maybe even its underlying canvas can be reused, as long as the rasterized size doesn't change between rasterizations. This allows for big performance improvements.
## `0.12.11`
### Fixed

File diff suppressed because it is too large Load diff

View file

@ -2179,7 +2179,7 @@ circle.fillColor = Color.random();
<!-- =========================== copyright notice ========================== -->
<p class="footer">
Paper.js v0.12.11 (develop)<br>
Paper.js v0.12.15 (develop)<br>
Copyright &#169; 2011—2021 <a href="http://www.lehni.org" target="_blank">J&uuml;rg Lehni</a> &amp; <a href="http://www.jonathanpuckey.com" target="_blank">Jonathan Puckey</a>. All Rights Reserved.</p>
<div class="content-end"></div>

View file

@ -8868,7 +8868,7 @@ path.smooth();
<!-- =========================== copyright notice ========================== -->
<p class="footer">
Paper.js v0.12.11 (develop)<br>
Paper.js v0.12.15 (develop)<br>
Copyright &#169; 2011—2021 <a href="http://www.lehni.org" target="_blank">J&uuml;rg Lehni</a> &amp; <a href="http://www.jonathanpuckey.com" target="_blank">Jonathan Puckey</a>. All Rights Reserved.</p>
<div class="content-end"></div>

View file

@ -2314,7 +2314,7 @@
<!-- =========================== copyright notice ========================== -->
<p class="footer">
Paper.js v0.12.11 (develop)<br>
Paper.js v0.12.15 (develop)<br>
Copyright &#169; 2011—2021 <a href="http://www.lehni.org" target="_blank">J&uuml;rg Lehni</a> &amp; <a href="http://www.jonathanpuckey.com" target="_blank">Jonathan Puckey</a>. All Rights Reserved.</p>
<div class="content-end"></div>

View file

@ -663,7 +663,7 @@
<!-- =========================== copyright notice ========================== -->
<p class="footer">
Paper.js v0.12.11 (develop)<br>
Paper.js v0.12.15 (develop)<br>
Copyright &#169; 2011—2021 <a href="http://www.lehni.org" target="_blank">J&uuml;rg Lehni</a> &amp; <a href="http://www.jonathanpuckey.com" target="_blank">Jonathan Puckey</a>. All Rights Reserved.</p>
<div class="content-end"></div>

View file

@ -167,7 +167,7 @@
<!-- =========================== copyright notice ========================== -->
<p class="footer">
Paper.js v0.12.11 (develop)<br>
Paper.js v0.12.15 (develop)<br>
Copyright &#169; 2011—2021 <a href="http://www.lehni.org" target="_blank">J&uuml;rg Lehni</a> &amp; <a href="http://www.jonathanpuckey.com" target="_blank">Jonathan Puckey</a>. All Rights Reserved.</p>
<div class="content-end"></div>

View file

@ -231,7 +231,7 @@ path.fillColor = {
<!-- =========================== copyright notice ========================== -->
<p class="footer">
Paper.js v0.12.11 (develop)<br>
Paper.js v0.12.15 (develop)<br>
Copyright &#169; 2011—2021 <a href="http://www.lehni.org" target="_blank">J&uuml;rg Lehni</a> &amp; <a href="http://www.jonathanpuckey.com" target="_blank">Jonathan Puckey</a>. All Rights Reserved.</p>
<div class="content-end"></div>

View file

@ -264,7 +264,7 @@ function onFrame(event) {
<!-- =========================== copyright notice ========================== -->
<p class="footer">
Paper.js v0.12.11 (develop)<br>
Paper.js v0.12.15 (develop)<br>
Copyright &#169; 2011—2021 <a href="http://www.lehni.org" target="_blank">J&uuml;rg Lehni</a> &amp; <a href="http://www.jonathanpuckey.com" target="_blank">Jonathan Puckey</a>. All Rights Reserved.</p>
<div class="content-end"></div>

View file

@ -6855,7 +6855,7 @@ path.tweenFrom({ fillColor: 'red' }, { duration: 1000 });
<!-- =========================== copyright notice ========================== -->
<p class="footer">
Paper.js v0.12.11 (develop)<br>
Paper.js v0.12.15 (develop)<br>
Copyright &#169; 2011—2021 <a href="http://www.lehni.org" target="_blank">J&uuml;rg Lehni</a> &amp; <a href="http://www.jonathanpuckey.com" target="_blank">Jonathan Puckey</a>. All Rights Reserved.</p>
<div class="content-end"></div>

View file

@ -230,7 +230,7 @@
<!-- =========================== copyright notice ========================== -->
<p class="footer">
Paper.js v0.12.11 (develop)<br>
Paper.js v0.12.15 (develop)<br>
Copyright &#169; 2011—2021 <a href="http://www.lehni.org" target="_blank">J&uuml;rg Lehni</a> &amp; <a href="http://www.jonathanpuckey.com" target="_blank">Jonathan Puckey</a>. All Rights Reserved.</p>
<div class="content-end"></div>

View file

@ -6619,7 +6619,7 @@ path.tweenFrom({ fillColor: 'red' }, { duration: 1000 });
<!-- =========================== copyright notice ========================== -->
<p class="footer">
Paper.js v0.12.11 (develop)<br>
Paper.js v0.12.15 (develop)<br>
Copyright &#169; 2011—2021 <a href="http://www.lehni.org" target="_blank">J&uuml;rg Lehni</a> &amp; <a href="http://www.jonathanpuckey.com" target="_blank">Jonathan Puckey</a>. All Rights Reserved.</p>
<div class="content-end"></div>

View file

@ -130,7 +130,7 @@
<!-- =========================== copyright notice ========================== -->
<p class="footer">
Paper.js v0.12.11 (develop)<br>
Paper.js v0.12.15 (develop)<br>
Copyright &#169; 2011—2021 <a href="http://www.lehni.org" target="_blank">J&uuml;rg Lehni</a> &amp; <a href="http://www.jonathanpuckey.com" target="_blank">Jonathan Puckey</a>. All Rights Reserved.</p>
<div class="content-end"></div>

View file

@ -299,7 +299,7 @@
<!-- =========================== copyright notice ========================== -->
<p class="footer">
Paper.js v0.12.11 (develop)<br>
Paper.js v0.12.15 (develop)<br>
Copyright &#169; 2011—2021 <a href="http://www.lehni.org" target="_blank">J&uuml;rg Lehni</a> &amp; <a href="http://www.jonathanpuckey.com" target="_blank">Jonathan Puckey</a>. All Rights Reserved.</p>
<div class="content-end"></div>

View file

@ -6841,7 +6841,7 @@ function onFrame(event) {
<!-- =========================== copyright notice ========================== -->
<p class="footer">
Paper.js v0.12.11 (develop)<br>
Paper.js v0.12.15 (develop)<br>
Copyright &#169; 2011—2021 <a href="http://www.lehni.org" target="_blank">J&uuml;rg Lehni</a> &amp; <a href="http://www.jonathanpuckey.com" target="_blank">Jonathan Puckey</a>. All Rights Reserved.</p>
<div class="content-end"></div>

View file

@ -1735,7 +1735,7 @@ Array of <tt>Numbers</tt>
<!-- =========================== copyright notice ========================== -->
<p class="footer">
Paper.js v0.12.11 (develop)<br>
Paper.js v0.12.15 (develop)<br>
Copyright &#169; 2011—2021 <a href="http://www.lehni.org" target="_blank">J&uuml;rg Lehni</a> &amp; <a href="http://www.jonathanpuckey.com" target="_blank">Jonathan Puckey</a>. All Rights Reserved.</p>
<div class="content-end"></div>

View file

@ -346,7 +346,7 @@
<!-- =========================== copyright notice ========================== -->
<p class="footer">
Paper.js v0.12.11 (develop)<br>
Paper.js v0.12.15 (develop)<br>
Copyright &#169; 2011—2021 <a href="http://www.lehni.org" target="_blank">J&uuml;rg Lehni</a> &amp; <a href="http://www.jonathanpuckey.com" target="_blank">Jonathan Puckey</a>. All Rights Reserved.</p>
<div class="content-end"></div>

View file

@ -450,7 +450,7 @@
<!-- =========================== copyright notice ========================== -->
<p class="footer">
Paper.js v0.12.11 (develop)<br>
Paper.js v0.12.15 (develop)<br>
Copyright &#169; 2011—2021 <a href="http://www.lehni.org" target="_blank">J&uuml;rg Lehni</a> &amp; <a href="http://www.jonathanpuckey.com" target="_blank">Jonathan Puckey</a>. All Rights Reserved.</p>
<div class="content-end"></div>

View file

@ -189,7 +189,7 @@
<!-- =========================== copyright notice ========================== -->
<p class="footer">
Paper.js v0.12.11 (develop)<br>
Paper.js v0.12.15 (develop)<br>
Copyright &#169; 2011—2021 <a href="http://www.lehni.org" target="_blank">J&uuml;rg Lehni</a> &amp; <a href="http://www.jonathanpuckey.com" target="_blank">Jonathan Puckey</a>. All Rights Reserved.</p>
<div class="content-end"></div>

View file

@ -11766,7 +11766,7 @@ path.smooth();
<!-- =========================== copyright notice ========================== -->
<p class="footer">
Paper.js v0.12.11 (develop)<br>
Paper.js v0.12.15 (develop)<br>
Copyright &#169; 2011—2021 <a href="http://www.lehni.org" target="_blank">J&uuml;rg Lehni</a> &amp; <a href="http://www.jonathanpuckey.com" target="_blank">Jonathan Puckey</a>. All Rights Reserved.</p>
<div class="content-end"></div>

View file

@ -8630,7 +8630,7 @@ path.tweenFrom({ fillColor: 'red' }, { duration: 1000 });
<!-- =========================== copyright notice ========================== -->
<p class="footer">
Paper.js v0.12.11 (develop)<br>
Paper.js v0.12.15 (develop)<br>
Copyright &#169; 2011—2021 <a href="http://www.lehni.org" target="_blank">J&uuml;rg Lehni</a> &amp; <a href="http://www.jonathanpuckey.com" target="_blank">Jonathan Puckey</a>. All Rights Reserved.</p>
<div class="content-end"></div>

View file

@ -2690,7 +2690,7 @@ var point = maxPoint * randomPoint;</code></pre>
<!-- =========================== copyright notice ========================== -->
<p class="footer">
Paper.js v0.12.11 (develop)<br>
Paper.js v0.12.15 (develop)<br>
Copyright &#169; 2011—2021 <a href="http://www.lehni.org" target="_blank">J&uuml;rg Lehni</a> &amp; <a href="http://www.jonathanpuckey.com" target="_blank">Jonathan Puckey</a>. All Rights Reserved.</p>
<div class="content-end"></div>

View file

@ -7020,7 +7020,7 @@ function onMouseMove(event) {
<!-- =========================== copyright notice ========================== -->
<p class="footer">
Paper.js v0.12.11 (develop)<br>
Paper.js v0.12.15 (develop)<br>
Copyright &#169; 2011—2021 <a href="http://www.lehni.org" target="_blank">J&uuml;rg Lehni</a> &amp; <a href="http://www.jonathanpuckey.com" target="_blank">Jonathan Puckey</a>. All Rights Reserved.</p>
<div class="content-end"></div>

View file

@ -1296,7 +1296,7 @@ for (var i = 0; i < items.length; i++) {
<!-- =========================== copyright notice ========================== -->
<p class="footer">
Paper.js v0.12.11 (develop)<br>
Paper.js v0.12.15 (develop)<br>
Copyright &#169; 2011—2021 <a href="http://www.lehni.org" target="_blank">J&uuml;rg Lehni</a> &amp; <a href="http://www.jonathanpuckey.com" target="_blank">Jonathan Puckey</a>. All Rights Reserved.</p>
<div class="content-end"></div>

View file

@ -1171,9 +1171,9 @@ raster.on('load', function() {
</div>
<div id="setimagedata-data-point" class="member">
<div id="putimagedata-data-point" class="member">
<div class="member-link">
<a name="setimagedata-data-point" href="#setimagedata-data-point"><tt><b>setImageData</b>(data, point)</tt></a>
<a name="putimagedata-data-point" href="#putimagedata-data-point"><tt><b>putImageData</b>(data, point)</tt></a>
</div>
<div class="member-description hidden">
<div class="member-text">
@ -1204,6 +1204,37 @@ raster.on('load', function() {
</div>
</div>
</div>
<div id="setimagedata-data" class="member">
<div class="member-link">
<a name="setimagedata-data" href="#setimagedata-data"><tt><b>setImageData</b>(data)</tt></a>
</div>
<div class="member-description hidden">
<div class="member-text">
<ul class="member-list">
<h4>Parameters:</h4>
<li>
<tt>data:</tt>
<tt>ImageData</tt>
</li>
</ul>
</div>
</div>
</div>
@ -7803,7 +7834,7 @@ path.tweenFrom({ fillColor: 'red' }, { duration: 1000 });
<!-- =========================== copyright notice ========================== -->
<p class="footer">
Paper.js v0.12.11 (develop)<br>
Paper.js v0.12.15 (develop)<br>
Copyright &#169; 2011—2021 <a href="http://www.lehni.org" target="_blank">J&uuml;rg Lehni</a> &amp; <a href="http://www.jonathanpuckey.com" target="_blank">Jonathan Puckey</a>. All Rights Reserved.</p>
<div class="content-end"></div>

View file

@ -1645,7 +1645,7 @@ intersectionPath.fillColor = 'red';
<!-- =========================== copyright notice ========================== -->
<p class="footer">
Paper.js v0.12.11 (develop)<br>
Paper.js v0.12.15 (develop)<br>
Copyright &#169; 2011—2021 <a href="http://www.lehni.org" target="_blank">J&uuml;rg Lehni</a> &amp; <a href="http://www.jonathanpuckey.com" target="_blank">Jonathan Puckey</a>. All Rights Reserved.</p>
<div class="content-end"></div>

View file

@ -930,7 +930,7 @@ path.segments[2].selected = true;
<!-- =========================== copyright notice ========================== -->
<p class="footer">
Paper.js v0.12.11 (develop)<br>
Paper.js v0.12.15 (develop)<br>
Copyright &#169; 2011—2021 <a href="http://www.lehni.org" target="_blank">J&uuml;rg Lehni</a> &amp; <a href="http://www.jonathanpuckey.com" target="_blank">Jonathan Puckey</a>. All Rights Reserved.</p>
<div class="content-end"></div>

View file

@ -7354,7 +7354,7 @@ path.tweenFrom({ fillColor: 'red' }, { duration: 1000 });
<!-- =========================== copyright notice ========================== -->
<p class="footer">
Paper.js v0.12.11 (develop)<br>
Paper.js v0.12.15 (develop)<br>
Copyright &#169; 2011—2021 <a href="http://www.lehni.org" target="_blank">J&uuml;rg Lehni</a> &amp; <a href="http://www.jonathanpuckey.com" target="_blank">Jonathan Puckey</a>. All Rights Reserved.</p>
<div class="content-end"></div>

View file

@ -1816,7 +1816,7 @@ var size = maxSize * randomSize;</code></pre>
<!-- =========================== copyright notice ========================== -->
<p class="footer">
Paper.js v0.12.11 (develop)<br>
Paper.js v0.12.15 (develop)<br>
Copyright &#169; 2011—2021 <a href="http://www.lehni.org" target="_blank">J&uuml;rg Lehni</a> &amp; <a href="http://www.jonathanpuckey.com" target="_blank">Jonathan Puckey</a>. All Rights Reserved.</p>
<div class="content-end"></div>

View file

@ -910,7 +910,7 @@ var circle = new Path.Circle({
<!-- =========================== copyright notice ========================== -->
<p class="footer">
Paper.js v0.12.11 (develop)<br>
Paper.js v0.12.15 (develop)<br>
Copyright &#169; 2011—2021 <a href="http://www.lehni.org" target="_blank">J&uuml;rg Lehni</a> &amp; <a href="http://www.jonathanpuckey.com" target="_blank">Jonathan Puckey</a>. All Rights Reserved.</p>
<div class="content-end"></div>

View file

@ -302,7 +302,7 @@ for (var i = 0; i < 100; i++) {
<!-- =========================== copyright notice ========================== -->
<p class="footer">
Paper.js v0.12.11 (develop)<br>
Paper.js v0.12.15 (develop)<br>
Copyright &#169; 2011—2021 <a href="http://www.lehni.org" target="_blank">J&uuml;rg Lehni</a> &amp; <a href="http://www.jonathanpuckey.com" target="_blank">Jonathan Puckey</a>. All Rights Reserved.</p>
<div class="content-end"></div>

View file

@ -6746,7 +6746,7 @@ path.tweenFrom({ fillColor: 'red' }, { duration: 1000 });
<!-- =========================== copyright notice ========================== -->
<p class="footer">
Paper.js v0.12.11 (develop)<br>
Paper.js v0.12.15 (develop)<br>
Copyright &#169; 2011—2021 <a href="http://www.lehni.org" target="_blank">J&uuml;rg Lehni</a> &amp; <a href="http://www.jonathanpuckey.com" target="_blank">Jonathan Puckey</a>. All Rights Reserved.</p>
<div class="content-end"></div>

View file

@ -6860,7 +6860,7 @@ path.tweenFrom({ fillColor: 'red' }, { duration: 1000 });
<!-- =========================== copyright notice ========================== -->
<p class="footer">
Paper.js v0.12.11 (develop)<br>
Paper.js v0.12.15 (develop)<br>
Copyright &#169; 2011—2021 <a href="http://www.lehni.org" target="_blank">J&uuml;rg Lehni</a> &amp; <a href="http://www.jonathanpuckey.com" target="_blank">Jonathan Puckey</a>. All Rights Reserved.</p>
<div class="content-end"></div>

View file

@ -752,7 +752,7 @@ tool.onKeyDown = function(event) {
<!-- =========================== copyright notice ========================== -->
<p class="footer">
Paper.js v0.12.11 (develop)<br>
Paper.js v0.12.15 (develop)<br>
Copyright &#169; 2011—2021 <a href="http://www.lehni.org" target="_blank">J&uuml;rg Lehni</a> &amp; <a href="http://www.jonathanpuckey.com" target="_blank">Jonathan Puckey</a>. All Rights Reserved.</p>
<div class="content-end"></div>

View file

@ -437,7 +437,7 @@ function onMouseUp(event) {
<!-- =========================== copyright notice ========================== -->
<p class="footer">
Paper.js v0.12.11 (develop)<br>
Paper.js v0.12.15 (develop)<br>
Copyright &#169; 2011—2021 <a href="http://www.lehni.org" target="_blank">J&uuml;rg Lehni</a> &amp; <a href="http://www.jonathanpuckey.com" target="_blank">Jonathan Puckey</a>. All Rights Reserved.</p>
<div class="content-end"></div>

View file

@ -365,7 +365,7 @@ setTimeout(function(){
<!-- =========================== copyright notice ========================== -->
<p class="footer">
Paper.js v0.12.11 (develop)<br>
Paper.js v0.12.15 (develop)<br>
Copyright &#169; 2011—2021 <a href="http://www.lehni.org" target="_blank">J&uuml;rg Lehni</a> &amp; <a href="http://www.jonathanpuckey.com" target="_blank">Jonathan Puckey</a>. All Rights Reserved.</p>
<div class="content-end"></div>

View file

@ -1763,7 +1763,7 @@ function onMouseDown(event) {
<!-- =========================== copyright notice ========================== -->
<p class="footer">
Paper.js v0.12.11 (develop)<br>
Paper.js v0.12.15 (develop)<br>
Copyright &#169; 2011—2021 <a href="http://www.lehni.org" target="_blank">J&uuml;rg Lehni</a> &amp; <a href="http://www.jonathanpuckey.com" target="_blank">Jonathan Puckey</a>. All Rights Reserved.</p>
<div class="content-end"></div>

View file

@ -416,7 +416,7 @@
<!-- =========================== copyright notice ========================== -->
<p class="footer">
Paper.js v0.12.11 (develop)<br>
Paper.js v0.12.15 (develop)<br>
Copyright &#169; 2011—2021 <a href="http://www.lehni.org" target="_blank">J&uuml;rg Lehni</a> &amp; <a href="http://www.jonathanpuckey.com" target="_blank">Jonathan Puckey</a>. All Rights Reserved.</p>
<div class="content-end"></div>

View file

@ -2,13 +2,13 @@
<html>
<head>
<meta charset="UTF-8">
<title>Paper.js v0.12.11 (develop)</title>
<title>Paper.js v0.12.15 (develop)</title>
<base target="class-frame">
<link href="../assets/css/docs.css" rel="stylesheet" type="text/css">
</head>
<body class="reference">
<div class="reference-index">
<h1>Paper.js<span class="version">0.12.11 (develop)</span></h1>
<h1>Paper.js<span class="version">0.12.15 (develop)</span></h1>
<ul class="reference-classes"><li><a href="../classes/global.html">Global Scope</a></li>
<li>
<h2>Basic Types</h2>

View file

@ -2,7 +2,7 @@
<html>
<head>
<meta charset="UTF-8">
<title>Paper.js v0.12.11 (develop)</title>
<title>Paper.js v0.12.15 (develop)</title>
</head>
<frameset cols="230,*">
<frame src="classes/index.html" name="packageListFrame" title="All Packages">

30
dist/paper-core.js vendored
View file

@ -1,5 +1,5 @@
/*!
* Paper.js v0.12.11-develop - The Swiss Army Knife of Vector Graphics Scripting.
* Paper.js v0.12.15-develop - The Swiss Army Knife of Vector Graphics Scripting.
* http://paperjs.org/
*
* Copyright (c) 2011 - 2020, Jürg Lehni & Jonathan Puckey
@ -9,7 +9,7 @@
*
* All rights reserved.
*
* Date: Fri Mar 12 23:32:51 2021 +0100
* Date: Sun Mar 21 04:53:57 2021 +0100
*
***
*
@ -821,7 +821,7 @@ var PaperScope = Base.extend({
}
},
version: "0.12.11-develop",
version: "0.12.15-develop",
getView: function() {
var project = this.project;
@ -3907,10 +3907,11 @@ new function() {
scale = (resolution || this.getView().getResolution()) / 72,
topLeft = bounds.getTopLeft().floor(),
bottomRight = bounds.getBottomRight().ceil(),
size = new Size(bottomRight.subtract(topLeft)).multiply(scale);
raster.setSize(size, true);
boundsSize = new Size(bottomRight.subtract(topLeft)),
rasterSize = boundsSize.multiply(scale);
raster.setSize(rasterSize, true);
if (!size.isZero()) {
if (!rasterSize.isZero()) {
var ctx = raster.getContext(true),
matrix = new Matrix().scale(scale).translate(topLeft.negate());
ctx.save();
@ -3918,10 +3919,14 @@ new function() {
this.draw(ctx, new Base({ matrices: [matrix] }));
ctx.restore();
}
raster.transform(new Matrix().translate(topLeft.add(size.divide(2)))
.scale(1 / scale));
if (insert === undefined || insert)
raster._matrix.set(
new Matrix()
.translate(topLeft.add(boundsSize.divide(2)))
.scale(1 / scale)
);
if (insert === undefined || insert) {
raster.insertAbove(this);
}
return raster;
},
@ -5723,11 +5728,16 @@ var Raster = Item.extend({
rect.width, rect.height);
},
setImageData: function(data ) {
putImageData: function(data ) {
var point = Point.read(arguments, 1);
this.getContext(true).putImageData(data, point.x, point.y);
},
setImageData: function(data) {
this.setSize(data);
this.getContext(true).putImageData(data, 0, 0);
},
_getBounds: function(matrix, options) {
var rect = new Rectangle(this._size).setCenter(0, 0);
return matrix ? matrix._transformBounds(rect) : rect;

File diff suppressed because one or more lines are too long

30
dist/paper-full.js vendored
View file

@ -1,5 +1,5 @@
/*!
* Paper.js v0.12.11-develop - The Swiss Army Knife of Vector Graphics Scripting.
* Paper.js v0.12.15-develop - The Swiss Army Knife of Vector Graphics Scripting.
* http://paperjs.org/
*
* Copyright (c) 2011 - 2020, Jürg Lehni & Jonathan Puckey
@ -9,7 +9,7 @@
*
* All rights reserved.
*
* Date: Fri Mar 12 23:32:51 2021 +0100
* Date: Sun Mar 21 04:53:57 2021 +0100
*
***
*
@ -821,7 +821,7 @@ var PaperScope = Base.extend({
}
},
version: "0.12.11-develop",
version: "0.12.15-develop",
getView: function() {
var project = this.project;
@ -3910,10 +3910,11 @@ new function() {
scale = (resolution || this.getView().getResolution()) / 72,
topLeft = bounds.getTopLeft().floor(),
bottomRight = bounds.getBottomRight().ceil(),
size = new Size(bottomRight.subtract(topLeft)).multiply(scale);
raster.setSize(size, true);
boundsSize = new Size(bottomRight.subtract(topLeft)),
rasterSize = boundsSize.multiply(scale);
raster.setSize(rasterSize, true);
if (!size.isZero()) {
if (!rasterSize.isZero()) {
var ctx = raster.getContext(true),
matrix = new Matrix().scale(scale).translate(topLeft.negate());
ctx.save();
@ -3921,10 +3922,14 @@ new function() {
this.draw(ctx, new Base({ matrices: [matrix] }));
ctx.restore();
}
raster.transform(new Matrix().translate(topLeft.add(size.divide(2)))
.scale(1 / scale));
if (insert === undefined || insert)
raster._matrix.set(
new Matrix()
.translate(topLeft.add(boundsSize.divide(2)))
.scale(1 / scale)
);
if (insert === undefined || insert) {
raster.insertAbove(this);
}
return raster;
},
@ -5726,11 +5731,16 @@ var Raster = Item.extend({
rect.width, rect.height);
},
setImageData: function(data ) {
putImageData: function(data ) {
var point = Point.read(arguments, 1);
this.getContext(true).putImageData(data, point.x, point.y);
},
setImageData: function(data) {
this.setSize(data);
this.getContext(true).putImageData(data, 0, 0);
},
_getBounds: function(matrix, options) {
var rect = new Rectangle(this._size).setCenter(0, 0);
return matrix ? matrix._transformBounds(rect) : rect;

File diff suppressed because one or more lines are too long

9
dist/paper.d.ts vendored
View file

@ -1,5 +1,5 @@
/*!
* Paper.js v0.12.11-develop - The Swiss Army Knife of Vector Graphics Scripting.
* Paper.js v0.12.15-develop - The Swiss Army Knife of Vector Graphics Scripting.
* http://paperjs.org/
*
* Copyright (c) 2011 - 2020, Jürg Lehni & Jonathan Puckey
@ -9,7 +9,7 @@
*
* All rights reserved.
*
* Date: Fri Mar 12 23:32:51 2021 +0100
* Date: Sun Mar 21 04:53:57 2021 +0100
*
* This is an auto-generated type definition.
*/
@ -5502,7 +5502,10 @@ declare namespace paper {
getImageData(rect: Rectangle): ImageData
setImageData(data: ImageData, point: Point): void
putImageData(data: ImageData, point: Point): void
setImageData(data: ImageData): void
}

View file

@ -1,6 +1,6 @@
{
"name": "paper",
"version": "0.12.11",
"version": "0.12.15",
"description": "The Swiss Army Knife of Vector Graphics Scripting",
"license": "MIT",
"homepage": "http://paperjs.org",
@ -64,7 +64,7 @@
"gulp-cached": "^1.1.1",
"gulp-git-streamed": "^2.10.1",
"gulp-jshint": "^2.1.0",
"gulp-json-editor": "^2.5.4",
"gulp-json-modifier": "^1.0.0",
"gulp-prepro": "^2.4.0",
"gulp-qunits": "^2.1.2",
"gulp-rename": "^2.0.0",
@ -76,7 +76,7 @@
"gulp-whitespace": "^0.1.0",
"gulp-zip": "^5.1.0",
"husky": "^4.3.8",
"jsdom": "^16.5.0",
"jsdom": "^16.5.1",
"jshint": "^2.12.0",
"jshint-summary": "^0.4.0",
"merge-stream": "^2.0.0",
@ -90,8 +90,11 @@
"source-map-support": "^0.5.19",
"stats.js": "^0.17.0",
"straps": "^3.0.1",
"typescript": "^3.9.5"
"typescript": "^3.9.9"
},
"workspaces": [
"packages/*"
],
"resolutions": {
"graceful-fs": "4.2.2"
},

149
yarn.lock
View file

@ -937,13 +937,6 @@ __metadata:
languageName: node
linkType: hard
"commander@npm:^2.19.0":
version: 2.20.3
resolution: "commander@npm:2.20.3"
checksum: b73428e97de7624323f81ba13f8ed9271de487017432d18b4da3f07cfc528ad754bbd199004bd5d14e0ccd67d1fdfe0ec8dbbd4c438b401df3c4cc387bfd1daa
languageName: node
linkType: hard
"compare-versions@npm:^3.6.0":
version: 3.6.0
resolution: "compare-versions@npm:3.6.0"
@ -977,16 +970,6 @@ __metadata:
languageName: node
linkType: hard
"config-chain@npm:^1.1.12":
version: 1.1.12
resolution: "config-chain@npm:1.1.12"
dependencies:
ini: ^1.3.4
proto-list: ~1.2.1
checksum: caf4b96491c2ea6fc5e6e23cebc526040cf21779ffc544c705a21b788f7dc3d34bc439878dcdfae8c15830052be55d62b26acada13da1236142d3efc5b4329be
languageName: node
linkType: hard
"connect-livereload@npm:^0.4.0":
version: 0.4.1
resolution: "connect-livereload@npm:0.4.1"
@ -1305,13 +1288,6 @@ __metadata:
languageName: node
linkType: hard
"detect-indent@npm:^6.0.0":
version: 6.0.0
resolution: "detect-indent@npm:6.0.0"
checksum: ad0619414151942d278c06cd4b6b79feb96c16eebf4979ef1d03433941f1a85c9bba7daba73a73814d629923716169da5416bbc4290c232d53a2dc06f462da5f
languageName: node
linkType: hard
"detect-libc@npm:^1.0.2":
version: 1.0.3
resolution: "detect-libc@npm:1.0.3"
@ -1401,20 +1377,6 @@ __metadata:
languageName: node
linkType: hard
"editorconfig@npm:^0.15.3":
version: 0.15.3
resolution: "editorconfig@npm:0.15.3"
dependencies:
commander: ^2.19.0
lru-cache: ^4.1.5
semver: ^5.6.0
sigmund: ^1.0.1
bin:
editorconfig: bin/editorconfig
checksum: ed8491cac424b93c00b9ead7b1d67267901bc87807b3f977b328f83f118018aa216225bd05fc1aa72a5b3e76fa93e19097ee7a0b9409779864a0ceef0ed2e0ea
languageName: node
linkType: hard
"ee-first@npm:1.0.5":
version: 1.0.5
resolution: "ee-first@npm:1.0.5"
@ -2205,16 +2167,14 @@ __metadata:
languageName: node
linkType: hard
"gulp-json-editor@npm:^2.5.4":
version: 2.5.4
resolution: "gulp-json-editor@npm:2.5.4"
"gulp-json-modifier@npm:^1.0.0":
version: 1.0.0
resolution: "gulp-json-modifier@npm:1.0.0"
dependencies:
deepmerge: ^4.2.1
detect-indent: ^6.0.0
js-beautify: ^1.10.2
plugin-error: ^1.0.1
through2: ^3.0.1
checksum: e3886589a85ac994a9e7b0f269054f35d579fcd59772c38d9004435e3d3c8716b7dc756481eaa265d36451ef6c9667c5860f42ec2bbc18e54cb0dd2f8f85619f
checksum: 7fb41ff0b5a7e7184a8d3621e5b58ff8be50177da3537713a69382ceca5a274ac0b5723ddcaa67450a1a3c3d2f5e2fd18ab5a39a22302b3f3bcbf3971d79d4b5
languageName: node
linkType: hard
@ -3058,23 +3018,6 @@ __metadata:
languageName: node
linkType: hard
"js-beautify@npm:^1.10.2":
version: 1.13.5
resolution: "js-beautify@npm:1.13.5"
dependencies:
config-chain: ^1.1.12
editorconfig: ^0.15.3
glob: ^7.1.3
mkdirp: ^1.0.4
nopt: ^5.0.0
bin:
css-beautify: js/bin/css-beautify.js
html-beautify: js/bin/html-beautify.js
js-beautify: js/bin/js-beautify.js
checksum: aef240c68f116401d65e42513e16d10033b1ddf430f5a922c96e99f52d645f6c4b92d86138168413991ff58e01058906b0f5007bdb94bd35472c49499e2592f8
languageName: node
linkType: hard
"js-tokens@npm:^4.0.0":
version: 4.0.0
resolution: "js-tokens@npm:4.0.0"
@ -3089,9 +3032,9 @@ __metadata:
languageName: node
linkType: hard
"jsdom@npm:^16.5.0":
version: 16.5.0
resolution: "jsdom@npm:16.5.0"
"jsdom@npm:^16.5.1":
version: 16.5.1
resolution: "jsdom@npm:16.5.1"
dependencies:
abab: ^2.0.5
acorn: ^8.0.5
@ -3124,7 +3067,7 @@ __metadata:
peerDependenciesMeta:
canvas:
optional: true
checksum: 651e1f01ea322496f3e55210662195fc5aa9bae15dd7105f2404d8048532b2668f1194ba12f9e9df1c8947be9e1fdcf32393637d587b92b188ed9c40c4baf3ea
checksum: 383d9aafff2a481b9668fcdd64ee6bb59977cce21844a588e2de07befaf897552d4141db6c2bed739dbbb714b2bcc2dd1a2fdb5196bff0676c2d43f18d1b0139
languageName: node
linkType: hard
@ -3684,16 +3627,6 @@ __metadata:
languageName: node
linkType: hard
"lru-cache@npm:^4.1.5":
version: 4.1.5
resolution: "lru-cache@npm:4.1.5"
dependencies:
pseudomap: ^1.0.2
yallist: ^2.1.2
checksum: 6a098d23629357451d4324e1e4fefccdd6df316df29e25571c6148220ced923258381ebeafdf919f90e28c780b650427390582618c1d5fe097873e656d062511
languageName: node
linkType: hard
"lru-cache@npm:^6.0.0":
version: 6.0.0
resolution: "lru-cache@npm:6.0.0"
@ -3970,7 +3903,7 @@ __metadata:
languageName: node
linkType: hard
"mkdirp@npm:^1.0.3, mkdirp@npm:^1.0.4":
"mkdirp@npm:^1.0.3":
version: 1.0.4
resolution: "mkdirp@npm:1.0.4"
bin:
@ -4431,7 +4364,28 @@ __metadata:
languageName: node
linkType: hard
"paper@workspace:.":
"paper-jsdom-canvas@workspace:packages/paper-jsdom-canvas":
version: 0.0.0-use.local
resolution: "paper-jsdom-canvas@workspace:packages/paper-jsdom-canvas"
dependencies:
canvas: ^2.7.0
jsdom: ^16.5.1
paper: 0.12.15
source-map-support: ^0.5.19
languageName: unknown
linkType: soft
"paper-jsdom@workspace:packages/paper-jsdom":
version: 0.0.0-use.local
resolution: "paper-jsdom@workspace:packages/paper-jsdom"
dependencies:
jsdom: ^16.5.1
paper: 0.12.15
source-map-support: ^0.5.19
languageName: unknown
linkType: soft
"paper@0.12.15, paper@workspace:.":
version: 0.0.0-use.local
resolution: "paper@workspace:."
dependencies:
@ -4444,7 +4398,7 @@ __metadata:
gulp-cached: ^1.1.1
gulp-git-streamed: ^2.10.1
gulp-jshint: ^2.1.0
gulp-json-editor: ^2.5.4
gulp-json-modifier: ^1.0.0
gulp-prepro: ^2.4.0
gulp-qunits: ^2.1.2
gulp-rename: ^2.0.0
@ -4456,7 +4410,7 @@ __metadata:
gulp-whitespace: ^0.1.0
gulp-zip: ^5.1.0
husky: ^4.3.8
jsdom: ^16.5.0
jsdom: ^16.5.1
jshint: ^2.12.0
jshint-summary: ^0.4.0
merge-stream: ^2.0.0
@ -4470,7 +4424,7 @@ __metadata:
source-map-support: ^0.5.19
stats.js: ^0.17.0
straps: ^3.0.1
typescript: ^3.9.5
typescript: ^3.9.9
languageName: unknown
linkType: soft
@ -4766,13 +4720,6 @@ __metadata:
languageName: node
linkType: hard
"proto-list@npm:~1.2.1":
version: 1.2.4
resolution: "proto-list@npm:1.2.4"
checksum: e722a11c66837cab0d5b81dd3f18717b73ea068fad0ceaf71d856e82167699c632201d0a1793ea48c997f1ac8544e9af89debc5cbd389b639370bc1adfb3abb4
languageName: node
linkType: hard
"proxy-middleware@npm:^0.5.0":
version: 0.5.1
resolution: "proxy-middleware@npm:0.5.1"
@ -4780,13 +4727,6 @@ __metadata:
languageName: node
linkType: hard
"pseudomap@npm:^1.0.2":
version: 1.0.2
resolution: "pseudomap@npm:1.0.2"
checksum: 1ad1802645e830d99f9c1db97efc6902d2316b660454633229f636dd59e751d00498dd325d3b18d49f2be990a2c9d28f8bfe6f9b544a8220a5faa2bfb4694bb7
languageName: node
linkType: hard
"psl@npm:^1.1.28, psl@npm:^1.1.33":
version: 1.8.0
resolution: "psl@npm:1.8.0"
@ -5279,7 +5219,7 @@ __metadata:
languageName: node
linkType: hard
"semver@npm:2 || 3 || 4 || 5, semver@npm:^5.3.0, semver@npm:^5.6.0":
"semver@npm:2 || 3 || 4 || 5, semver@npm:^5.3.0":
version: 5.7.1
resolution: "semver@npm:5.7.1"
bin:
@ -5405,7 +5345,7 @@ __metadata:
languageName: node
linkType: hard
"sigmund@npm:^1.0.1, sigmund@npm:~1.0.0":
"sigmund@npm:~1.0.0":
version: 1.0.1
resolution: "sigmund@npm:1.0.1"
checksum: f1a6ed3c5477c5d38e43d700a8c80f3042fbffbaf98ca7aeab223f6b922d6786bdf3c51d971a19f04e044f12d97310902d1fe6a5ed9bcc41556c2a8eff0f421e
@ -6070,7 +6010,7 @@ __metadata:
languageName: node
linkType: hard
typescript@^3.9.5:
typescript@^3.9.9:
version: 3.9.9
resolution: "typescript@npm:3.9.9"
bin:
@ -6080,7 +6020,7 @@ typescript@^3.9.5:
languageName: node
linkType: hard
"typescript@patch:typescript@^3.9.5#builtin<compat/typescript>":
"typescript@patch:typescript@^3.9.9#builtin<compat/typescript>":
version: 3.9.9
resolution: "typescript@patch:typescript@npm%3A3.9.9#builtin<compat/typescript>::version=3.9.9&hash=a45b0e"
bin:
@ -6496,13 +6436,6 @@ typescript@^3.9.5:
languageName: node
linkType: hard
"yallist@npm:^2.1.2":
version: 2.1.2
resolution: "yallist@npm:2.1.2"
checksum: f83e3d18eeba68a0276be2ab09260be3f2a300307e84b1565c620ef71f03f106c3df9bec4c3a91e5fa621a038f8826c19b3786804d3795dd4f999e5b6be66ea3
languageName: node
linkType: hard
"yallist@npm:^3.0.0, yallist@npm:^3.0.3":
version: 3.1.1
resolution: "yallist@npm:3.1.1"
@ -6518,9 +6451,9 @@ typescript@^3.9.5:
linkType: hard
"yaml@npm:^1.10.0":
version: 1.10.0
resolution: "yaml@npm:1.10.0"
checksum: d4cc9f9724f8d0aebc2cf52e4e6aa7059f12d50deb54b5225d103462fb2af36e5c0bb419101ca4b1f0cd3b4db9e4139cf2c690e863ac6227648d39d6f4e2522c
version: 1.10.2
resolution: "yaml@npm:1.10.2"
checksum: 8d72062ea3dbfd8fae3d6ddd5b741c2aeb5835a31b0719bf14fac71dd84adde0829763d6fbac46387309da00af1440194c796da5efc349b0baf9de39d82ae69e
languageName: node
linkType: hard