mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-03 19:45:44 -05:00
Update docs and dist version to 0.2.
This commit is contained in:
parent
ea629fefda
commit
4fa6ffeb01
47 changed files with 4846 additions and 1903 deletions
1
dist/docs/classes/CharacterStyle.html
vendored
1
dist/docs/classes/CharacterStyle.html
vendored
|
@ -1,6 +1,7 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>CharacterStyle</title>
|
||||
<base target="classFrame">
|
||||
<link rel="stylesheet" href="../resources/css/reference.css" type="text/css">
|
||||
|
|
1
dist/docs/classes/Color.html
vendored
1
dist/docs/classes/Color.html
vendored
|
@ -1,6 +1,7 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Color</title>
|
||||
<base target="classFrame">
|
||||
<link rel="stylesheet" href="../resources/css/reference.css" type="text/css">
|
||||
|
|
78
dist/docs/classes/CompoundPath.html
vendored
78
dist/docs/classes/CompoundPath.html
vendored
|
@ -1,6 +1,7 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>CompoundPath</title>
|
||||
<base target="classFrame">
|
||||
<link rel="stylesheet" href="../resources/css/reference.css" type="text/css">
|
||||
|
@ -2554,6 +2555,83 @@ raster.scale(5);
|
|||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="hittest-point-member" class="member">
|
||||
<div id="hittest-point-link" class="member-link">
|
||||
<a name="hittest-point" href="#" onClick="return toggleMember('hittest-point', false);"><tt><b>hitTest</b>(point[, options])</tt></a>
|
||||
</div>
|
||||
<div id="hittest-point-description" class="member-description hidden">
|
||||
<div class="member-header">
|
||||
<div class="member-title">
|
||||
<div class="member-link">
|
||||
<a href="#" onClick="return toggleMember('hittest-point', false);"><tt><b>hitTest</b>(point[, options])</tt></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="member-close"><input type="button" value="Close" onClick="toggleMember('hittest-point', false);"></div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
<div class="member-text">
|
||||
<p>Perform a hit test on the item (and its children, if it is a
|
||||
<a href="../classes/Group.html"><tt>Group</tt></a> or <a href="../classes/Layer.html"><tt>Layer</tt></a>) at the location of the specified point.</p>
|
||||
<p>The optional options object allows you to control the specifics of the
|
||||
hit test and may contain a combination of the following values:</p>
|
||||
<p><b>tolerance:</b> <tt>Number</tt> - The tolerance of the hit test in
|
||||
points.</p>
|
||||
<p><b>options.type:</b> Only hit test again a certain item
|
||||
type: <a href="../classes/PathItem.html"><tt>PathItem</tt></a>, <a href="../classes/Raster.html"><tt>Raster</tt></a>, <a href="../classes/TextItem.html"><tt>TextItem</tt></a>, etc.</p>
|
||||
<p><b>options.fill:</b> <tt>Boolean</tt> - Hit test the fill of items.</p>
|
||||
<p><b>options.stroke:</b> <tt>Boolean</tt> - Hit test the curves of path items,
|
||||
taking into account stroke width.</p>
|
||||
<p><b>options.segment:</b> <tt>Boolean</tt> - Hit test for <a href="../classes/Segment.html#point"><tt>segment.point</tt></a> of
|
||||
<a href="../classes/Path.html"><tt>Path</tt></a> items.</p>
|
||||
<p><b>options.handles:</b> <tt>Boolean</tt> - Hit test for the handles
|
||||
(<a href="../classes/Segment.html#handlein"><tt>segment.handleIn</tt></a> / <a href="../classes/Segment.html#handleout"><tt>segment.handleOut</tt></a>) of path segments.</p>
|
||||
<p><b>options.ends:</b> <tt>Boolean</tt> - Only hit test for the first or last
|
||||
segment points of open path items.</p>
|
||||
<p><b>options.bounds:</b> <tt>Boolean</tt> - Hit test the corners and side-centers
|
||||
of the bounding rectangle of items (<a href="../classes/Item.html#bounds"><tt>item.bounds</tt></a>).</p>
|
||||
<p><b>options.center:</b> <tt>Boolean</tt> - Hit test the <a href="../classes/Rectangle.html#center"><tt>rectangle.center</tt></a>
|
||||
of the bounding rectangle of items (<a href="../classes/Item.html#bounds"><tt>item.bounds</tt></a>).</p>
|
||||
<p><b>options.guide:</b> <tt>Boolean</tt> - Hit test items that have
|
||||
<a href="../classes/Item.html#guide"><tt>item.guide</tt></a> set to <tt>true</tt>.</p>
|
||||
<p><b>options.selected:</b> <tt>Boolean</tt> - Only hit selected items.</p>
|
||||
|
||||
<ul><b>Parameters:</b>
|
||||
|
||||
<li>
|
||||
<tt>point:</tt>
|
||||
<a href="../classes/Point.html"><tt>Point</tt></a>
|
||||
— The point where the hit test should be performed
|
||||
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<tt>options:</tt>
|
||||
<tt>Object</tt>
|
||||
|
||||
— optional, default: <tt>{ fill: true, stroke: true, segments: true,
|
||||
tolerance: 2 }</tt>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<ul><b>Returns:</b>
|
||||
|
||||
<li>
|
||||
<tt><a href="../classes/HitResult.html"><tt>HitResult</tt></a></tt> — A hit result object that contains more
|
||||
information about what exactly was hit or <tt>null</tt> if nothing was
|
||||
hit.
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
1
dist/docs/classes/Curve.html
vendored
1
dist/docs/classes/Curve.html
vendored
|
@ -1,6 +1,7 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Curve</title>
|
||||
<base target="classFrame">
|
||||
<link rel="stylesheet" href="../resources/css/reference.css" type="text/css">
|
||||
|
|
1
dist/docs/classes/CurveLocation.html
vendored
1
dist/docs/classes/CurveLocation.html
vendored
|
@ -1,6 +1,7 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>CurveLocation</title>
|
||||
<base target="classFrame">
|
||||
<link rel="stylesheet" href="../resources/css/reference.css" type="text/css">
|
||||
|
|
1
dist/docs/classes/Event.html
vendored
1
dist/docs/classes/Event.html
vendored
|
@ -1,6 +1,7 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Event</title>
|
||||
<base target="classFrame">
|
||||
<link rel="stylesheet" href="../resources/css/reference.css" type="text/css">
|
||||
|
|
1
dist/docs/classes/Gradient.html
vendored
1
dist/docs/classes/Gradient.html
vendored
|
@ -1,6 +1,7 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Gradient</title>
|
||||
<base target="classFrame">
|
||||
<link rel="stylesheet" href="../resources/css/reference.css" type="text/css">
|
||||
|
|
1
dist/docs/classes/GradientColor.html
vendored
1
dist/docs/classes/GradientColor.html
vendored
|
@ -1,6 +1,7 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>GradientColor</title>
|
||||
<base target="classFrame">
|
||||
<link rel="stylesheet" href="../resources/css/reference.css" type="text/css">
|
||||
|
|
1
dist/docs/classes/GradientStop.html
vendored
1
dist/docs/classes/GradientStop.html
vendored
|
@ -1,6 +1,7 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>GradientStop</title>
|
||||
<base target="classFrame">
|
||||
<link rel="stylesheet" href="../resources/css/reference.css" type="text/css">
|
||||
|
|
1
dist/docs/classes/GrayColor.html
vendored
1
dist/docs/classes/GrayColor.html
vendored
|
@ -1,6 +1,7 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>GrayColor</title>
|
||||
<base target="classFrame">
|
||||
<link rel="stylesheet" href="../resources/css/reference.css" type="text/css">
|
||||
|
|
78
dist/docs/classes/Group.html
vendored
78
dist/docs/classes/Group.html
vendored
|
@ -1,6 +1,7 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Group</title>
|
||||
<base target="classFrame">
|
||||
<link rel="stylesheet" href="../resources/css/reference.css" type="text/css">
|
||||
|
@ -1759,6 +1760,83 @@ raster.scale(5);
|
|||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="hittest-point-member" class="member">
|
||||
<div id="hittest-point-link" class="member-link">
|
||||
<a name="hittest-point" href="#" onClick="return toggleMember('hittest-point', false);"><tt><b>hitTest</b>(point[, options])</tt></a>
|
||||
</div>
|
||||
<div id="hittest-point-description" class="member-description hidden">
|
||||
<div class="member-header">
|
||||
<div class="member-title">
|
||||
<div class="member-link">
|
||||
<a href="#" onClick="return toggleMember('hittest-point', false);"><tt><b>hitTest</b>(point[, options])</tt></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="member-close"><input type="button" value="Close" onClick="toggleMember('hittest-point', false);"></div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
<div class="member-text">
|
||||
<p>Perform a hit test on the item (and its children, if it is a
|
||||
<a href="../classes/Group.html"><tt>Group</tt></a> or <a href="../classes/Layer.html"><tt>Layer</tt></a>) at the location of the specified point.</p>
|
||||
<p>The optional options object allows you to control the specifics of the
|
||||
hit test and may contain a combination of the following values:</p>
|
||||
<p><b>tolerance:</b> <tt>Number</tt> - The tolerance of the hit test in
|
||||
points.</p>
|
||||
<p><b>options.type:</b> Only hit test again a certain item
|
||||
type: <a href="../classes/PathItem.html"><tt>PathItem</tt></a>, <a href="../classes/Raster.html"><tt>Raster</tt></a>, <a href="../classes/TextItem.html"><tt>TextItem</tt></a>, etc.</p>
|
||||
<p><b>options.fill:</b> <tt>Boolean</tt> - Hit test the fill of items.</p>
|
||||
<p><b>options.stroke:</b> <tt>Boolean</tt> - Hit test the curves of path items,
|
||||
taking into account stroke width.</p>
|
||||
<p><b>options.segment:</b> <tt>Boolean</tt> - Hit test for <a href="../classes/Segment.html#point"><tt>segment.point</tt></a> of
|
||||
<a href="../classes/Path.html"><tt>Path</tt></a> items.</p>
|
||||
<p><b>options.handles:</b> <tt>Boolean</tt> - Hit test for the handles
|
||||
(<a href="../classes/Segment.html#handlein"><tt>segment.handleIn</tt></a> / <a href="../classes/Segment.html#handleout"><tt>segment.handleOut</tt></a>) of path segments.</p>
|
||||
<p><b>options.ends:</b> <tt>Boolean</tt> - Only hit test for the first or last
|
||||
segment points of open path items.</p>
|
||||
<p><b>options.bounds:</b> <tt>Boolean</tt> - Hit test the corners and side-centers
|
||||
of the bounding rectangle of items (<a href="../classes/Item.html#bounds"><tt>item.bounds</tt></a>).</p>
|
||||
<p><b>options.center:</b> <tt>Boolean</tt> - Hit test the <a href="../classes/Rectangle.html#center"><tt>rectangle.center</tt></a>
|
||||
of the bounding rectangle of items (<a href="../classes/Item.html#bounds"><tt>item.bounds</tt></a>).</p>
|
||||
<p><b>options.guide:</b> <tt>Boolean</tt> - Hit test items that have
|
||||
<a href="../classes/Item.html#guide"><tt>item.guide</tt></a> set to <tt>true</tt>.</p>
|
||||
<p><b>options.selected:</b> <tt>Boolean</tt> - Only hit selected items.</p>
|
||||
|
||||
<ul><b>Parameters:</b>
|
||||
|
||||
<li>
|
||||
<tt>point:</tt>
|
||||
<a href="../classes/Point.html"><tt>Point</tt></a>
|
||||
— The point where the hit test should be performed
|
||||
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<tt>options:</tt>
|
||||
<tt>Object</tt>
|
||||
|
||||
— optional, default: <tt>{ fill: true, stroke: true, segments: true,
|
||||
tolerance: 2 }</tt>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<ul><b>Returns:</b>
|
||||
|
||||
<li>
|
||||
<tt><a href="../classes/HitResult.html"><tt>HitResult</tt></a></tt> — A hit result object that contains more
|
||||
information about what exactly was hit or <tt>null</tt> if nothing was
|
||||
hit.
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
1
dist/docs/classes/HSBColor.html
vendored
1
dist/docs/classes/HSBColor.html
vendored
|
@ -1,6 +1,7 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>HSBColor</title>
|
||||
<base target="classFrame">
|
||||
<link rel="stylesheet" href="../resources/css/reference.css" type="text/css">
|
||||
|
|
5
dist/docs/classes/HSLColor.html
vendored
5
dist/docs/classes/HSLColor.html
vendored
|
@ -1,6 +1,7 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>HSLColor</title>
|
||||
<base target="classFrame">
|
||||
<link rel="stylesheet" href="../resources/css/reference.css" type="text/css">
|
||||
|
@ -92,8 +93,8 @@ between <tt>0</tt> and <tt>1</tt>
|
|||
var circle = new Path.Circle(new Point(80, 50), 30);
|
||||
|
||||
// Create an HSLColor with a hue of 90 degrees, a saturation
|
||||
// 100% and a lightness of 100%:
|
||||
circle.fillColor = new HSLColor(90, 1, 1);
|
||||
// 100% and a lightness of 50%:
|
||||
circle.fillColor = new HSLColor(90, 1, 0.5);
|
||||
</script>
|
||||
<div class="canvas"><canvas width="516" height="100" id="canvas-0"></canvas></div>
|
||||
</div>
|
||||
|
|
225
dist/docs/classes/HitResult.html
vendored
225
dist/docs/classes/HitResult.html
vendored
|
@ -1,6 +1,7 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>HitResult</title>
|
||||
<base target="classFrame">
|
||||
<link rel="stylesheet" href="../resources/css/reference.css" type="text/css">
|
||||
|
@ -18,7 +19,9 @@
|
|||
|
||||
<p> Extends <b><a href="../classes/CurveLocation.html"><tt>CurveLocation</tt></a></b></p>
|
||||
|
||||
|
||||
<p>A HitResult object contains information about the results of a hit
|
||||
test. It is returned by <a href="../classes/Item.html#hittest-point"><tt>item.hitTest(point)</tt></a> and
|
||||
<a href="../classes/Project.html#hittest-point"><tt>project.hitTest(point)</tt></a>.</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
@ -26,15 +29,142 @@
|
|||
|
||||
|
||||
|
||||
<div class="reference-members"><h2>Properties</h2>
|
||||
|
||||
|
||||
<div id="type-member" class="member">
|
||||
<div id="type-link" class="member-link">
|
||||
<a name="type" href="#" onClick="return toggleMember('type', false);"><tt><b>type</b></tt></a>
|
||||
</div>
|
||||
<div id="type-description" class="member-description hidden">
|
||||
<div class="member-header">
|
||||
<div class="member-title">
|
||||
<div class="member-link">
|
||||
<a href="#" onClick="return toggleMember('type', false);"><tt><b>type</b></tt></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="member-close"><input type="button" value="Close" onClick="toggleMember('type', false);"></div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- =========================== inherited properties ====================== -->
|
||||
<div class="reference-members"><h2>Properties inherited from <a href="../classes/CurveLocation.html"><tt>CurveLocation</tt></a></h2>
|
||||
|
||||
<div class="member-text">
|
||||
<p>Describes the type of the hit result. For example, if you hit a segment
|
||||
point, the type would be 'segment'.</p>
|
||||
|
||||
|
||||
<ul><b>Type:</b>
|
||||
<li>
|
||||
<tt>String('segment', 'handle-in', 'handle-out', 'stroke', 'fill',
|
||||
'bounds', 'center')</tt>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="name-member" class="member">
|
||||
<div id="name-link" class="member-link">
|
||||
<a name="name" href="#" onClick="return toggleMember('name', false);"><tt><b>name</b></tt></a>
|
||||
</div>
|
||||
<div id="name-description" class="member-description hidden">
|
||||
<div class="member-header">
|
||||
<div class="member-title">
|
||||
<div class="member-link">
|
||||
<a href="#" onClick="return toggleMember('name', false);"><tt><b>name</b></tt></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="member-close"><input type="button" value="Close" onClick="toggleMember('name', false);"></div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
|
||||
<div class="member-text">
|
||||
<p>If the HitResult has a <a href="../classes/HitResult.html#type"><tt>hitResult.type</tt></a> of 'bounds', this property
|
||||
describes which corner of the bounding rectangle was hit.</p>
|
||||
|
||||
|
||||
<ul><b>Type:</b>
|
||||
<li>
|
||||
<tt>String('top-left', 'top-right', 'bottom-left', 'bottom-right',
|
||||
'left-center', 'top-center', 'right-center', 'bottom-center')</tt>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="item-member" class="member">
|
||||
<div id="item-link" class="member-link">
|
||||
<a name="item" href="#" onClick="return toggleMember('item', false);"><tt><b>item</b></tt></a>
|
||||
</div>
|
||||
<div id="item-description" class="member-description hidden">
|
||||
<div class="member-header">
|
||||
<div class="member-title">
|
||||
<div class="member-link">
|
||||
<a href="#" onClick="return toggleMember('item', false);"><tt><b>item</b></tt></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="member-close"><input type="button" value="Close" onClick="toggleMember('item', false);"></div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
|
||||
<div class="member-text">
|
||||
<p>The item that was hit.</p>
|
||||
|
||||
|
||||
<ul><b>Type:</b>
|
||||
<li>
|
||||
<a href="../classes/Item.html"><tt>Item</tt></a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="location-member" class="member">
|
||||
<div id="location-link" class="member-link">
|
||||
<a name="location" href="#" onClick="return toggleMember('location', false);"><tt><b>location</b></tt></a>
|
||||
</div>
|
||||
<div id="location-description" class="member-description hidden">
|
||||
<div class="member-header">
|
||||
<div class="member-title">
|
||||
<div class="member-link">
|
||||
<a href="#" onClick="return toggleMember('location', false);"><tt><b>location</b></tt></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="member-close"><input type="button" value="Close" onClick="toggleMember('location', false);"></div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
|
||||
<div class="member-text">
|
||||
<p>If the HitResult has a type of 'stroke', this property gives more
|
||||
information about the exact position that was hit on the path.</p>
|
||||
|
||||
|
||||
<ul><b>Type:</b>
|
||||
<li>
|
||||
<a href="../classes/CurveLocation.html"><tt>CurveLocation</tt></a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="segment-member" class="member">
|
||||
<div id="segment-link" class="member-link">
|
||||
<a name="segment" href="#" onClick="return toggleMember('segment', false);"><tt><b>segment</b></tt></a>
|
||||
|
@ -51,7 +181,9 @@
|
|||
</div>
|
||||
|
||||
<div class="member-text">
|
||||
<p>The segment of the curve which is closer to the described location.</p>
|
||||
<p>If the HitResult has a type of 'stroke', 'segment', 'handle-in' or
|
||||
'handle-out', this property refers to the Segment that was hit or that
|
||||
is closest to the hitResult.location on the curve.</p>
|
||||
|
||||
|
||||
<ul><b>Type:</b>
|
||||
|
@ -65,6 +197,48 @@
|
|||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="point-member" class="member">
|
||||
<div id="point-link" class="member-link">
|
||||
<a name="point" href="#" onClick="return toggleMember('point', false);"><tt><b>point</b></tt></a>
|
||||
</div>
|
||||
<div id="point-description" class="member-description hidden">
|
||||
<div class="member-header">
|
||||
<div class="member-title">
|
||||
<div class="member-link">
|
||||
<a href="#" onClick="return toggleMember('point', false);"><tt><b>point</b></tt></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="member-close"><input type="button" value="Close" onClick="toggleMember('point', false);"></div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
|
||||
<div class="member-text">
|
||||
<p>The hit point.</p>
|
||||
|
||||
|
||||
<ul><b>Type:</b>
|
||||
<li>
|
||||
<a href="../classes/Point.html"><tt>Point</tt></a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- =========================== inherited properties ====================== -->
|
||||
<div class="reference-members"><h2>Properties inherited from <a href="../classes/CurveLocation.html"><tt>CurveLocation</tt></a></h2>
|
||||
|
||||
|
||||
<div id="curve-member" class="member">
|
||||
|
@ -264,39 +438,6 @@ the curve).</p>
|
|||
</div>
|
||||
|
||||
|
||||
<div id="point-member" class="member">
|
||||
<div id="point-link" class="member-link">
|
||||
<a name="point" href="#" onClick="return toggleMember('point', false);"><tt><b>point</b></tt></a>
|
||||
</div>
|
||||
<div id="point-description" class="member-description hidden">
|
||||
<div class="member-header">
|
||||
<div class="member-title">
|
||||
<div class="member-link">
|
||||
<a href="#" onClick="return toggleMember('point', false);"><tt><b>point</b></tt></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="member-close"><input type="button" value="Close" onClick="toggleMember('point', false);"></div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
|
||||
<div class="member-text">
|
||||
<p>The point which is defined by the <a href="../classes/CurveLocation.html#curve" onclick="return toggleMember('curve', true);"><tt>curve</tt></a> and
|
||||
<a href="../classes/CurveLocation.html#parameter" onclick="return toggleMember('parameter', true);"><tt>parameter</tt></a>.</p>
|
||||
|
||||
|
||||
<ul><b>Type:</b>
|
||||
<li>
|
||||
<a href="../classes/Point.html"><tt>Point</tt></a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="tangent-member" class="member">
|
||||
<div id="tangent-link" class="member-link">
|
||||
<a name="tangent" href="#" onClick="return toggleMember('tangent', false);"><tt><b>tangent</b></tt></a>
|
||||
|
|
78
dist/docs/classes/Item.html
vendored
78
dist/docs/classes/Item.html
vendored
|
@ -1,6 +1,7 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Item</title>
|
||||
<base target="classFrame">
|
||||
<link rel="stylesheet" href="../resources/css/reference.css" type="text/css">
|
||||
|
@ -1624,6 +1625,83 @@ raster.scale(5);
|
|||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="hittest-point-member" class="member">
|
||||
<div id="hittest-point-link" class="member-link">
|
||||
<a name="hittest-point" href="#" onClick="return toggleMember('hittest-point', false);"><tt><b>hitTest</b>(point[, options])</tt></a>
|
||||
</div>
|
||||
<div id="hittest-point-description" class="member-description hidden">
|
||||
<div class="member-header">
|
||||
<div class="member-title">
|
||||
<div class="member-link">
|
||||
<a href="#" onClick="return toggleMember('hittest-point', false);"><tt><b>hitTest</b>(point[, options])</tt></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="member-close"><input type="button" value="Close" onClick="toggleMember('hittest-point', false);"></div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
<div class="member-text">
|
||||
<p>Perform a hit test on the item (and its children, if it is a
|
||||
<a href="../classes/Group.html"><tt>Group</tt></a> or <a href="../classes/Layer.html"><tt>Layer</tt></a>) at the location of the specified point.</p>
|
||||
<p>The optional options object allows you to control the specifics of the
|
||||
hit test and may contain a combination of the following values:</p>
|
||||
<p><b>tolerance:</b> <tt>Number</tt> - The tolerance of the hit test in
|
||||
points.</p>
|
||||
<p><b>options.type:</b> Only hit test again a certain item
|
||||
type: <a href="../classes/PathItem.html"><tt>PathItem</tt></a>, <a href="../classes/Raster.html"><tt>Raster</tt></a>, <a href="../classes/TextItem.html"><tt>TextItem</tt></a>, etc.</p>
|
||||
<p><b>options.fill:</b> <tt>Boolean</tt> - Hit test the fill of items.</p>
|
||||
<p><b>options.stroke:</b> <tt>Boolean</tt> - Hit test the curves of path items,
|
||||
taking into account stroke width.</p>
|
||||
<p><b>options.segment:</b> <tt>Boolean</tt> - Hit test for <a href="../classes/Segment.html#point"><tt>segment.point</tt></a> of
|
||||
<a href="../classes/Path.html"><tt>Path</tt></a> items.</p>
|
||||
<p><b>options.handles:</b> <tt>Boolean</tt> - Hit test for the handles
|
||||
(<a href="../classes/Segment.html#handlein"><tt>segment.handleIn</tt></a> / <a href="../classes/Segment.html#handleout"><tt>segment.handleOut</tt></a>) of path segments.</p>
|
||||
<p><b>options.ends:</b> <tt>Boolean</tt> - Only hit test for the first or last
|
||||
segment points of open path items.</p>
|
||||
<p><b>options.bounds:</b> <tt>Boolean</tt> - Hit test the corners and side-centers
|
||||
of the bounding rectangle of items (<a href="../classes/Item.html#bounds"><tt>item.bounds</tt></a>).</p>
|
||||
<p><b>options.center:</b> <tt>Boolean</tt> - Hit test the <a href="../classes/Rectangle.html#center"><tt>rectangle.center</tt></a>
|
||||
of the bounding rectangle of items (<a href="../classes/Item.html#bounds"><tt>item.bounds</tt></a>).</p>
|
||||
<p><b>options.guide:</b> <tt>Boolean</tt> - Hit test items that have
|
||||
<a href="../classes/Item.html#guide"><tt>item.guide</tt></a> set to <tt>true</tt>.</p>
|
||||
<p><b>options.selected:</b> <tt>Boolean</tt> - Only hit selected items.</p>
|
||||
|
||||
<ul><b>Parameters:</b>
|
||||
|
||||
<li>
|
||||
<tt>point:</tt>
|
||||
<a href="../classes/Point.html"><tt>Point</tt></a>
|
||||
— The point where the hit test should be performed
|
||||
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<tt>options:</tt>
|
||||
<tt>Object</tt>
|
||||
|
||||
— optional, default: <tt>{ fill: true, stroke: true, segments: true,
|
||||
tolerance: 2 }</tt>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<ul><b>Returns:</b>
|
||||
|
||||
<li>
|
||||
<tt><a href="../classes/HitResult.html"><tt>HitResult</tt></a></tt> — A hit result object that contains more
|
||||
information about what exactly was hit or <tt>null</tt> if nothing was
|
||||
hit.
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
1
dist/docs/classes/Key.html
vendored
1
dist/docs/classes/Key.html
vendored
|
@ -1,6 +1,7 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Key</title>
|
||||
<base target="classFrame">
|
||||
<link rel="stylesheet" href="../resources/css/reference.css" type="text/css">
|
||||
|
|
1
dist/docs/classes/KeyEvent.html
vendored
1
dist/docs/classes/KeyEvent.html
vendored
|
@ -1,6 +1,7 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>KeyEvent</title>
|
||||
<base target="classFrame">
|
||||
<link rel="stylesheet" href="../resources/css/reference.css" type="text/css">
|
||||
|
|
78
dist/docs/classes/Layer.html
vendored
78
dist/docs/classes/Layer.html
vendored
|
@ -1,6 +1,7 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Layer</title>
|
||||
<base target="classFrame">
|
||||
<link rel="stylesheet" href="../resources/css/reference.css" type="text/css">
|
||||
|
@ -1718,6 +1719,83 @@ raster.scale(5);
|
|||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="hittest-point-member" class="member">
|
||||
<div id="hittest-point-link" class="member-link">
|
||||
<a name="hittest-point" href="#" onClick="return toggleMember('hittest-point', false);"><tt><b>hitTest</b>(point[, options])</tt></a>
|
||||
</div>
|
||||
<div id="hittest-point-description" class="member-description hidden">
|
||||
<div class="member-header">
|
||||
<div class="member-title">
|
||||
<div class="member-link">
|
||||
<a href="#" onClick="return toggleMember('hittest-point', false);"><tt><b>hitTest</b>(point[, options])</tt></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="member-close"><input type="button" value="Close" onClick="toggleMember('hittest-point', false);"></div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
<div class="member-text">
|
||||
<p>Perform a hit test on the item (and its children, if it is a
|
||||
<a href="../classes/Group.html"><tt>Group</tt></a> or <a href="../classes/Layer.html"><tt>Layer</tt></a>) at the location of the specified point.</p>
|
||||
<p>The optional options object allows you to control the specifics of the
|
||||
hit test and may contain a combination of the following values:</p>
|
||||
<p><b>tolerance:</b> <tt>Number</tt> - The tolerance of the hit test in
|
||||
points.</p>
|
||||
<p><b>options.type:</b> Only hit test again a certain item
|
||||
type: <a href="../classes/PathItem.html"><tt>PathItem</tt></a>, <a href="../classes/Raster.html"><tt>Raster</tt></a>, <a href="../classes/TextItem.html"><tt>TextItem</tt></a>, etc.</p>
|
||||
<p><b>options.fill:</b> <tt>Boolean</tt> - Hit test the fill of items.</p>
|
||||
<p><b>options.stroke:</b> <tt>Boolean</tt> - Hit test the curves of path items,
|
||||
taking into account stroke width.</p>
|
||||
<p><b>options.segment:</b> <tt>Boolean</tt> - Hit test for <a href="../classes/Segment.html#point"><tt>segment.point</tt></a> of
|
||||
<a href="../classes/Path.html"><tt>Path</tt></a> items.</p>
|
||||
<p><b>options.handles:</b> <tt>Boolean</tt> - Hit test for the handles
|
||||
(<a href="../classes/Segment.html#handlein"><tt>segment.handleIn</tt></a> / <a href="../classes/Segment.html#handleout"><tt>segment.handleOut</tt></a>) of path segments.</p>
|
||||
<p><b>options.ends:</b> <tt>Boolean</tt> - Only hit test for the first or last
|
||||
segment points of open path items.</p>
|
||||
<p><b>options.bounds:</b> <tt>Boolean</tt> - Hit test the corners and side-centers
|
||||
of the bounding rectangle of items (<a href="../classes/Item.html#bounds"><tt>item.bounds</tt></a>).</p>
|
||||
<p><b>options.center:</b> <tt>Boolean</tt> - Hit test the <a href="../classes/Rectangle.html#center"><tt>rectangle.center</tt></a>
|
||||
of the bounding rectangle of items (<a href="../classes/Item.html#bounds"><tt>item.bounds</tt></a>).</p>
|
||||
<p><b>options.guide:</b> <tt>Boolean</tt> - Hit test items that have
|
||||
<a href="../classes/Item.html#guide"><tt>item.guide</tt></a> set to <tt>true</tt>.</p>
|
||||
<p><b>options.selected:</b> <tt>Boolean</tt> - Only hit selected items.</p>
|
||||
|
||||
<ul><b>Parameters:</b>
|
||||
|
||||
<li>
|
||||
<tt>point:</tt>
|
||||
<a href="../classes/Point.html"><tt>Point</tt></a>
|
||||
— The point where the hit test should be performed
|
||||
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<tt>options:</tt>
|
||||
<tt>Object</tt>
|
||||
|
||||
— optional, default: <tt>{ fill: true, stroke: true, segments: true,
|
||||
tolerance: 2 }</tt>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<ul><b>Returns:</b>
|
||||
|
||||
<li>
|
||||
<tt><a href="../classes/HitResult.html"><tt>HitResult</tt></a></tt> — A hit result object that contains more
|
||||
information about what exactly was hit or <tt>null</tt> if nothing was
|
||||
hit.
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
1
dist/docs/classes/Line.html
vendored
1
dist/docs/classes/Line.html
vendored
|
@ -1,6 +1,7 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Line</title>
|
||||
<base target="classFrame">
|
||||
<link rel="stylesheet" href="../resources/css/reference.css" type="text/css">
|
||||
|
|
462
dist/docs/classes/Matrix.html
vendored
462
dist/docs/classes/Matrix.html
vendored
|
@ -1,6 +1,7 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Matrix</title>
|
||||
<base target="classFrame">
|
||||
<link rel="stylesheet" href="../resources/css/reference.css" type="text/css">
|
||||
|
@ -25,9 +26,9 @@ transforms source coordinates (x,y) into destination coordinates (x',y')
|
|||
by considering them to be a column vector and multiplying the coordinate
|
||||
vector by the matrix according to the following process:</p>
|
||||
<pre class="code">
|
||||
[ x'] [ m00 m01 m02 ] [ x ] [ m00x + m01y + m02 ]
|
||||
[ y'] = [ m10 m11 m12 ] [ y ] = [ m10x + m11y + m12 ]
|
||||
[ 1 ] [ 0 0 1 ] [ 1 ] [ 1 ]
|
||||
[ x ] [ a b tx ] [ x ] [ a * x + b * y + tx ]
|
||||
[ y ] = [ c d ty ] [ y ] = [ c * x + d * y + ty ]
|
||||
[ 1 ] [ 0 0 1 ] [ 1 ] [ 1 ]
|
||||
</pre>
|
||||
<p>This class is optimized for speed and minimizes calculations based on its
|
||||
knowledge of the underlying matrix (as opposed to say simply performing
|
||||
|
@ -39,18 +40,18 @@ matrix multiplication).</p>
|
|||
<div class="reference-members"><h2>Constructors</h2>
|
||||
|
||||
|
||||
<div id="matrix-m00-m10-m01-m11-m02-m12-member" class="member">
|
||||
<div id="matrix-m00-m10-m01-m11-m02-m12-link" class="member-link">
|
||||
<a name="matrix-m00-m10-m01-m11-m02-m12" href="#" onClick="return toggleMember('matrix-m00-m10-m01-m11-m02-m12', false);"><tt><b>Matrix</b>(m00, m10, m01, m11, m02, m12)</tt></a>
|
||||
<div id="matrix-a-c-b-d-tx-ty-member" class="member">
|
||||
<div id="matrix-a-c-b-d-tx-ty-link" class="member-link">
|
||||
<a name="matrix-a-c-b-d-tx-ty" href="#" onClick="return toggleMember('matrix-a-c-b-d-tx-ty', false);"><tt><b>Matrix</b>(a, c, b, d, tx, ty)</tt></a>
|
||||
</div>
|
||||
<div id="matrix-m00-m10-m01-m11-m02-m12-description" class="member-description hidden">
|
||||
<div id="matrix-a-c-b-d-tx-ty-description" class="member-description hidden">
|
||||
<div class="member-header">
|
||||
<div class="member-title">
|
||||
<div class="member-link">
|
||||
<a href="#" onClick="return toggleMember('matrix-m00-m10-m01-m11-m02-m12', false);"><tt><b>Matrix</b>(m00, m10, m01, m11, m02, m12)</tt></a>
|
||||
<a href="#" onClick="return toggleMember('matrix-a-c-b-d-tx-ty', false);"><tt><b>Matrix</b>(a, c, b, d, tx, ty)</tt></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="member-close"><input type="button" value="Close" onClick="toggleMember('matrix-m00-m10-m01-m11-m02-m12', false);"></div>
|
||||
<div class="member-close"><input type="button" value="Close" onClick="toggleMember('matrix-a-c-b-d-tx-ty', false);"></div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
<div class="member-text">
|
||||
|
@ -59,44 +60,44 @@ matrix multiplication).</p>
|
|||
<ul><b>Parameters:</b>
|
||||
|
||||
<li>
|
||||
<tt>m00:</tt>
|
||||
<tt>a:</tt>
|
||||
<tt>Number</tt>
|
||||
— The m00 coordinate of the transform.
|
||||
— The scaleX coordinate of the transform
|
||||
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<tt>m10:</tt>
|
||||
<tt>c:</tt>
|
||||
<tt>Number</tt>
|
||||
— The m10 coordinate of the transform.
|
||||
— The shearY coordinate of the transform
|
||||
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<tt>m01:</tt>
|
||||
<tt>b:</tt>
|
||||
<tt>Number</tt>
|
||||
— The m01 coordinate of the transform.
|
||||
— The shearX coordinate of the transform
|
||||
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<tt>m11:</tt>
|
||||
<tt>d:</tt>
|
||||
<tt>Number</tt>
|
||||
— The m11 coordinate of the transform.
|
||||
— The scaleY coordinate of the transform
|
||||
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<tt>m02:</tt>
|
||||
<tt>tx:</tt>
|
||||
<tt>Number</tt>
|
||||
— The m02 coordinate of the transform.
|
||||
— The translateX coordinate of the transform
|
||||
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<tt>m12:</tt>
|
||||
<tt>ty:</tt>
|
||||
<tt>Number</tt>
|
||||
— The m12 coordinate of the transform.
|
||||
— The translateY coordinate of the transform
|
||||
|
||||
</li>
|
||||
|
||||
|
@ -115,6 +116,235 @@ matrix multiplication).</p>
|
|||
|
||||
|
||||
|
||||
<div class="reference-members"><h2>Properties</h2>
|
||||
|
||||
|
||||
<div id="scalex-member" class="member">
|
||||
<div id="scalex-link" class="member-link">
|
||||
<a name="scalex" href="#" onClick="return toggleMember('scalex', false);"><tt><b>scaleX</b></tt></a>
|
||||
</div>
|
||||
<div id="scalex-description" class="member-description hidden">
|
||||
<div class="member-header">
|
||||
<div class="member-title">
|
||||
<div class="member-link">
|
||||
<a href="#" onClick="return toggleMember('scalex', false);"><tt><b>scaleX</b></tt></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="member-close"><input type="button" value="Close" onClick="toggleMember('scalex', false);"></div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
|
||||
<div class="member-text">
|
||||
<p>The scaling factor in the x-direction (<tt>a</tt>).</p>
|
||||
|
||||
|
||||
<ul><b>Type:</b>
|
||||
<li>
|
||||
<tt>Number</tt>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="scaley-member" class="member">
|
||||
<div id="scaley-link" class="member-link">
|
||||
<a name="scaley" href="#" onClick="return toggleMember('scaley', false);"><tt><b>scaleY</b></tt></a>
|
||||
</div>
|
||||
<div id="scaley-description" class="member-description hidden">
|
||||
<div class="member-header">
|
||||
<div class="member-title">
|
||||
<div class="member-link">
|
||||
<a href="#" onClick="return toggleMember('scaley', false);"><tt><b>scaleY</b></tt></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="member-close"><input type="button" value="Close" onClick="toggleMember('scaley', false);"></div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
|
||||
<div class="member-text">
|
||||
<p>The scaling factor in the y-direction (<tt>d</tt>).</p>
|
||||
|
||||
|
||||
<ul><b>Type:</b>
|
||||
<li>
|
||||
<tt>Number</tt>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="shearx-member" class="member">
|
||||
<div id="shearx-link" class="member-link">
|
||||
<a name="shearx" href="#" onClick="return toggleMember('shearx', false);"><tt><b>shearX</b></tt></a>
|
||||
</div>
|
||||
<div id="shearx-description" class="member-description hidden">
|
||||
<div class="member-header">
|
||||
<div class="member-title">
|
||||
<div class="member-link">
|
||||
<a href="#" onClick="return toggleMember('shearx', false);"><tt><b>shearX</b></tt></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="member-close"><input type="button" value="Close" onClick="toggleMember('shearx', false);"></div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
|
||||
<div class="member-text">
|
||||
|
||||
|
||||
|
||||
<ul><b>Type:</b>
|
||||
<li>
|
||||
<tt>Number</tt>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="sheary-member" class="member">
|
||||
<div id="sheary-link" class="member-link">
|
||||
<a name="sheary" href="#" onClick="return toggleMember('sheary', false);"><tt><b>shearY</b></tt></a>
|
||||
</div>
|
||||
<div id="sheary-description" class="member-description hidden">
|
||||
<div class="member-header">
|
||||
<div class="member-title">
|
||||
<div class="member-link">
|
||||
<a href="#" onClick="return toggleMember('sheary', false);"><tt><b>shearY</b></tt></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="member-close"><input type="button" value="Close" onClick="toggleMember('sheary', false);"></div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
|
||||
<div class="member-text">
|
||||
|
||||
|
||||
|
||||
<ul><b>Type:</b>
|
||||
<li>
|
||||
<tt>Number</tt>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="translatex-member" class="member">
|
||||
<div id="translatex-link" class="member-link">
|
||||
<a name="translatex" href="#" onClick="return toggleMember('translatex', false);"><tt><b>translateX</b></tt></a>
|
||||
</div>
|
||||
<div id="translatex-description" class="member-description hidden">
|
||||
<div class="member-header">
|
||||
<div class="member-title">
|
||||
<div class="member-link">
|
||||
<a href="#" onClick="return toggleMember('translatex', false);"><tt><b>translateX</b></tt></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="member-close"><input type="button" value="Close" onClick="toggleMember('translatex', false);"></div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
|
||||
<div class="member-text">
|
||||
<p>The translation in the x-direction (<tt>tx</tt>).</p>
|
||||
|
||||
|
||||
<ul><b>Type:</b>
|
||||
<li>
|
||||
<tt>Number</tt>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="translatey-member" class="member">
|
||||
<div id="translatey-link" class="member-link">
|
||||
<a name="translatey" href="#" onClick="return toggleMember('translatey', false);"><tt><b>translateY</b></tt></a>
|
||||
</div>
|
||||
<div id="translatey-description" class="member-description hidden">
|
||||
<div class="member-header">
|
||||
<div class="member-title">
|
||||
<div class="member-link">
|
||||
<a href="#" onClick="return toggleMember('translatey', false);"><tt><b>translateY</b></tt></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="member-close"><input type="button" value="Close" onClick="toggleMember('translatey', false);"></div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
|
||||
<div class="member-text">
|
||||
<p>The translation in the y-direction (<tt>ty</tt>).</p>
|
||||
|
||||
|
||||
<ul><b>Type:</b>
|
||||
<li>
|
||||
<tt>Number</tt>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="values-member" class="member">
|
||||
<div id="values-link" class="member-link">
|
||||
<a name="values" href="#" onClick="return toggleMember('values', false);"><tt><b>values</b></tt></a>
|
||||
</div>
|
||||
<div id="values-description" class="member-description hidden">
|
||||
<div class="member-header">
|
||||
<div class="member-title">
|
||||
<div class="member-link">
|
||||
<a href="#" onClick="return toggleMember('values', false);"><tt><b>values</b></tt></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="member-close"><input type="button" value="Close" onClick="toggleMember('values', false);"></div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
|
||||
<div class="member-text">
|
||||
<p>The transform values as an array, in the same sequence as they are passed
|
||||
to {@link #initialize(a, c, b, d, tx, ty)}.</p>
|
||||
|
||||
|
||||
<ul><b>Type:</b>
|
||||
<li>
|
||||
<tt>Number</tt>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- ============================== methods ================================ -->
|
||||
|
@ -154,18 +384,18 @@ matrix multiplication).</p>
|
|||
</div>
|
||||
|
||||
|
||||
<div id="set-m00-m10-m01-m11-m02-m12-member" class="member">
|
||||
<div id="set-m00-m10-m01-m11-m02-m12-link" class="member-link">
|
||||
<a name="set-m00-m10-m01-m11-m02-m12" href="#" onClick="return toggleMember('set-m00-m10-m01-m11-m02-m12', false);"><tt><b>set</b>(m00, m10, m01, m11, m02, m12)</tt></a>
|
||||
<div id="set-a-c-b-d-tx-ty-member" class="member">
|
||||
<div id="set-a-c-b-d-tx-ty-link" class="member-link">
|
||||
<a name="set-a-c-b-d-tx-ty" href="#" onClick="return toggleMember('set-a-c-b-d-tx-ty', false);"><tt><b>set</b>(a, c, b, d, tx, ty)</tt></a>
|
||||
</div>
|
||||
<div id="set-m00-m10-m01-m11-m02-m12-description" class="member-description hidden">
|
||||
<div id="set-a-c-b-d-tx-ty-description" class="member-description hidden">
|
||||
<div class="member-header">
|
||||
<div class="member-title">
|
||||
<div class="member-link">
|
||||
<a href="#" onClick="return toggleMember('set-m00-m10-m01-m11-m02-m12', false);"><tt><b>set</b>(m00, m10, m01, m11, m02, m12)</tt></a>
|
||||
<a href="#" onClick="return toggleMember('set-a-c-b-d-tx-ty', false);"><tt><b>set</b>(a, c, b, d, tx, ty)</tt></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="member-close"><input type="button" value="Close" onClick="toggleMember('set-m00-m10-m01-m11-m02-m12', false);"></div>
|
||||
<div class="member-close"><input type="button" value="Close" onClick="toggleMember('set-a-c-b-d-tx-ty', false);"></div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
<div class="member-text">
|
||||
|
@ -174,44 +404,44 @@ matrix multiplication).</p>
|
|||
<ul><b>Parameters:</b>
|
||||
|
||||
<li>
|
||||
<tt>m00:</tt>
|
||||
<tt>a:</tt>
|
||||
<tt>Number</tt>
|
||||
— The m00 coordinate of the transform.
|
||||
— The scaleX coordinate of the transform
|
||||
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<tt>m10:</tt>
|
||||
<tt>c:</tt>
|
||||
<tt>Number</tt>
|
||||
— The m10 coordinate of the transform.
|
||||
— The shearY coordinate of the transform
|
||||
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<tt>m01:</tt>
|
||||
<tt>b:</tt>
|
||||
<tt>Number</tt>
|
||||
— The m01 coordinate of the transform.
|
||||
— The shearX coordinate of the transform
|
||||
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<tt>m11:</tt>
|
||||
<tt>d:</tt>
|
||||
<tt>Number</tt>
|
||||
— The m11 coordinate of the transform.
|
||||
— The scaleY coordinate of the transform
|
||||
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<tt>m02:</tt>
|
||||
<tt>tx:</tt>
|
||||
<tt>Number</tt>
|
||||
— The m02 coordinate of the transform.
|
||||
— The translateX coordinate of the transform
|
||||
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<tt>m12:</tt>
|
||||
<tt>ty:</tt>
|
||||
<tt>Number</tt>
|
||||
— The m12 coordinate of the transform.
|
||||
— The translateY coordinate of the transform
|
||||
|
||||
</li>
|
||||
|
||||
|
@ -221,7 +451,7 @@ matrix multiplication).</p>
|
|||
<ul><b>Returns:</b>
|
||||
|
||||
<li>
|
||||
<tt><a href="../classes/Matrix.html"><tt>Matrix</tt></a></tt> — This affine transform.
|
||||
<tt><a href="../classes/Matrix.html"><tt>Matrix</tt></a></tt> — This affine transform
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
@ -255,15 +485,14 @@ matrix multiplication).</p>
|
|||
<li>
|
||||
<tt>scale:</tt>
|
||||
<tt>Number</tt>
|
||||
— The scaling factor.
|
||||
— The scaling factor
|
||||
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<tt>center:</tt>
|
||||
<a href="../classes/Point.html"><tt>Point</tt></a>
|
||||
— The center for the scaling
|
||||
transformation.
|
||||
— The center for the scaling transformation
|
||||
— optional
|
||||
</li>
|
||||
|
||||
|
@ -273,7 +502,7 @@ transformation.
|
|||
<ul><b>Returns:</b>
|
||||
|
||||
<li>
|
||||
<tt><a href="../classes/Matrix.html"><tt>Matrix</tt></a></tt> — This affine transform.
|
||||
<tt><a href="../classes/Matrix.html"><tt>Matrix</tt></a></tt> — This affine transform
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
@ -307,22 +536,21 @@ transformation.
|
|||
<li>
|
||||
<tt>hor:</tt>
|
||||
<tt>Number</tt>
|
||||
— The horizontal scaling factor.
|
||||
— The horizontal scaling factor
|
||||
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<tt>ver:</tt>
|
||||
<tt>Number</tt>
|
||||
— The vertical scaling factor.
|
||||
— The vertical scaling factor
|
||||
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<tt>center:</tt>
|
||||
<a href="../classes/Point.html"><tt>Point</tt></a>
|
||||
— The center for the scaling
|
||||
transformation.
|
||||
— The center for the scaling transformation
|
||||
— optional
|
||||
</li>
|
||||
|
||||
|
@ -332,7 +560,7 @@ transformation.
|
|||
<ul><b>Returns:</b>
|
||||
|
||||
<li>
|
||||
<tt><a href="../classes/Matrix.html"><tt>Matrix</tt></a></tt> — This affine transform.
|
||||
<tt><a href="../classes/Matrix.html"><tt>Matrix</tt></a></tt> — This affine transform
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
@ -366,7 +594,7 @@ transformation.
|
|||
<li>
|
||||
<tt>point:</tt>
|
||||
<a href="../classes/Point.html"><tt>Point</tt></a>
|
||||
— The vector to translate by.
|
||||
— The vector to translate by
|
||||
|
||||
</li>
|
||||
|
||||
|
@ -376,7 +604,7 @@ transformation.
|
|||
<ul><b>Returns:</b>
|
||||
|
||||
<li>
|
||||
<tt><a href="../classes/Matrix.html"><tt>Matrix</tt></a></tt> — This affine transform.
|
||||
<tt><a href="../classes/Matrix.html"><tt>Matrix</tt></a></tt> — This affine transform
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
@ -410,14 +638,14 @@ transformation.
|
|||
<li>
|
||||
<tt>dx:</tt>
|
||||
<tt>Number</tt>
|
||||
— The distance to translate in the x direction.
|
||||
— The distance to translate in the x direction
|
||||
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<tt>dy:</tt>
|
||||
<tt>Number</tt>
|
||||
— The distance to translate in the y direction.
|
||||
— The distance to translate in the y direction
|
||||
|
||||
</li>
|
||||
|
||||
|
@ -427,7 +655,7 @@ transformation.
|
|||
<ul><b>Returns:</b>
|
||||
|
||||
<li>
|
||||
<tt><a href="../classes/Matrix.html"><tt>Matrix</tt></a></tt> — This affine transform.
|
||||
<tt><a href="../classes/Matrix.html"><tt>Matrix</tt></a></tt> — This affine transform
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
@ -462,14 +690,14 @@ anchor point.</p>
|
|||
<li>
|
||||
<tt>angle:</tt>
|
||||
<tt>Number</tt>
|
||||
— The angle of rotation measured in degrees.
|
||||
— The angle of rotation measured in degrees
|
||||
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<tt>center:</tt>
|
||||
<a href="../classes/Point.html"><tt>Point</tt></a>
|
||||
— The anchor point to rotate around.
|
||||
— The anchor point to rotate around
|
||||
|
||||
</li>
|
||||
|
||||
|
@ -479,7 +707,7 @@ anchor point.</p>
|
|||
<ul><b>Returns:</b>
|
||||
|
||||
<li>
|
||||
<tt><a href="../classes/Matrix.html"><tt>Matrix</tt></a></tt> — This affine transform.
|
||||
<tt><a href="../classes/Matrix.html"><tt>Matrix</tt></a></tt> — This affine transform
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
@ -514,21 +742,21 @@ anchor point.</p>
|
|||
<li>
|
||||
<tt>angle:</tt>
|
||||
<tt>Number</tt>
|
||||
— The angle of rotation measured in degrees.
|
||||
— The angle of rotation measured in degrees
|
||||
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<tt>x:</tt>
|
||||
<tt>Number</tt>
|
||||
— The x coordinate of the anchor point.
|
||||
— The x coordinate of the anchor point
|
||||
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<tt>y:</tt>
|
||||
<tt>Number</tt>
|
||||
— The y coordinate of the anchor point.
|
||||
— The y coordinate of the anchor point
|
||||
|
||||
</li>
|
||||
|
||||
|
@ -538,7 +766,7 @@ anchor point.</p>
|
|||
<ul><b>Returns:</b>
|
||||
|
||||
<li>
|
||||
<tt><a href="../classes/Matrix.html"><tt>Matrix</tt></a></tt> — This affine transform.
|
||||
<tt><a href="../classes/Matrix.html"><tt>Matrix</tt></a></tt> — This affine transform
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
@ -572,14 +800,14 @@ anchor point.</p>
|
|||
<li>
|
||||
<tt>point:</tt>
|
||||
<a href="../classes/Point.html"><tt>Point</tt></a>
|
||||
— The shear factor in x and y direction.
|
||||
— The shear factor in x and y direction
|
||||
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<tt>center:</tt>
|
||||
<a href="../classes/Point.html"><tt>Point</tt></a>
|
||||
— The center for the shear transformation.
|
||||
— The center for the shear transformation
|
||||
— optional
|
||||
</li>
|
||||
|
||||
|
@ -589,7 +817,7 @@ anchor point.</p>
|
|||
<ul><b>Returns:</b>
|
||||
|
||||
<li>
|
||||
<tt><a href="../classes/Matrix.html"><tt>Matrix</tt></a></tt> — This affine transform.
|
||||
<tt><a href="../classes/Matrix.html"><tt>Matrix</tt></a></tt> — This affine transform
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
@ -623,21 +851,21 @@ anchor point.</p>
|
|||
<li>
|
||||
<tt>hor:</tt>
|
||||
<tt>Number</tt>
|
||||
— The horizontal shear factor.
|
||||
— The horizontal shear factor
|
||||
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<tt>ver:</tt>
|
||||
<tt>Number</tt>
|
||||
— The vertical shear factor.
|
||||
— The vertical shear factor
|
||||
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<tt>center:</tt>
|
||||
<a href="../classes/Point.html"><tt>Point</tt></a>
|
||||
— The center for the shear transformation.
|
||||
— The center for the shear transformation
|
||||
— optional
|
||||
</li>
|
||||
|
||||
|
@ -647,7 +875,7 @@ anchor point.</p>
|
|||
<ul><b>Returns:</b>
|
||||
|
||||
<li>
|
||||
<tt><a href="../classes/Matrix.html"><tt>Matrix</tt></a></tt> — This affine transform.
|
||||
<tt><a href="../classes/Matrix.html"><tt>Matrix</tt></a></tt> — This affine transform
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
@ -714,7 +942,7 @@ anchor point.</p>
|
|||
<li>
|
||||
<tt>mx:</tt>
|
||||
<a href="../classes/Matrix.html"><tt>Matrix</tt></a>
|
||||
— The transform to concatenate.
|
||||
— The transform to concatenate
|
||||
|
||||
</li>
|
||||
|
||||
|
@ -724,7 +952,7 @@ anchor point.</p>
|
|||
<ul><b>Returns:</b>
|
||||
|
||||
<li>
|
||||
<tt><a href="../classes/Matrix.html"><tt>Matrix</tt></a></tt> — This affine transform.
|
||||
<tt><a href="../classes/Matrix.html"><tt>Matrix</tt></a></tt> — This affine transform
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
@ -758,7 +986,7 @@ anchor point.</p>
|
|||
<li>
|
||||
<tt>mx:</tt>
|
||||
<a href="../classes/Matrix.html"><tt>Matrix</tt></a>
|
||||
— The transform to preconcatenate.
|
||||
— The transform to preconcatenate
|
||||
|
||||
</li>
|
||||
|
||||
|
@ -768,7 +996,7 @@ anchor point.</p>
|
|||
<ul><b>Returns:</b>
|
||||
|
||||
<li>
|
||||
<tt><a href="../classes/Matrix.html"><tt>Matrix</tt></a></tt> — This affine transform.
|
||||
<tt><a href="../classes/Matrix.html"><tt>Matrix</tt></a></tt> — This affine transform
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
@ -804,7 +1032,7 @@ destination array.</p>
|
|||
<li>
|
||||
<tt>point:</tt>
|
||||
<a href="../classes/Point.html"><tt>Point</tt></a>
|
||||
— The point to be transformed.
|
||||
— The point to be transformed
|
||||
|
||||
</li>
|
||||
|
||||
|
@ -812,14 +1040,14 @@ destination array.</p>
|
|||
<tt>src:</tt>
|
||||
<tt>Number</tt>
|
||||
— The array containing the source points
|
||||
as x, y value pairs.
|
||||
as x, y value pairs
|
||||
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<tt>srcOff:</tt>
|
||||
<tt>Number</tt>
|
||||
— The offset to the first point to be transformed.
|
||||
— The offset to the first point to be transformed
|
||||
|
||||
</li>
|
||||
|
||||
|
@ -827,7 +1055,7 @@ destination array.</p>
|
|||
<tt>dst:</tt>
|
||||
<tt>Number</tt>
|
||||
— The array into which to store the transformed
|
||||
point pairs.
|
||||
point pairs
|
||||
|
||||
</li>
|
||||
|
||||
|
@ -835,14 +1063,14 @@ destination array.</p>
|
|||
<tt>dstOff:</tt>
|
||||
<tt>Number</tt>
|
||||
— The offset of the location of the first
|
||||
transformed point in the destination array.
|
||||
transformed point in the destination array
|
||||
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<tt>numPts:</tt>
|
||||
<tt>Number</tt>
|
||||
— The number of points to tranform.
|
||||
— The number of points to tranform
|
||||
|
||||
</li>
|
||||
|
||||
|
@ -877,7 +1105,7 @@ destination array.</p>
|
|||
<ul><b>Returns:</b>
|
||||
|
||||
<li>
|
||||
<tt><tt>Number</tt></tt> — The determinant of this transform.
|
||||
<tt><tt>Number</tt></tt> — The determinant of this transform
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
@ -904,16 +1132,16 @@ destination array.</p>
|
|||
<div class="clear"></div>
|
||||
</div>
|
||||
<div class="member-text">
|
||||
|
||||
<p>Returns the rotation angle of the matrix. If a non-uniform
|
||||
rotation is applied as a result of a shear() or scale() command,
|
||||
undefined is returned, as the resulting transformation cannot be
|
||||
expressed in one rotation angle</p>
|
||||
|
||||
|
||||
<ul><b>Returns:</b>
|
||||
|
||||
<li>
|
||||
<tt><tt>Number</tt></tt> — The rotation angle of the matrix. If a non-uniform
|
||||
rotation is applied as a result of a shear() or scale() command,
|
||||
undefined is returned, as the resulting transformation cannot be
|
||||
expressed in one rotation angle.
|
||||
<tt><tt>Number</tt></tt> — The rotation angle of the matrix
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
@ -946,7 +1174,7 @@ expressed in one rotation angle.
|
|||
<ul><b>Returns:</b>
|
||||
|
||||
<li>
|
||||
<tt><tt>Boolean</tt></tt> — Whether this transform is the identity transform.
|
||||
<tt><tt>Boolean</tt></tt> — Whether this transform is the identity transform
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
@ -980,7 +1208,7 @@ invertible if the determinant is 0 or any value is non-finite or NaN.</p>
|
|||
<ul><b>Returns:</b>
|
||||
|
||||
<li>
|
||||
<tt><tt>Boolean</tt></tt> — Whether the transform is invertible.
|
||||
<tt><tt>Boolean</tt></tt> — Whether the transform is invertible
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
@ -1014,7 +1242,7 @@ inverted.</p>
|
|||
<ul><b>Returns:</b>
|
||||
|
||||
<li>
|
||||
<tt><tt>Boolean</tt></tt> — Whether the matrix is singular.
|
||||
<tt><tt>Boolean</tt></tt> — Whether the matrix is singular
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
@ -1041,14 +1269,16 @@ inverted.</p>
|
|||
<div class="clear"></div>
|
||||
</div>
|
||||
<div class="member-text">
|
||||
|
||||
<p>Inverts the transformation of the matrix. If the matrix is not invertible
|
||||
(in which case <a href="../classes/Matrix.html#issingular" onclick="return toggleMember('issingular', true);"><tt>isSingular</tt></a>() returns true), <tt>null </tt> is
|
||||
returned.</p>
|
||||
|
||||
|
||||
<ul><b>Returns:</b>
|
||||
|
||||
<li>
|
||||
<tt><a href="../classes/Matrix.html"><tt>Matrix</tt></a></tt> — An Matrix object representing the inverse
|
||||
transformation.
|
||||
<tt><a href="../classes/Matrix.html"><tt>Matrix</tt></a></tt> — The inverted matrix, or <tt>null </tt>, if the matrix is
|
||||
singular
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
@ -1082,14 +1312,14 @@ inverted.</p>
|
|||
<li>
|
||||
<tt>hor:</tt>
|
||||
<tt>Number</tt>
|
||||
— The horizontal scaling factor.
|
||||
— The horizontal scaling factor
|
||||
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<tt>ver:</tt>
|
||||
<tt>Number</tt>
|
||||
— The vertical scaling factor.
|
||||
— The vertical scaling factor
|
||||
|
||||
</li>
|
||||
|
||||
|
@ -1099,7 +1329,7 @@ inverted.</p>
|
|||
<ul><b>Returns:</b>
|
||||
|
||||
<li>
|
||||
<tt><a href="../classes/Matrix.html"><tt>Matrix</tt></a></tt> — This affine transform.
|
||||
<tt><a href="../classes/Matrix.html"><tt>Matrix</tt></a></tt> — This affine transform
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
@ -1133,14 +1363,14 @@ inverted.</p>
|
|||
<li>
|
||||
<tt>dx:</tt>
|
||||
<tt>Number</tt>
|
||||
— The distance to translate in the x direction.
|
||||
— The distance to translate in the x direction
|
||||
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<tt>dy:</tt>
|
||||
<tt>Number</tt>
|
||||
— The distance to translate in the y direction.
|
||||
— The distance to translate in the y direction
|
||||
|
||||
</li>
|
||||
|
||||
|
@ -1150,7 +1380,7 @@ inverted.</p>
|
|||
<ul><b>Returns:</b>
|
||||
|
||||
<li>
|
||||
<tt><a href="../classes/Matrix.html"><tt>Matrix</tt></a></tt> — This affine transform.
|
||||
<tt><a href="../classes/Matrix.html"><tt>Matrix</tt></a></tt> — This affine transform
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
@ -1184,14 +1414,14 @@ inverted.</p>
|
|||
<li>
|
||||
<tt>hor:</tt>
|
||||
<tt>Number</tt>
|
||||
— The horizontal shear factor.
|
||||
— The horizontal shear factor
|
||||
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<tt>ver:</tt>
|
||||
<tt>Number</tt>
|
||||
— The vertical shear factor.
|
||||
— The vertical shear factor
|
||||
|
||||
</li>
|
||||
|
||||
|
@ -1201,7 +1431,7 @@ inverted.</p>
|
|||
<ul><b>Returns:</b>
|
||||
|
||||
<li>
|
||||
<tt><a href="../classes/Matrix.html"><tt>Matrix</tt></a></tt> — This affine transform.
|
||||
<tt><a href="../classes/Matrix.html"><tt>Matrix</tt></a></tt> — This affine transform
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
@ -1235,21 +1465,21 @@ inverted.</p>
|
|||
<li>
|
||||
<tt>angle:</tt>
|
||||
<tt>Number</tt>
|
||||
— The angle of rotation measured in degrees.
|
||||
— The angle of rotation measured in degrees
|
||||
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<tt>x:</tt>
|
||||
<tt>Number</tt>
|
||||
— The x coordinate of the anchor point.
|
||||
— The x coordinate of the anchor point
|
||||
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<tt>y:</tt>
|
||||
<tt>Number</tt>
|
||||
— The y coordinate of the anchor point.
|
||||
— The y coordinate of the anchor point
|
||||
|
||||
</li>
|
||||
|
||||
|
@ -1259,7 +1489,7 @@ inverted.</p>
|
|||
<ul><b>Returns:</b>
|
||||
|
||||
<li>
|
||||
<tt><a href="../classes/Matrix.html"><tt>Matrix</tt></a></tt> — This affine transform.
|
||||
<tt><a href="../classes/Matrix.html"><tt>Matrix</tt></a></tt> — This affine transform
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
@ -1341,14 +1571,14 @@ inverted.</p>
|
|||
<li>
|
||||
<tt>hor:</tt>
|
||||
<tt>Number</tt>
|
||||
— The horizontal scaling factor.
|
||||
— The horizontal scaling factor
|
||||
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<tt>ver:</tt>
|
||||
<tt>Number</tt>
|
||||
— The vertical scaling factor.
|
||||
— The vertical scaling factor
|
||||
|
||||
</li>
|
||||
|
||||
|
@ -1359,7 +1589,7 @@ inverted.</p>
|
|||
|
||||
<li>
|
||||
<tt><a href="../classes/Matrix.html"><tt>Matrix</tt></a></tt> — A transform representing a scaling
|
||||
transformation.
|
||||
transformation
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
@ -1393,14 +1623,14 @@ inverted.</p>
|
|||
<li>
|
||||
<tt>dx:</tt>
|
||||
<tt>Number</tt>
|
||||
— The distance to translate in the x direction.
|
||||
— The distance to translate in the x direction
|
||||
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<tt>dy:</tt>
|
||||
<tt>Number</tt>
|
||||
— The distance to translate in the y direction.
|
||||
— The distance to translate in the y direction
|
||||
|
||||
</li>
|
||||
|
||||
|
@ -1411,7 +1641,7 @@ inverted.</p>
|
|||
|
||||
<li>
|
||||
<tt><a href="../classes/Matrix.html"><tt>Matrix</tt></a></tt> — A transform representing a translation
|
||||
transformation.
|
||||
transformation
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
@ -1445,14 +1675,14 @@ inverted.</p>
|
|||
<li>
|
||||
<tt>hor:</tt>
|
||||
<tt>Number</tt>
|
||||
— The horizontal shear factor.
|
||||
— The horizontal shear factor
|
||||
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<tt>ver:</tt>
|
||||
<tt>Number</tt>
|
||||
— The vertical shear factor.
|
||||
— The vertical shear factor
|
||||
|
||||
</li>
|
||||
|
||||
|
@ -1469,7 +1699,7 @@ inverted.</p>
|
|||
<ul><b>Returns:</b>
|
||||
|
||||
<li>
|
||||
<tt><a href="../classes/Matrix.html"><tt>Matrix</tt></a></tt> — A transform representing a shearing transformation.
|
||||
<tt><a href="../classes/Matrix.html"><tt>Matrix</tt></a></tt> — A transform representing a shearing transformation
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
@ -1503,21 +1733,21 @@ inverted.</p>
|
|||
<li>
|
||||
<tt>angle:</tt>
|
||||
<tt>Number</tt>
|
||||
— The angle of rotation measured in degrees.
|
||||
— The angle of rotation measured in degrees
|
||||
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<tt>x:</tt>
|
||||
<tt>Number</tt>
|
||||
— The x coordinate of the anchor point.
|
||||
— The x coordinate of the anchor point
|
||||
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<tt>y:</tt>
|
||||
<tt>Number</tt>
|
||||
— The y coordinate of the anchor point.
|
||||
— The y coordinate of the anchor point
|
||||
|
||||
</li>
|
||||
|
||||
|
@ -1527,7 +1757,7 @@ inverted.</p>
|
|||
<ul><b>Returns:</b>
|
||||
|
||||
<li>
|
||||
<tt><a href="../classes/Matrix.html"><tt>Matrix</tt></a></tt> — A transform representing a rotation transformation.
|
||||
<tt><a href="../classes/Matrix.html"><tt>Matrix</tt></a></tt> — A transform representing a rotation transformation
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
|
475
dist/docs/classes/PaperScope.html
vendored
Normal file
475
dist/docs/classes/PaperScope.html
vendored
Normal file
|
@ -0,0 +1,475 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>PaperScope</title>
|
||||
<base target="classFrame">
|
||||
<link rel="stylesheet" href="../resources/css/reference.css" type="text/css">
|
||||
<link rel="stylesheet" href="../resources/css/style.css" type="text/css">
|
||||
<link rel="stylesheet" href="../resources/css/paperscript.css" type="text/css">
|
||||
<link rel="stylesheet" href="../resources/css/codemirror.css" type="text/css">
|
||||
<script src="../resources/js/bootstrap.js" type="text/javascript"></script>
|
||||
<script src="../resources/js/paper.js" type="text/javascript"></script>
|
||||
<script src="../resources/js/codemirror.js" type="text/javascript"></script>
|
||||
<script src="../resources/js/reference.js" type="text/javascript"></script>
|
||||
</head>
|
||||
<body class="reference">
|
||||
<div class="reference-class">
|
||||
<h1>PaperScope</h1>
|
||||
|
||||
<p>The <tt>PaperScope</tt> class represents the scope associated with a
|
||||
Paper context. When working with PaperScript, these scopes are automatically
|
||||
created for us, and through clever scoping the properties and methods of the
|
||||
active scope seem to become part of the global scope.</p>
|
||||
<p>When working with normal JavaScript code, <tt>PaperScope</tt> objects need to
|
||||
be manually created and handled.</p>
|
||||
<p>Paper classes can only be accessed through <tt>PaperScope</tt> objects. Thus
|
||||
in PaperScript they are global, while in JavaScript, they are available on
|
||||
the global <a href="../classes/global.html#paper"><tt>paper</tt></a> object. For JavaScript you can use
|
||||
<a href="../classes/PaperScope.html#install-scope"><tt>paperScope.install(scope)</tt></a> to install the Paper classes and objects
|
||||
on the global scope. Note that when working with more than one scope, this
|
||||
still works for classes, but not for objects like <a href="../classes/PaperScope.html#project"><tt>paperScope.project</tt></a>,
|
||||
since they are not updated in the injected scope if scopes are switched.</p>
|
||||
<p>The global <a href="../classes/global.html#paper"><tt>paper</tt></a> object is simply a reference to the currently active
|
||||
<tt>PaperScope</tt>.</p>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- ============================== constructors ========================= -->
|
||||
<div class="reference-members"><h2>Constructors</h2>
|
||||
|
||||
|
||||
<div id="paperscope-member" class="member">
|
||||
<div id="paperscope-link" class="member-link">
|
||||
<a name="paperscope" href="#" onClick="return toggleMember('paperscope', false);"><tt><b>PaperScope</b>()</tt></a>
|
||||
</div>
|
||||
<div id="paperscope-description" class="member-description hidden">
|
||||
<div class="member-header">
|
||||
<div class="member-title">
|
||||
<div class="member-link">
|
||||
<a href="#" onClick="return toggleMember('paperscope', false);"><tt><b>PaperScope</b>()</tt></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="member-close"><input type="button" value="Close" onClick="toggleMember('paperscope', false);"></div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
<div class="member-text">
|
||||
<p>Creates a PaperScope object.</p>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="reference-members"><h2>Properties</h2>
|
||||
|
||||
|
||||
<div id="version-member" class="member">
|
||||
<div id="version-link" class="member-link">
|
||||
<a name="version" href="#" onClick="return toggleMember('version', false);"><tt><b>version</b></tt></a>
|
||||
</div>
|
||||
<div id="version-description" class="member-description hidden">
|
||||
<div class="member-header">
|
||||
<div class="member-title">
|
||||
<div class="member-link">
|
||||
<a href="#" onClick="return toggleMember('version', false);"><tt><b>version</b></tt></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="member-close"><input type="button" value="Close" onClick="toggleMember('version', false);"></div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
|
||||
<div class="member-text">
|
||||
<p>The version of Paper.js, as a float number.</p>
|
||||
|
||||
|
||||
<ul><b>Type:</b>
|
||||
<li>
|
||||
<tt>Number</tt>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="project-member" class="member">
|
||||
<div id="project-link" class="member-link">
|
||||
<a name="project" href="#" onClick="return toggleMember('project', false);"><tt><b>project</b></tt></a>
|
||||
</div>
|
||||
<div id="project-description" class="member-description hidden">
|
||||
<div class="member-header">
|
||||
<div class="member-title">
|
||||
<div class="member-link">
|
||||
<a href="#" onClick="return toggleMember('project', false);"><tt><b>project</b></tt></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="member-close"><input type="button" value="Close" onClick="toggleMember('project', false);"></div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
|
||||
<div class="member-text">
|
||||
<p>The currently active project.</p>
|
||||
|
||||
|
||||
<ul><b>Type:</b>
|
||||
<li>
|
||||
<a href="../classes/Project.html"><tt>Project</tt></a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="projects-member" class="member">
|
||||
<div id="projects-link" class="member-link">
|
||||
<a name="projects" href="#" onClick="return toggleMember('projects', false);"><tt><b>projects</b></tt></a>
|
||||
</div>
|
||||
<div id="projects-description" class="member-description hidden">
|
||||
<div class="member-header">
|
||||
<div class="member-title">
|
||||
<div class="member-link">
|
||||
<a href="#" onClick="return toggleMember('projects', false);"><tt><b>projects</b></tt></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="member-close"><input type="button" value="Close" onClick="toggleMember('projects', false);"></div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
|
||||
<div class="member-text">
|
||||
<p>The list of all open projects within the current Paper.js context.</p>
|
||||
|
||||
|
||||
<ul><b>Type:</b>
|
||||
<li>
|
||||
Array of <a href="../classes/Project.html"><tt>Project</tt></a> objects
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="view-member" class="member">
|
||||
<div id="view-link" class="member-link">
|
||||
<a name="view" href="#" onClick="return toggleMember('view', false);"><tt><b>view</b></tt></a>
|
||||
</div>
|
||||
<div id="view-description" class="member-description hidden">
|
||||
<div class="member-header">
|
||||
<div class="member-title">
|
||||
<div class="member-link">
|
||||
<a href="#" onClick="return toggleMember('view', false);"><tt><b>view</b></tt></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="member-close"><input type="button" value="Close" onClick="toggleMember('view', false);"></div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
|
||||
<div class="member-text">
|
||||
<p>The active view of the active project.</p>
|
||||
|
||||
|
||||
<ul><b>Type:</b>
|
||||
<li>
|
||||
<a href="../classes/View.html"><tt>View</tt></a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="views-member" class="member">
|
||||
<div id="views-link" class="member-link">
|
||||
<a name="views" href="#" onClick="return toggleMember('views', false);"><tt><b>views</b></tt></a>
|
||||
</div>
|
||||
<div id="views-description" class="member-description hidden">
|
||||
<div class="member-header">
|
||||
<div class="member-title">
|
||||
<div class="member-link">
|
||||
<a href="#" onClick="return toggleMember('views', false);"><tt><b>views</b></tt></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="member-close"><input type="button" value="Close" onClick="toggleMember('views', false);"></div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
|
||||
<div class="member-text">
|
||||
<p>The list of view of the active project.</p>
|
||||
|
||||
|
||||
<ul><b>Type:</b>
|
||||
<li>
|
||||
Array of <a href="../classes/View.html"><tt>View</tt></a> objects
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="tool-member" class="member">
|
||||
<div id="tool-link" class="member-link">
|
||||
<a name="tool" href="#" onClick="return toggleMember('tool', false);"><tt><b>tool</b></tt></a>
|
||||
</div>
|
||||
<div id="tool-description" class="member-description hidden">
|
||||
<div class="member-header">
|
||||
<div class="member-title">
|
||||
<div class="member-link">
|
||||
<a href="#" onClick="return toggleMember('tool', false);"><tt><b>tool</b></tt></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="member-close"><input type="button" value="Close" onClick="toggleMember('tool', false);"></div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
|
||||
<div class="member-text">
|
||||
<p>The reference to the active tool.</p>
|
||||
|
||||
|
||||
<ul><b>Type:</b>
|
||||
<li>
|
||||
<a href="../classes/Tool.html"><tt>Tool</tt></a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="tools-member" class="member">
|
||||
<div id="tools-link" class="member-link">
|
||||
<a name="tools" href="#" onClick="return toggleMember('tools', false);"><tt><b>tools</b></tt></a>
|
||||
</div>
|
||||
<div id="tools-description" class="member-description hidden">
|
||||
<div class="member-header">
|
||||
<div class="member-title">
|
||||
<div class="member-link">
|
||||
<a href="#" onClick="return toggleMember('tools', false);"><tt><b>tools</b></tt></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="member-close"><input type="button" value="Close" onClick="toggleMember('tools', false);"></div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
|
||||
<div class="member-text">
|
||||
<p>The list of available tools.</p>
|
||||
|
||||
|
||||
<ul><b>Type:</b>
|
||||
<li>
|
||||
Array of <a href="../classes/Tool.html"><tt>Tool</tt></a> objects
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- ============================== methods ================================ -->
|
||||
<div class="reference-members"><h2>Methods</h2>
|
||||
|
||||
|
||||
<div id="install-scope-member" class="member">
|
||||
<div id="install-scope-link" class="member-link">
|
||||
<a name="install-scope" href="#" onClick="return toggleMember('install-scope', false);"><tt><b>install</b>(scope)</tt></a>
|
||||
</div>
|
||||
<div id="install-scope-description" class="member-description hidden">
|
||||
<div class="member-header">
|
||||
<div class="member-title">
|
||||
<div class="member-link">
|
||||
<a href="#" onClick="return toggleMember('install-scope', false);"><tt><b>install</b>(scope)</tt></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="member-close"><input type="button" value="Close" onClick="toggleMember('install-scope', false);"></div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
<div class="member-text">
|
||||
<p>Injects the paper scope into any other given scope. Can be used for
|
||||
examle to inject the currently active PaperScope into the window's global
|
||||
scope, to emulate PaperScript-style globally accessible Paper classes and
|
||||
objects:</p>
|
||||
|
||||
<ul><b>Parameters:</b>
|
||||
|
||||
<li>
|
||||
<tt>scope:</tt>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
<b>Example</b>
|
||||
</p>
|
||||
|
||||
|
||||
<pre class="code">paper.install(window);</pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="setup-canvas-member" class="member">
|
||||
<div id="setup-canvas-link" class="member-link">
|
||||
<a name="setup-canvas" href="#" onClick="return toggleMember('setup-canvas', false);"><tt><b>setup</b>(canvas)</tt></a>
|
||||
</div>
|
||||
<div id="setup-canvas-description" class="member-description hidden">
|
||||
<div class="member-header">
|
||||
<div class="member-title">
|
||||
<div class="member-link">
|
||||
<a href="#" onClick="return toggleMember('setup-canvas', false);"><tt><b>setup</b>(canvas)</tt></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="member-close"><input type="button" value="Close" onClick="toggleMember('setup-canvas', false);"></div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
<div class="member-text">
|
||||
<p>Sets up an empty project for us. If a canvas is provided, it also creates
|
||||
a <a href="../classes/View.html"><tt>View</tt></a> for it, both linked to this scope.</p>
|
||||
|
||||
<ul><b>Parameters:</b>
|
||||
|
||||
<li>
|
||||
<tt>canvas:</tt>
|
||||
<tt>HTMLCanvasElement</tt>
|
||||
— The canvas this scope should be
|
||||
associated with.
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="reference-members"><h2>Static Methods</h2>
|
||||
|
||||
|
||||
<div id="get-id-member" class="member">
|
||||
<div id="get-id-link" class="member-link">
|
||||
<a name="get-id" href="#" onClick="return toggleMember('get-id', false);"><tt><b>PaperScope.get</b>(id)</tt></a>
|
||||
</div>
|
||||
<div id="get-id-description" class="member-description hidden">
|
||||
<div class="member-header">
|
||||
<div class="member-title">
|
||||
<div class="member-link">
|
||||
<a href="#" onClick="return toggleMember('get-id', false);"><tt><b>PaperScope.get</b>(id)</tt></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="member-close"><input type="button" value="Close" onClick="toggleMember('get-id', false);"></div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
<div class="member-text">
|
||||
<p>Retrieves a PaperScope object with the given id or associated with
|
||||
the passed canvas element.</p>
|
||||
|
||||
<ul><b>Parameters:</b>
|
||||
|
||||
<li>
|
||||
<tt>id:</tt>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="each-iter-member" class="member">
|
||||
<div id="each-iter-link" class="member-link">
|
||||
<a name="each-iter" href="#" onClick="return toggleMember('each-iter', false);"><tt><b>PaperScope.each</b>(iter)</tt></a>
|
||||
</div>
|
||||
<div id="each-iter-description" class="member-description hidden">
|
||||
<div class="member-header">
|
||||
<div class="member-title">
|
||||
<div class="member-link">
|
||||
<a href="#" onClick="return toggleMember('each-iter', false);"><tt><b>PaperScope.each</b>(iter)</tt></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="member-close"><input type="button" value="Close" onClick="toggleMember('each-iter', false);"></div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
<div class="member-text">
|
||||
<p>Iterates over all active scopes and calls the passed iterator
|
||||
function for each of them.</p>
|
||||
|
||||
<ul><b>Parameters:</b>
|
||||
|
||||
<li>
|
||||
<tt>iter:</tt>
|
||||
|
||||
— the iterator function.
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- =========================== copyright notice ========================= -->
|
||||
<p class="footer">Copyright © 2011 <a href="http://www.lehni.org" target="_blank">Jürg Lehni</a> & <a href="http://www.jonathanpuckey.com" target="_blank">Jonathan Puckey</a>. All Rights Reserved.</p>
|
||||
<div class="content-end"></div>
|
||||
|
||||
</body>
|
137
dist/docs/classes/PaperScript.html
vendored
Normal file
137
dist/docs/classes/PaperScript.html
vendored
Normal file
|
@ -0,0 +1,137 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>PaperScript</title>
|
||||
<base target="classFrame">
|
||||
<link rel="stylesheet" href="../resources/css/reference.css" type="text/css">
|
||||
<link rel="stylesheet" href="../resources/css/style.css" type="text/css">
|
||||
<link rel="stylesheet" href="../resources/css/paperscript.css" type="text/css">
|
||||
<link rel="stylesheet" href="../resources/css/codemirror.css" type="text/css">
|
||||
<script src="../resources/js/bootstrap.js" type="text/javascript"></script>
|
||||
<script src="../resources/js/paper.js" type="text/javascript"></script>
|
||||
<script src="../resources/js/codemirror.js" type="text/javascript"></script>
|
||||
<script src="../resources/js/reference.js" type="text/javascript"></script>
|
||||
</head>
|
||||
<body class="reference">
|
||||
<div class="reference-class">
|
||||
<h1>PaperScript</h1>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="reference-members"><h2>Static Methods</h2>
|
||||
|
||||
|
||||
<div id="compile-code-member" class="member">
|
||||
<div id="compile-code-link" class="member-link">
|
||||
<a name="compile-code" href="#" onClick="return toggleMember('compile-code', false);"><tt><b>PaperScript.compile</b>(code)</tt></a>
|
||||
</div>
|
||||
<div id="compile-code-description" class="member-description hidden">
|
||||
<div class="member-header">
|
||||
<div class="member-title">
|
||||
<div class="member-link">
|
||||
<a href="#" onClick="return toggleMember('compile-code', false);"><tt><b>PaperScript.compile</b>(code)</tt></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="member-close"><input type="button" value="Close" onClick="toggleMember('compile-code', false);"></div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
<div class="member-text">
|
||||
<p>Compiles PaperScript code into JavaScript code.</p>
|
||||
|
||||
<ul><b>Parameters:</b>
|
||||
|
||||
<li>
|
||||
<tt>code:</tt>
|
||||
<tt>String</tt>
|
||||
— The PaperScript code.
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<ul><b>Returns:</b>
|
||||
|
||||
<li>
|
||||
<tt><tt>String</tt></tt> — The compiled PaperScript as JavaScript code.
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="evaluate-code-scope-member" class="member">
|
||||
<div id="evaluate-code-scope-link" class="member-link">
|
||||
<a name="evaluate-code-scope" href="#" onClick="return toggleMember('evaluate-code-scope', false);"><tt><b>PaperScript.evaluate</b>(code, scope)</tt></a>
|
||||
</div>
|
||||
<div id="evaluate-code-scope-description" class="member-description hidden">
|
||||
<div class="member-header">
|
||||
<div class="member-title">
|
||||
<div class="member-link">
|
||||
<a href="#" onClick="return toggleMember('evaluate-code-scope', false);"><tt><b>PaperScript.evaluate</b>(code, scope)</tt></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="member-close"><input type="button" value="Close" onClick="toggleMember('evaluate-code-scope', false);"></div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
<div class="member-text">
|
||||
<p>Evaluates parsed PaperScript code in the passed <a href="../classes/PaperScope.html"><tt>PaperScope</tt></a>
|
||||
object. It also installs handlers automatically for us.</p>
|
||||
|
||||
<ul><b>Parameters:</b>
|
||||
|
||||
<li>
|
||||
<tt>code:</tt>
|
||||
<tt>String</tt>
|
||||
— The PaperScript code.
|
||||
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<tt>scope:</tt>
|
||||
<a href="../classes/PaperScript.html"><tt>PaperScript</tt></a>
|
||||
— The scope in which the code is executed.
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<ul><b>Returns:</b>
|
||||
|
||||
<li>
|
||||
<tt><tt>Object</tt></tt> — The result of the code evaluation.
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- =========================== copyright notice ========================= -->
|
||||
<p class="footer">Copyright © 2011 <a href="http://www.lehni.org" target="_blank">Jürg Lehni</a> & <a href="http://www.jonathanpuckey.com" target="_blank">Jonathan Puckey</a>. All Rights Reserved.</p>
|
||||
<div class="content-end"></div>
|
||||
|
||||
</body>
|
1
dist/docs/classes/ParagraphStyle.html
vendored
1
dist/docs/classes/ParagraphStyle.html
vendored
|
@ -1,6 +1,7 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>ParagraphStyle</title>
|
||||
<base target="classFrame">
|
||||
<link rel="stylesheet" href="../resources/css/reference.css" type="text/css">
|
||||
|
|
168
dist/docs/classes/Path.html
vendored
168
dist/docs/classes/Path.html
vendored
|
@ -1,6 +1,7 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Path</title>
|
||||
<base target="classFrame">
|
||||
<link rel="stylesheet" href="../resources/css/reference.css" type="text/css">
|
||||
|
@ -2350,6 +2351,96 @@ for (var i = 0; i < amount + 1; i++) {
|
|||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="getnearestlocation-point-member" class="member">
|
||||
<div id="getnearestlocation-point-link" class="member-link">
|
||||
<a name="getnearestlocation-point" href="#" onClick="return toggleMember('getnearestlocation-point', false);"><tt><b>getNearestLocation</b>(point)</tt></a>
|
||||
</div>
|
||||
<div id="getnearestlocation-point-description" class="member-description hidden">
|
||||
<div class="member-header">
|
||||
<div class="member-title">
|
||||
<div class="member-link">
|
||||
<a href="#" onClick="return toggleMember('getnearestlocation-point', false);"><tt><b>getNearestLocation</b>(point)</tt></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="member-close"><input type="button" value="Close" onClick="toggleMember('getnearestlocation-point', false);"></div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
<div class="member-text">
|
||||
<p>Returns the nearest location on the path to the specified point.</p>
|
||||
|
||||
<ul><b>Parameters:</b>
|
||||
|
||||
<li>
|
||||
<tt>point:</tt>
|
||||
|
||||
— {Point} The point for which we search the nearest location
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<ul><b>Returns:</b>
|
||||
|
||||
<li>
|
||||
<tt><a href="../classes/CurveLocation.html"><tt>CurveLocation</tt></a></tt> — The location on the path that's the closest to
|
||||
the specified point
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="getnearestpoint-point-member" class="member">
|
||||
<div id="getnearestpoint-point-link" class="member-link">
|
||||
<a name="getnearestpoint-point" href="#" onClick="return toggleMember('getnearestpoint-point', false);"><tt><b>getNearestPoint</b>(point)</tt></a>
|
||||
</div>
|
||||
<div id="getnearestpoint-point-description" class="member-description hidden">
|
||||
<div class="member-header">
|
||||
<div class="member-title">
|
||||
<div class="member-link">
|
||||
<a href="#" onClick="return toggleMember('getnearestpoint-point', false);"><tt><b>getNearestPoint</b>(point)</tt></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="member-close"><input type="button" value="Close" onClick="toggleMember('getnearestpoint-point', false);"></div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
<div class="member-text">
|
||||
<p>Returns the nearest point on the path to the specified point.</p>
|
||||
|
||||
<ul><b>Parameters:</b>
|
||||
|
||||
<li>
|
||||
<tt>point:</tt>
|
||||
|
||||
— {Point} The point for which we search the nearest point
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<ul><b>Returns:</b>
|
||||
|
||||
<li>
|
||||
<tt><a href="../classes/Point.html"><tt>Point</tt></a></tt> — The point on the path that's the closest to the specified
|
||||
point
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -4780,6 +4871,83 @@ raster.scale(5);
|
|||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="hittest-point-member" class="member">
|
||||
<div id="hittest-point-link" class="member-link">
|
||||
<a name="hittest-point" href="#" onClick="return toggleMember('hittest-point', false);"><tt><b>hitTest</b>(point[, options])</tt></a>
|
||||
</div>
|
||||
<div id="hittest-point-description" class="member-description hidden">
|
||||
<div class="member-header">
|
||||
<div class="member-title">
|
||||
<div class="member-link">
|
||||
<a href="#" onClick="return toggleMember('hittest-point', false);"><tt><b>hitTest</b>(point[, options])</tt></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="member-close"><input type="button" value="Close" onClick="toggleMember('hittest-point', false);"></div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
<div class="member-text">
|
||||
<p>Perform a hit test on the item (and its children, if it is a
|
||||
<a href="../classes/Group.html"><tt>Group</tt></a> or <a href="../classes/Layer.html"><tt>Layer</tt></a>) at the location of the specified point.</p>
|
||||
<p>The optional options object allows you to control the specifics of the
|
||||
hit test and may contain a combination of the following values:</p>
|
||||
<p><b>tolerance:</b> <tt>Number</tt> - The tolerance of the hit test in
|
||||
points.</p>
|
||||
<p><b>options.type:</b> Only hit test again a certain item
|
||||
type: <a href="../classes/PathItem.html"><tt>PathItem</tt></a>, <a href="../classes/Raster.html"><tt>Raster</tt></a>, <a href="../classes/TextItem.html"><tt>TextItem</tt></a>, etc.</p>
|
||||
<p><b>options.fill:</b> <tt>Boolean</tt> - Hit test the fill of items.</p>
|
||||
<p><b>options.stroke:</b> <tt>Boolean</tt> - Hit test the curves of path items,
|
||||
taking into account stroke width.</p>
|
||||
<p><b>options.segment:</b> <tt>Boolean</tt> - Hit test for <a href="../classes/Segment.html#point"><tt>segment.point</tt></a> of
|
||||
<a href="../classes/Path.html"><tt>Path</tt></a> items.</p>
|
||||
<p><b>options.handles:</b> <tt>Boolean</tt> - Hit test for the handles
|
||||
(<a href="../classes/Segment.html#handlein"><tt>segment.handleIn</tt></a> / <a href="../classes/Segment.html#handleout"><tt>segment.handleOut</tt></a>) of path segments.</p>
|
||||
<p><b>options.ends:</b> <tt>Boolean</tt> - Only hit test for the first or last
|
||||
segment points of open path items.</p>
|
||||
<p><b>options.bounds:</b> <tt>Boolean</tt> - Hit test the corners and side-centers
|
||||
of the bounding rectangle of items (<a href="../classes/Item.html#bounds"><tt>item.bounds</tt></a>).</p>
|
||||
<p><b>options.center:</b> <tt>Boolean</tt> - Hit test the <a href="../classes/Rectangle.html#center"><tt>rectangle.center</tt></a>
|
||||
of the bounding rectangle of items (<a href="../classes/Item.html#bounds"><tt>item.bounds</tt></a>).</p>
|
||||
<p><b>options.guide:</b> <tt>Boolean</tt> - Hit test items that have
|
||||
<a href="../classes/Item.html#guide"><tt>item.guide</tt></a> set to <tt>true</tt>.</p>
|
||||
<p><b>options.selected:</b> <tt>Boolean</tt> - Only hit selected items.</p>
|
||||
|
||||
<ul><b>Parameters:</b>
|
||||
|
||||
<li>
|
||||
<tt>point:</tt>
|
||||
<a href="../classes/Point.html"><tt>Point</tt></a>
|
||||
— The point where the hit test should be performed
|
||||
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<tt>options:</tt>
|
||||
<tt>Object</tt>
|
||||
|
||||
— optional, default: <tt>{ fill: true, stroke: true, segments: true,
|
||||
tolerance: 2 }</tt>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<ul><b>Returns:</b>
|
||||
|
||||
<li>
|
||||
<tt><a href="../classes/HitResult.html"><tt>HitResult</tt></a></tt> — A hit result object that contains more
|
||||
information about what exactly was hit or <tt>null</tt> if nothing was
|
||||
hit.
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
78
dist/docs/classes/PathItem.html
vendored
78
dist/docs/classes/PathItem.html
vendored
|
@ -1,6 +1,7 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>PathItem</title>
|
||||
<base target="classFrame">
|
||||
<link rel="stylesheet" href="../resources/css/reference.css" type="text/css">
|
||||
|
@ -2451,6 +2452,83 @@ raster.scale(5);
|
|||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="hittest-point-member" class="member">
|
||||
<div id="hittest-point-link" class="member-link">
|
||||
<a name="hittest-point" href="#" onClick="return toggleMember('hittest-point', false);"><tt><b>hitTest</b>(point[, options])</tt></a>
|
||||
</div>
|
||||
<div id="hittest-point-description" class="member-description hidden">
|
||||
<div class="member-header">
|
||||
<div class="member-title">
|
||||
<div class="member-link">
|
||||
<a href="#" onClick="return toggleMember('hittest-point', false);"><tt><b>hitTest</b>(point[, options])</tt></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="member-close"><input type="button" value="Close" onClick="toggleMember('hittest-point', false);"></div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
<div class="member-text">
|
||||
<p>Perform a hit test on the item (and its children, if it is a
|
||||
<a href="../classes/Group.html"><tt>Group</tt></a> or <a href="../classes/Layer.html"><tt>Layer</tt></a>) at the location of the specified point.</p>
|
||||
<p>The optional options object allows you to control the specifics of the
|
||||
hit test and may contain a combination of the following values:</p>
|
||||
<p><b>tolerance:</b> <tt>Number</tt> - The tolerance of the hit test in
|
||||
points.</p>
|
||||
<p><b>options.type:</b> Only hit test again a certain item
|
||||
type: <a href="../classes/PathItem.html"><tt>PathItem</tt></a>, <a href="../classes/Raster.html"><tt>Raster</tt></a>, <a href="../classes/TextItem.html"><tt>TextItem</tt></a>, etc.</p>
|
||||
<p><b>options.fill:</b> <tt>Boolean</tt> - Hit test the fill of items.</p>
|
||||
<p><b>options.stroke:</b> <tt>Boolean</tt> - Hit test the curves of path items,
|
||||
taking into account stroke width.</p>
|
||||
<p><b>options.segment:</b> <tt>Boolean</tt> - Hit test for <a href="../classes/Segment.html#point"><tt>segment.point</tt></a> of
|
||||
<a href="../classes/Path.html"><tt>Path</tt></a> items.</p>
|
||||
<p><b>options.handles:</b> <tt>Boolean</tt> - Hit test for the handles
|
||||
(<a href="../classes/Segment.html#handlein"><tt>segment.handleIn</tt></a> / <a href="../classes/Segment.html#handleout"><tt>segment.handleOut</tt></a>) of path segments.</p>
|
||||
<p><b>options.ends:</b> <tt>Boolean</tt> - Only hit test for the first or last
|
||||
segment points of open path items.</p>
|
||||
<p><b>options.bounds:</b> <tt>Boolean</tt> - Hit test the corners and side-centers
|
||||
of the bounding rectangle of items (<a href="../classes/Item.html#bounds"><tt>item.bounds</tt></a>).</p>
|
||||
<p><b>options.center:</b> <tt>Boolean</tt> - Hit test the <a href="../classes/Rectangle.html#center"><tt>rectangle.center</tt></a>
|
||||
of the bounding rectangle of items (<a href="../classes/Item.html#bounds"><tt>item.bounds</tt></a>).</p>
|
||||
<p><b>options.guide:</b> <tt>Boolean</tt> - Hit test items that have
|
||||
<a href="../classes/Item.html#guide"><tt>item.guide</tt></a> set to <tt>true</tt>.</p>
|
||||
<p><b>options.selected:</b> <tt>Boolean</tt> - Only hit selected items.</p>
|
||||
|
||||
<ul><b>Parameters:</b>
|
||||
|
||||
<li>
|
||||
<tt>point:</tt>
|
||||
<a href="../classes/Point.html"><tt>Point</tt></a>
|
||||
— The point where the hit test should be performed
|
||||
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<tt>options:</tt>
|
||||
<tt>Object</tt>
|
||||
|
||||
— optional, default: <tt>{ fill: true, stroke: true, segments: true,
|
||||
tolerance: 2 }</tt>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<ul><b>Returns:</b>
|
||||
|
||||
<li>
|
||||
<tt><a href="../classes/HitResult.html"><tt>HitResult</tt></a></tt> — A hit result object that contains more
|
||||
information about what exactly was hit or <tt>null</tt> if nothing was
|
||||
hit.
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
1
dist/docs/classes/PathStyle.html
vendored
1
dist/docs/classes/PathStyle.html
vendored
|
@ -1,6 +1,7 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>PathStyle</title>
|
||||
<base target="classFrame">
|
||||
<link rel="stylesheet" href="../resources/css/reference.css" type="text/css">
|
||||
|
|
78
dist/docs/classes/PlacedItem.html
vendored
78
dist/docs/classes/PlacedItem.html
vendored
|
@ -1,6 +1,7 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>PlacedItem</title>
|
||||
<base target="classFrame">
|
||||
<link rel="stylesheet" href="../resources/css/reference.css" type="text/css">
|
||||
|
@ -1665,6 +1666,83 @@ raster.scale(5);
|
|||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="hittest-point-member" class="member">
|
||||
<div id="hittest-point-link" class="member-link">
|
||||
<a name="hittest-point" href="#" onClick="return toggleMember('hittest-point', false);"><tt><b>hitTest</b>(point[, options])</tt></a>
|
||||
</div>
|
||||
<div id="hittest-point-description" class="member-description hidden">
|
||||
<div class="member-header">
|
||||
<div class="member-title">
|
||||
<div class="member-link">
|
||||
<a href="#" onClick="return toggleMember('hittest-point', false);"><tt><b>hitTest</b>(point[, options])</tt></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="member-close"><input type="button" value="Close" onClick="toggleMember('hittest-point', false);"></div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
<div class="member-text">
|
||||
<p>Perform a hit test on the item (and its children, if it is a
|
||||
<a href="../classes/Group.html"><tt>Group</tt></a> or <a href="../classes/Layer.html"><tt>Layer</tt></a>) at the location of the specified point.</p>
|
||||
<p>The optional options object allows you to control the specifics of the
|
||||
hit test and may contain a combination of the following values:</p>
|
||||
<p><b>tolerance:</b> <tt>Number</tt> - The tolerance of the hit test in
|
||||
points.</p>
|
||||
<p><b>options.type:</b> Only hit test again a certain item
|
||||
type: <a href="../classes/PathItem.html"><tt>PathItem</tt></a>, <a href="../classes/Raster.html"><tt>Raster</tt></a>, <a href="../classes/TextItem.html"><tt>TextItem</tt></a>, etc.</p>
|
||||
<p><b>options.fill:</b> <tt>Boolean</tt> - Hit test the fill of items.</p>
|
||||
<p><b>options.stroke:</b> <tt>Boolean</tt> - Hit test the curves of path items,
|
||||
taking into account stroke width.</p>
|
||||
<p><b>options.segment:</b> <tt>Boolean</tt> - Hit test for <a href="../classes/Segment.html#point"><tt>segment.point</tt></a> of
|
||||
<a href="../classes/Path.html"><tt>Path</tt></a> items.</p>
|
||||
<p><b>options.handles:</b> <tt>Boolean</tt> - Hit test for the handles
|
||||
(<a href="../classes/Segment.html#handlein"><tt>segment.handleIn</tt></a> / <a href="../classes/Segment.html#handleout"><tt>segment.handleOut</tt></a>) of path segments.</p>
|
||||
<p><b>options.ends:</b> <tt>Boolean</tt> - Only hit test for the first or last
|
||||
segment points of open path items.</p>
|
||||
<p><b>options.bounds:</b> <tt>Boolean</tt> - Hit test the corners and side-centers
|
||||
of the bounding rectangle of items (<a href="../classes/Item.html#bounds"><tt>item.bounds</tt></a>).</p>
|
||||
<p><b>options.center:</b> <tt>Boolean</tt> - Hit test the <a href="../classes/Rectangle.html#center"><tt>rectangle.center</tt></a>
|
||||
of the bounding rectangle of items (<a href="../classes/Item.html#bounds"><tt>item.bounds</tt></a>).</p>
|
||||
<p><b>options.guide:</b> <tt>Boolean</tt> - Hit test items that have
|
||||
<a href="../classes/Item.html#guide"><tt>item.guide</tt></a> set to <tt>true</tt>.</p>
|
||||
<p><b>options.selected:</b> <tt>Boolean</tt> - Only hit selected items.</p>
|
||||
|
||||
<ul><b>Parameters:</b>
|
||||
|
||||
<li>
|
||||
<tt>point:</tt>
|
||||
<a href="../classes/Point.html"><tt>Point</tt></a>
|
||||
— The point where the hit test should be performed
|
||||
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<tt>options:</tt>
|
||||
<tt>Object</tt>
|
||||
|
||||
— optional, default: <tt>{ fill: true, stroke: true, segments: true,
|
||||
tolerance: 2 }</tt>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<ul><b>Returns:</b>
|
||||
|
||||
<li>
|
||||
<tt><a href="../classes/HitResult.html"><tt>HitResult</tt></a></tt> — A hit result object that contains more
|
||||
information about what exactly was hit or <tt>null</tt> if nothing was
|
||||
hit.
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
78
dist/docs/classes/PlacedSymbol.html
vendored
78
dist/docs/classes/PlacedSymbol.html
vendored
|
@ -1,6 +1,7 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>PlacedSymbol</title>
|
||||
<base target="classFrame">
|
||||
<link rel="stylesheet" href="../resources/css/reference.css" type="text/css">
|
||||
|
@ -1751,6 +1752,83 @@ raster.scale(5);
|
|||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="hittest-point-member" class="member">
|
||||
<div id="hittest-point-link" class="member-link">
|
||||
<a name="hittest-point" href="#" onClick="return toggleMember('hittest-point', false);"><tt><b>hitTest</b>(point[, options])</tt></a>
|
||||
</div>
|
||||
<div id="hittest-point-description" class="member-description hidden">
|
||||
<div class="member-header">
|
||||
<div class="member-title">
|
||||
<div class="member-link">
|
||||
<a href="#" onClick="return toggleMember('hittest-point', false);"><tt><b>hitTest</b>(point[, options])</tt></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="member-close"><input type="button" value="Close" onClick="toggleMember('hittest-point', false);"></div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
<div class="member-text">
|
||||
<p>Perform a hit test on the item (and its children, if it is a
|
||||
<a href="../classes/Group.html"><tt>Group</tt></a> or <a href="../classes/Layer.html"><tt>Layer</tt></a>) at the location of the specified point.</p>
|
||||
<p>The optional options object allows you to control the specifics of the
|
||||
hit test and may contain a combination of the following values:</p>
|
||||
<p><b>tolerance:</b> <tt>Number</tt> - The tolerance of the hit test in
|
||||
points.</p>
|
||||
<p><b>options.type:</b> Only hit test again a certain item
|
||||
type: <a href="../classes/PathItem.html"><tt>PathItem</tt></a>, <a href="../classes/Raster.html"><tt>Raster</tt></a>, <a href="../classes/TextItem.html"><tt>TextItem</tt></a>, etc.</p>
|
||||
<p><b>options.fill:</b> <tt>Boolean</tt> - Hit test the fill of items.</p>
|
||||
<p><b>options.stroke:</b> <tt>Boolean</tt> - Hit test the curves of path items,
|
||||
taking into account stroke width.</p>
|
||||
<p><b>options.segment:</b> <tt>Boolean</tt> - Hit test for <a href="../classes/Segment.html#point"><tt>segment.point</tt></a> of
|
||||
<a href="../classes/Path.html"><tt>Path</tt></a> items.</p>
|
||||
<p><b>options.handles:</b> <tt>Boolean</tt> - Hit test for the handles
|
||||
(<a href="../classes/Segment.html#handlein"><tt>segment.handleIn</tt></a> / <a href="../classes/Segment.html#handleout"><tt>segment.handleOut</tt></a>) of path segments.</p>
|
||||
<p><b>options.ends:</b> <tt>Boolean</tt> - Only hit test for the first or last
|
||||
segment points of open path items.</p>
|
||||
<p><b>options.bounds:</b> <tt>Boolean</tt> - Hit test the corners and side-centers
|
||||
of the bounding rectangle of items (<a href="../classes/Item.html#bounds"><tt>item.bounds</tt></a>).</p>
|
||||
<p><b>options.center:</b> <tt>Boolean</tt> - Hit test the <a href="../classes/Rectangle.html#center"><tt>rectangle.center</tt></a>
|
||||
of the bounding rectangle of items (<a href="../classes/Item.html#bounds"><tt>item.bounds</tt></a>).</p>
|
||||
<p><b>options.guide:</b> <tt>Boolean</tt> - Hit test items that have
|
||||
<a href="../classes/Item.html#guide"><tt>item.guide</tt></a> set to <tt>true</tt>.</p>
|
||||
<p><b>options.selected:</b> <tt>Boolean</tt> - Only hit selected items.</p>
|
||||
|
||||
<ul><b>Parameters:</b>
|
||||
|
||||
<li>
|
||||
<tt>point:</tt>
|
||||
<a href="../classes/Point.html"><tt>Point</tt></a>
|
||||
— The point where the hit test should be performed
|
||||
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<tt>options:</tt>
|
||||
<tt>Object</tt>
|
||||
|
||||
— optional, default: <tt>{ fill: true, stroke: true, segments: true,
|
||||
tolerance: 2 }</tt>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<ul><b>Returns:</b>
|
||||
|
||||
<li>
|
||||
<tt><a href="../classes/HitResult.html"><tt>HitResult</tt></a></tt> — A hit result object that contains more
|
||||
information about what exactly was hit or <tt>null</tt> if nothing was
|
||||
hit.
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
27
dist/docs/classes/Point.html
vendored
27
dist/docs/classes/Point.html
vendored
|
@ -1,6 +1,7 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Point</title>
|
||||
<base target="classFrame">
|
||||
<link rel="stylesheet" href="../resources/css/reference.css" type="text/css">
|
||||
|
@ -1146,7 +1147,7 @@ is not modified!</p>
|
|||
<ul><b>Returns:</b>
|
||||
|
||||
<li>
|
||||
<tt><a href="../classes/Point.html"><tt>Point</tt></a></tt> — the transformed point
|
||||
<tt><a href="../classes/Point.html"><tt>Point</tt></a></tt> — The transformed point
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
@ -1160,18 +1161,18 @@ is not modified!</p>
|
|||
|
||||
<h3>Distance & Length</h3>
|
||||
|
||||
<div id="getdistance-point-member" class="member">
|
||||
<div id="getdistance-point-link" class="member-link">
|
||||
<a name="getdistance-point" href="#" onClick="return toggleMember('getdistance-point', false);"><tt><b>getDistance</b>(point)</tt></a>
|
||||
<div id="getdistance-point-squared-member" class="member">
|
||||
<div id="getdistance-point-squared-link" class="member-link">
|
||||
<a name="getdistance-point-squared" href="#" onClick="return toggleMember('getdistance-point-squared', false);"><tt><b>getDistance</b>(point, squared)</tt></a>
|
||||
</div>
|
||||
<div id="getdistance-point-description" class="member-description hidden">
|
||||
<div id="getdistance-point-squared-description" class="member-description hidden">
|
||||
<div class="member-header">
|
||||
<div class="member-title">
|
||||
<div class="member-link">
|
||||
<a href="#" onClick="return toggleMember('getdistance-point', false);"><tt><b>getDistance</b>(point)</tt></a>
|
||||
<a href="#" onClick="return toggleMember('getdistance-point-squared', false);"><tt><b>getDistance</b>(point, squared)</tt></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="member-close"><input type="button" value="Close" onClick="toggleMember('getdistance-point', false);"></div>
|
||||
<div class="member-close"><input type="button" value="Close" onClick="toggleMember('getdistance-point-squared', false);"></div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
<div class="member-text">
|
||||
|
@ -1184,6 +1185,14 @@ is not modified!</p>
|
|||
<a href="../classes/Point.html"><tt>Point</tt></a>
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<tt>squared:</tt>
|
||||
<tt>Boolean</tt>
|
||||
— Controls whether the distance should remain
|
||||
squared, or its square root should be calculated.
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
@ -1229,7 +1238,7 @@ changing its angle and returns it as a new point. The optional
|
|||
<li>
|
||||
<tt>length:</tt>
|
||||
<tt>Number</tt>
|
||||
— the length of the normalized vector
|
||||
— The length of the normalized vector
|
||||
— optional, default: <tt>1</tt>
|
||||
</li>
|
||||
|
||||
|
@ -1239,7 +1248,7 @@ changing its angle and returns it as a new point. The optional
|
|||
<ul><b>Returns:</b>
|
||||
|
||||
<li>
|
||||
<tt><a href="../classes/Point.html"><tt>Point</tt></a></tt> — the normalized vector of the vector that is represented
|
||||
<tt><a href="../classes/Point.html"><tt>Point</tt></a></tt> — The normalized vector of the vector that is represented
|
||||
by this point's coordinates.
|
||||
</li>
|
||||
|
||||
|
|
78
dist/docs/classes/PointText.html
vendored
78
dist/docs/classes/PointText.html
vendored
|
@ -1,6 +1,7 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>PointText</title>
|
||||
<base target="classFrame">
|
||||
<link rel="stylesheet" href="../resources/css/reference.css" type="text/css">
|
||||
|
@ -1714,6 +1715,83 @@ raster.scale(5);
|
|||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="hittest-point-member" class="member">
|
||||
<div id="hittest-point-link" class="member-link">
|
||||
<a name="hittest-point" href="#" onClick="return toggleMember('hittest-point', false);"><tt><b>hitTest</b>(point[, options])</tt></a>
|
||||
</div>
|
||||
<div id="hittest-point-description" class="member-description hidden">
|
||||
<div class="member-header">
|
||||
<div class="member-title">
|
||||
<div class="member-link">
|
||||
<a href="#" onClick="return toggleMember('hittest-point', false);"><tt><b>hitTest</b>(point[, options])</tt></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="member-close"><input type="button" value="Close" onClick="toggleMember('hittest-point', false);"></div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
<div class="member-text">
|
||||
<p>Perform a hit test on the item (and its children, if it is a
|
||||
<a href="../classes/Group.html"><tt>Group</tt></a> or <a href="../classes/Layer.html"><tt>Layer</tt></a>) at the location of the specified point.</p>
|
||||
<p>The optional options object allows you to control the specifics of the
|
||||
hit test and may contain a combination of the following values:</p>
|
||||
<p><b>tolerance:</b> <tt>Number</tt> - The tolerance of the hit test in
|
||||
points.</p>
|
||||
<p><b>options.type:</b> Only hit test again a certain item
|
||||
type: <a href="../classes/PathItem.html"><tt>PathItem</tt></a>, <a href="../classes/Raster.html"><tt>Raster</tt></a>, <a href="../classes/TextItem.html"><tt>TextItem</tt></a>, etc.</p>
|
||||
<p><b>options.fill:</b> <tt>Boolean</tt> - Hit test the fill of items.</p>
|
||||
<p><b>options.stroke:</b> <tt>Boolean</tt> - Hit test the curves of path items,
|
||||
taking into account stroke width.</p>
|
||||
<p><b>options.segment:</b> <tt>Boolean</tt> - Hit test for <a href="../classes/Segment.html#point"><tt>segment.point</tt></a> of
|
||||
<a href="../classes/Path.html"><tt>Path</tt></a> items.</p>
|
||||
<p><b>options.handles:</b> <tt>Boolean</tt> - Hit test for the handles
|
||||
(<a href="../classes/Segment.html#handlein"><tt>segment.handleIn</tt></a> / <a href="../classes/Segment.html#handleout"><tt>segment.handleOut</tt></a>) of path segments.</p>
|
||||
<p><b>options.ends:</b> <tt>Boolean</tt> - Only hit test for the first or last
|
||||
segment points of open path items.</p>
|
||||
<p><b>options.bounds:</b> <tt>Boolean</tt> - Hit test the corners and side-centers
|
||||
of the bounding rectangle of items (<a href="../classes/Item.html#bounds"><tt>item.bounds</tt></a>).</p>
|
||||
<p><b>options.center:</b> <tt>Boolean</tt> - Hit test the <a href="../classes/Rectangle.html#center"><tt>rectangle.center</tt></a>
|
||||
of the bounding rectangle of items (<a href="../classes/Item.html#bounds"><tt>item.bounds</tt></a>).</p>
|
||||
<p><b>options.guide:</b> <tt>Boolean</tt> - Hit test items that have
|
||||
<a href="../classes/Item.html#guide"><tt>item.guide</tt></a> set to <tt>true</tt>.</p>
|
||||
<p><b>options.selected:</b> <tt>Boolean</tt> - Only hit selected items.</p>
|
||||
|
||||
<ul><b>Parameters:</b>
|
||||
|
||||
<li>
|
||||
<tt>point:</tt>
|
||||
<a href="../classes/Point.html"><tt>Point</tt></a>
|
||||
— The point where the hit test should be performed
|
||||
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<tt>options:</tt>
|
||||
<tt>Object</tt>
|
||||
|
||||
— optional, default: <tt>{ fill: true, stroke: true, segments: true,
|
||||
tolerance: 2 }</tt>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<ul><b>Returns:</b>
|
||||
|
||||
<li>
|
||||
<tt><a href="../classes/HitResult.html"><tt>HitResult</tt></a></tt> — A hit result object that contains more
|
||||
information about what exactly was hit or <tt>null</tt> if nothing was
|
||||
hit.
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
94
dist/docs/classes/Project.html
vendored
94
dist/docs/classes/Project.html
vendored
|
@ -1,6 +1,7 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Project</title>
|
||||
<base target="classFrame">
|
||||
<link rel="stylesheet" href="../resources/css/reference.css" type="text/css">
|
||||
|
@ -16,7 +17,7 @@
|
|||
<div class="reference-class">
|
||||
<h1>Project</h1>
|
||||
|
||||
<p>A Project object in Paper.js is what usually is refered to as the
|
||||
<p>A Project object in Paper.js is what usually is referred to as the
|
||||
document: The top level object that holds all the items contained in the
|
||||
scene graph. As the term document is already taken in the browser context,
|
||||
it is called Project.</p>
|
||||
|
@ -25,10 +26,10 @@ created items, give access to the selected items, and will in future versions
|
|||
offer ways to query for items in the scene graph defining specific
|
||||
requirements, and means to persist and load from different formats, such as
|
||||
SVG and PDF.</p>
|
||||
<p>The currently active project can be accessed through the global
|
||||
{@see _global_#project} variable.</p>
|
||||
<p>An array of all open projects is accessible through the global
|
||||
{@see _global_#projects} variable.</p>
|
||||
<p>The currently active project can be accessed through the
|
||||
<a href="../classes/PaperScope.html#project"><tt>paperScope.project</tt></a> variable.</p>
|
||||
<p>An array of all open projects is accessible through the
|
||||
<a href="../classes/PaperScope.html#projects"><tt>paperScope.projects</tt></a> variable.</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
@ -53,7 +54,7 @@ SVG and PDF.</p>
|
|||
<div class="member-text">
|
||||
<p>Creates a Paper.js project.</p>
|
||||
<p>When working with PaperScript, a project is automatically created for us
|
||||
and the global {@see _global_#project} variable points to it.</p>
|
||||
and the <a href="../classes/PaperScope.html#project"><tt>paperScope.project</tt></a> variable points to it.</p>
|
||||
|
||||
|
||||
|
||||
|
@ -158,7 +159,7 @@ var path2 = new Path.Circle(new Point(175, 50), 20);
|
|||
</div>
|
||||
|
||||
<div class="member-text">
|
||||
<p>The index of the project in the global projects array.</p>
|
||||
<p>The index of the project in the <a href="../classes/PaperScope.html#projects"><tt>paperScope.projects</tt></a> list.</p>
|
||||
|
||||
|
||||
<ul><b>Type:</b>
|
||||
|
@ -417,7 +418,7 @@ in it.</p>
|
|||
<div class="clear"></div>
|
||||
</div>
|
||||
<div class="member-text">
|
||||
<p>Removes this project from the global {@see _global_#projects} list.</p>
|
||||
<p>Removes this project from the <a href="../classes/PaperScope.html#projects"><tt>paperScope.projects</tt></a> list.</p>
|
||||
|
||||
|
||||
|
||||
|
@ -472,6 +473,83 @@ in it.</p>
|
|||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="hittest-point-member" class="member">
|
||||
<div id="hittest-point-link" class="member-link">
|
||||
<a name="hittest-point" href="#" onClick="return toggleMember('hittest-point', false);"><tt><b>hitTest</b>(point[, options])</tt></a>
|
||||
</div>
|
||||
<div id="hittest-point-description" class="member-description hidden">
|
||||
<div class="member-header">
|
||||
<div class="member-title">
|
||||
<div class="member-link">
|
||||
<a href="#" onClick="return toggleMember('hittest-point', false);"><tt><b>hitTest</b>(point[, options])</tt></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="member-close"><input type="button" value="Close" onClick="toggleMember('hittest-point', false);"></div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
<div class="member-text">
|
||||
<p>Perform a hit test on the items contained within the project at the
|
||||
location of the specified point.</p>
|
||||
<p>The optional options object allows you to control the specifics of the
|
||||
hit test and may contain a combination of the following values:</p>
|
||||
<p><b>tolerance:</b> <tt>Number</tt> - The tolerance of the hit test in
|
||||
points.</p>
|
||||
<p><b>type:</b> Only hit test again a certain item
|
||||
type: <a href="../classes/PathItem.html"><tt>PathItem</tt></a>, <a href="../classes/Raster.html"><tt>Raster</tt></a>, <a href="../classes/TextItem.html"><tt>TextItem</tt></a>, etc.</p>
|
||||
<p><b>fill:</b> <tt>Boolean</tt> - Hit test the fill of items.</p>
|
||||
<p><b>stroke:</b> <tt>Boolean</tt> - Hit test the curves of path items,
|
||||
taking into account stroke width.</p>
|
||||
<p><b>segment:</b> <tt>Boolean</tt> - Hit test for <a href="../classes/Segment.html#point"><tt>segment.point</tt></a> of
|
||||
<a href="../classes/Path.html"><tt>Path</tt></a> items.</p>
|
||||
<p><b>handles:</b> <tt>Boolean</tt> - Hit test for the handles
|
||||
(<a href="../classes/Segment.html#handlein"><tt>segment.handleIn</tt></a> / <a href="../classes/Segment.html#handleout"><tt>segment.handleOut</tt></a>) of path segments.</p>
|
||||
<p><b>ends:</b> <tt>Boolean</tt> - Only hit test for the first or last
|
||||
segment points of open path items.</p>
|
||||
<p><b>bounds:</b> <tt>Boolean</tt> - Hit test the corners and side-centers
|
||||
of the bounding rectangle of items (<a href="../classes/Item.html#bounds"><tt>item.bounds</tt></a>).</p>
|
||||
<p><b>center:</b> <tt>Boolean</tt> - Hit test the <a href="../classes/Rectangle.html#center"><tt>rectangle.center</tt></a>
|
||||
of the bounding rectangle of items (<a href="../classes/Item.html#bounds"><tt>item.bounds</tt></a>).</p>
|
||||
<p><b>guide:</b> <tt>Boolean</tt> - Hit test items that have
|
||||
<a href="../classes/Item.html#guide"><tt>item.guide</tt></a> set to <tt>true</tt>.</p>
|
||||
<p><b>selected:</b> <tt>Boolean</tt> - Only hit selected items.</p>
|
||||
|
||||
<ul><b>Parameters:</b>
|
||||
|
||||
<li>
|
||||
<tt>point:</tt>
|
||||
<a href="../classes/Point.html"><tt>Point</tt></a>
|
||||
— The point where the hit test should be performed
|
||||
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<tt>options:</tt>
|
||||
<tt>Object</tt>
|
||||
|
||||
— optional, default: <tt>{ fill: true, stroke: true, segments: true,
|
||||
tolerance: true }</tt>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<ul><b>Returns:</b>
|
||||
|
||||
<li>
|
||||
<tt><a href="../classes/HitResult.html"><tt>HitResult</tt></a></tt> — A hit result object that contains more
|
||||
information about what exactly was hit or <tt>null</tt> if nothing was
|
||||
hit.
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
1
dist/docs/classes/RGBColor.html
vendored
1
dist/docs/classes/RGBColor.html
vendored
|
@ -1,6 +1,7 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>RGBColor</title>
|
||||
<base target="classFrame">
|
||||
<link rel="stylesheet" href="../resources/css/reference.css" type="text/css">
|
||||
|
|
78
dist/docs/classes/Raster.html
vendored
78
dist/docs/classes/Raster.html
vendored
|
@ -1,6 +1,7 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Raster</title>
|
||||
<base target="classFrame">
|
||||
<link rel="stylesheet" href="../resources/css/reference.css" type="text/css">
|
||||
|
@ -2335,6 +2336,83 @@ raster.scale(5);
|
|||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="hittest-point-member" class="member">
|
||||
<div id="hittest-point-link" class="member-link">
|
||||
<a name="hittest-point" href="#" onClick="return toggleMember('hittest-point', false);"><tt><b>hitTest</b>(point[, options])</tt></a>
|
||||
</div>
|
||||
<div id="hittest-point-description" class="member-description hidden">
|
||||
<div class="member-header">
|
||||
<div class="member-title">
|
||||
<div class="member-link">
|
||||
<a href="#" onClick="return toggleMember('hittest-point', false);"><tt><b>hitTest</b>(point[, options])</tt></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="member-close"><input type="button" value="Close" onClick="toggleMember('hittest-point', false);"></div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
<div class="member-text">
|
||||
<p>Perform a hit test on the item (and its children, if it is a
|
||||
<a href="../classes/Group.html"><tt>Group</tt></a> or <a href="../classes/Layer.html"><tt>Layer</tt></a>) at the location of the specified point.</p>
|
||||
<p>The optional options object allows you to control the specifics of the
|
||||
hit test and may contain a combination of the following values:</p>
|
||||
<p><b>tolerance:</b> <tt>Number</tt> - The tolerance of the hit test in
|
||||
points.</p>
|
||||
<p><b>options.type:</b> Only hit test again a certain item
|
||||
type: <a href="../classes/PathItem.html"><tt>PathItem</tt></a>, <a href="../classes/Raster.html"><tt>Raster</tt></a>, <a href="../classes/TextItem.html"><tt>TextItem</tt></a>, etc.</p>
|
||||
<p><b>options.fill:</b> <tt>Boolean</tt> - Hit test the fill of items.</p>
|
||||
<p><b>options.stroke:</b> <tt>Boolean</tt> - Hit test the curves of path items,
|
||||
taking into account stroke width.</p>
|
||||
<p><b>options.segment:</b> <tt>Boolean</tt> - Hit test for <a href="../classes/Segment.html#point"><tt>segment.point</tt></a> of
|
||||
<a href="../classes/Path.html"><tt>Path</tt></a> items.</p>
|
||||
<p><b>options.handles:</b> <tt>Boolean</tt> - Hit test for the handles
|
||||
(<a href="../classes/Segment.html#handlein"><tt>segment.handleIn</tt></a> / <a href="../classes/Segment.html#handleout"><tt>segment.handleOut</tt></a>) of path segments.</p>
|
||||
<p><b>options.ends:</b> <tt>Boolean</tt> - Only hit test for the first or last
|
||||
segment points of open path items.</p>
|
||||
<p><b>options.bounds:</b> <tt>Boolean</tt> - Hit test the corners and side-centers
|
||||
of the bounding rectangle of items (<a href="../classes/Item.html#bounds"><tt>item.bounds</tt></a>).</p>
|
||||
<p><b>options.center:</b> <tt>Boolean</tt> - Hit test the <a href="../classes/Rectangle.html#center"><tt>rectangle.center</tt></a>
|
||||
of the bounding rectangle of items (<a href="../classes/Item.html#bounds"><tt>item.bounds</tt></a>).</p>
|
||||
<p><b>options.guide:</b> <tt>Boolean</tt> - Hit test items that have
|
||||
<a href="../classes/Item.html#guide"><tt>item.guide</tt></a> set to <tt>true</tt>.</p>
|
||||
<p><b>options.selected:</b> <tt>Boolean</tt> - Only hit selected items.</p>
|
||||
|
||||
<ul><b>Parameters:</b>
|
||||
|
||||
<li>
|
||||
<tt>point:</tt>
|
||||
<a href="../classes/Point.html"><tt>Point</tt></a>
|
||||
— The point where the hit test should be performed
|
||||
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<tt>options:</tt>
|
||||
<tt>Object</tt>
|
||||
|
||||
— optional, default: <tt>{ fill: true, stroke: true, segments: true,
|
||||
tolerance: 2 }</tt>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<ul><b>Returns:</b>
|
||||
|
||||
<li>
|
||||
<tt><a href="../classes/HitResult.html"><tt>HitResult</tt></a></tt> — A hit result object that contains more
|
||||
information about what exactly was hit or <tt>null</tt> if nothing was
|
||||
hit.
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
1
dist/docs/classes/Rectangle.html
vendored
1
dist/docs/classes/Rectangle.html
vendored
|
@ -1,6 +1,7 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Rectangle</title>
|
||||
<base target="classFrame">
|
||||
<link rel="stylesheet" href="../resources/css/reference.css" type="text/css">
|
||||
|
|
1
dist/docs/classes/Segment.html
vendored
1
dist/docs/classes/Segment.html
vendored
|
@ -1,6 +1,7 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Segment</title>
|
||||
<base target="classFrame">
|
||||
<link rel="stylesheet" href="../resources/css/reference.css" type="text/css">
|
||||
|
|
1
dist/docs/classes/Size.html
vendored
1
dist/docs/classes/Size.html
vendored
|
@ -1,6 +1,7 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Size</title>
|
||||
<base target="classFrame">
|
||||
<link rel="stylesheet" href="../resources/css/reference.css" type="text/css">
|
||||
|
|
1
dist/docs/classes/Symbol.html
vendored
1
dist/docs/classes/Symbol.html
vendored
|
@ -1,6 +1,7 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Symbol</title>
|
||||
<base target="classFrame">
|
||||
<link rel="stylesheet" href="../resources/css/reference.css" type="text/css">
|
||||
|
|
78
dist/docs/classes/TextItem.html
vendored
78
dist/docs/classes/TextItem.html
vendored
|
@ -1,6 +1,7 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>TextItem</title>
|
||||
<base target="classFrame">
|
||||
<link rel="stylesheet" href="../resources/css/reference.css" type="text/css">
|
||||
|
@ -1772,6 +1773,83 @@ raster.scale(5);
|
|||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="hittest-point-member" class="member">
|
||||
<div id="hittest-point-link" class="member-link">
|
||||
<a name="hittest-point" href="#" onClick="return toggleMember('hittest-point', false);"><tt><b>hitTest</b>(point[, options])</tt></a>
|
||||
</div>
|
||||
<div id="hittest-point-description" class="member-description hidden">
|
||||
<div class="member-header">
|
||||
<div class="member-title">
|
||||
<div class="member-link">
|
||||
<a href="#" onClick="return toggleMember('hittest-point', false);"><tt><b>hitTest</b>(point[, options])</tt></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="member-close"><input type="button" value="Close" onClick="toggleMember('hittest-point', false);"></div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
<div class="member-text">
|
||||
<p>Perform a hit test on the item (and its children, if it is a
|
||||
<a href="../classes/Group.html"><tt>Group</tt></a> or <a href="../classes/Layer.html"><tt>Layer</tt></a>) at the location of the specified point.</p>
|
||||
<p>The optional options object allows you to control the specifics of the
|
||||
hit test and may contain a combination of the following values:</p>
|
||||
<p><b>tolerance:</b> <tt>Number</tt> - The tolerance of the hit test in
|
||||
points.</p>
|
||||
<p><b>options.type:</b> Only hit test again a certain item
|
||||
type: <a href="../classes/PathItem.html"><tt>PathItem</tt></a>, <a href="../classes/Raster.html"><tt>Raster</tt></a>, <a href="../classes/TextItem.html"><tt>TextItem</tt></a>, etc.</p>
|
||||
<p><b>options.fill:</b> <tt>Boolean</tt> - Hit test the fill of items.</p>
|
||||
<p><b>options.stroke:</b> <tt>Boolean</tt> - Hit test the curves of path items,
|
||||
taking into account stroke width.</p>
|
||||
<p><b>options.segment:</b> <tt>Boolean</tt> - Hit test for <a href="../classes/Segment.html#point"><tt>segment.point</tt></a> of
|
||||
<a href="../classes/Path.html"><tt>Path</tt></a> items.</p>
|
||||
<p><b>options.handles:</b> <tt>Boolean</tt> - Hit test for the handles
|
||||
(<a href="../classes/Segment.html#handlein"><tt>segment.handleIn</tt></a> / <a href="../classes/Segment.html#handleout"><tt>segment.handleOut</tt></a>) of path segments.</p>
|
||||
<p><b>options.ends:</b> <tt>Boolean</tt> - Only hit test for the first or last
|
||||
segment points of open path items.</p>
|
||||
<p><b>options.bounds:</b> <tt>Boolean</tt> - Hit test the corners and side-centers
|
||||
of the bounding rectangle of items (<a href="../classes/Item.html#bounds"><tt>item.bounds</tt></a>).</p>
|
||||
<p><b>options.center:</b> <tt>Boolean</tt> - Hit test the <a href="../classes/Rectangle.html#center"><tt>rectangle.center</tt></a>
|
||||
of the bounding rectangle of items (<a href="../classes/Item.html#bounds"><tt>item.bounds</tt></a>).</p>
|
||||
<p><b>options.guide:</b> <tt>Boolean</tt> - Hit test items that have
|
||||
<a href="../classes/Item.html#guide"><tt>item.guide</tt></a> set to <tt>true</tt>.</p>
|
||||
<p><b>options.selected:</b> <tt>Boolean</tt> - Only hit selected items.</p>
|
||||
|
||||
<ul><b>Parameters:</b>
|
||||
|
||||
<li>
|
||||
<tt>point:</tt>
|
||||
<a href="../classes/Point.html"><tt>Point</tt></a>
|
||||
— The point where the hit test should be performed
|
||||
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<tt>options:</tt>
|
||||
<tt>Object</tt>
|
||||
|
||||
— optional, default: <tt>{ fill: true, stroke: true, segments: true,
|
||||
tolerance: 2 }</tt>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<ul><b>Returns:</b>
|
||||
|
||||
<li>
|
||||
<tt><a href="../classes/HitResult.html"><tt>HitResult</tt></a></tt> — A hit result object that contains more
|
||||
information about what exactly was hit or <tt>null</tt> if nothing was
|
||||
hit.
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
49
dist/docs/classes/Tool.html
vendored
49
dist/docs/classes/Tool.html
vendored
|
@ -1,6 +1,7 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Tool</title>
|
||||
<base target="classFrame">
|
||||
<link rel="stylesheet" href="../resources/css/reference.css" type="text/css">
|
||||
|
@ -49,54 +50,6 @@ function onMouseDrag(event) {
|
|||
|
||||
</div>
|
||||
|
||||
<!-- ============================== constructors ========================= -->
|
||||
<div class="reference-members"><h2>Constructors</h2>
|
||||
|
||||
|
||||
<div id="tool-handlers-scope-member" class="member">
|
||||
<div id="tool-handlers-scope-link" class="member-link">
|
||||
<a name="tool-handlers-scope" href="#" onClick="return toggleMember('tool-handlers-scope', false);"><tt><b>Tool</b>(handlers, scope)</tt></a>
|
||||
</div>
|
||||
<div id="tool-handlers-scope-description" class="member-description hidden">
|
||||
<div class="member-header">
|
||||
<div class="member-title">
|
||||
<div class="member-link">
|
||||
<a href="#" onClick="return toggleMember('tool-handlers-scope', false);"><tt><b>Tool</b>(handlers, scope)</tt></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="member-close"><input type="button" value="Close" onClick="toggleMember('tool-handlers-scope', false);"></div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
<div class="member-text">
|
||||
<p>Initializes the tool's settings, so a new tool can be assigned to it</p>
|
||||
|
||||
<ul><b>Parameters:</b>
|
||||
|
||||
<li>
|
||||
<tt>handlers:</tt>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<tt>scope:</tt>
|
||||
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
36
dist/docs/classes/ToolEvent.html
vendored
36
dist/docs/classes/ToolEvent.html
vendored
|
@ -1,6 +1,7 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>ToolEvent</title>
|
||||
<base target="classFrame">
|
||||
<link rel="stylesheet" href="../resources/css/reference.css" type="text/css">
|
||||
|
@ -273,6 +274,41 @@ difference to the mousedown position is returned.</p>
|
|||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="item-member" class="member">
|
||||
<div id="item-link" class="member-link">
|
||||
<a name="item" href="#" onClick="return toggleMember('item', false);"><tt><b>item</b></tt></a>
|
||||
</div>
|
||||
<div id="item-description" class="member-description hidden">
|
||||
<div class="member-header">
|
||||
<div class="member-title">
|
||||
<div class="member-link">
|
||||
<a href="#" onClick="return toggleMember('item', false);"><tt><b>item</b></tt></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="member-close"><input type="button" value="Close" onClick="toggleMember('item', false);"></div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
|
||||
<div class="member-text">
|
||||
<p>The item at the position of the mouse (if any).</p>
|
||||
<p>If the item is contained within one or more <a href="../classes/Group.html"><tt>Group</tt></a> or
|
||||
<a href="../classes/CompoundPath.html"><tt>CompoundPath</tt></a> items, the most top level group or compound path
|
||||
that it is contained within is returned.</p>
|
||||
|
||||
|
||||
<ul><b>Type:</b>
|
||||
<li>
|
||||
<a href="../classes/Item.html"><tt>Item</tt></a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
|
1
dist/docs/classes/View.html
vendored
1
dist/docs/classes/View.html
vendored
|
@ -1,6 +1,7 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>View</title>
|
||||
<base target="classFrame">
|
||||
<link rel="stylesheet" href="../resources/css/reference.css" type="text/css">
|
||||
|
|
82
dist/docs/classes/global.html
vendored
82
dist/docs/classes/global.html
vendored
|
@ -1,6 +1,7 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>_global_</title>
|
||||
<base target="classFrame">
|
||||
<link rel="stylesheet" href="../resources/css/reference.css" type="text/css">
|
||||
|
@ -27,28 +28,28 @@
|
|||
<div class="reference-members"><h2>Properties</h2>
|
||||
|
||||
|
||||
<div id="version-member" class="member">
|
||||
<div id="version-link" class="member-link">
|
||||
<a name="version" href="#" onClick="return toggleMember('version', false);"><tt><b>version</b></tt></a>
|
||||
<div id="paper-member" class="member">
|
||||
<div id="paper-link" class="member-link">
|
||||
<a name="paper" href="#" onClick="return toggleMember('paper', false);"><tt><b>paper</b></tt></a>
|
||||
</div>
|
||||
<div id="version-description" class="member-description hidden">
|
||||
<div id="paper-description" class="member-description hidden">
|
||||
<div class="member-header">
|
||||
<div class="member-title">
|
||||
<div class="member-link">
|
||||
<a href="#" onClick="return toggleMember('version', false);"><tt><b>version</b></tt></a>
|
||||
<a href="#" onClick="return toggleMember('paper', false);"><tt><b>paper</b></tt></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="member-close"><input type="button" value="Close" onClick="toggleMember('version', false);"></div>
|
||||
<div class="member-close"><input type="button" value="Close" onClick="toggleMember('paper', false);"></div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
|
||||
<div class="member-text">
|
||||
<p>The version of Paper.js, as a float number.</p>
|
||||
<p>A reference to the currently active <a href="../classes/PaperScope.html"><tt>PaperScope</tt></a> object.</p>
|
||||
|
||||
|
||||
<ul><b>Type:</b>
|
||||
<li>
|
||||
<tt>Number</tt>
|
||||
<a href="../classes/PaperScope.html"><tt>PaperScope</tt></a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
@ -59,6 +60,8 @@
|
|||
</div>
|
||||
|
||||
|
||||
<h3>Global PaperScope Properties (for PaperScript)</h3>
|
||||
|
||||
<div id="project-member" class="member">
|
||||
<div id="project-link" class="member-link">
|
||||
<a name="project" href="#" onClick="return toggleMember('project', false);"><tt><b>project</b></tt></a>
|
||||
|
@ -171,12 +174,12 @@
|
|||
</div>
|
||||
|
||||
<div class="member-text">
|
||||
<p>The active view of the active project.</p>
|
||||
<p>The list of view of the active project.</p>
|
||||
|
||||
|
||||
<ul><b>Type:</b>
|
||||
<li>
|
||||
<a href="../classes/View.html"><tt>View</tt></a>
|
||||
Array of <a href="../classes/View.html"><tt>View</tt></a> objects
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
@ -203,7 +206,7 @@
|
|||
</div>
|
||||
|
||||
<div class="member-text">
|
||||
<p>The reference to the tool object.</p>
|
||||
<p>The reference to the active tool.</p>
|
||||
|
||||
|
||||
<ul><b>Type:</b>
|
||||
|
@ -219,7 +222,39 @@
|
|||
</div>
|
||||
|
||||
|
||||
<h3>View Event Handlers</h3>
|
||||
<div id="tools-member" class="member">
|
||||
<div id="tools-link" class="member-link">
|
||||
<a name="tools" href="#" onClick="return toggleMember('tools', false);"><tt><b>tools</b></tt></a>
|
||||
</div>
|
||||
<div id="tools-description" class="member-description hidden">
|
||||
<div class="member-header">
|
||||
<div class="member-title">
|
||||
<div class="member-link">
|
||||
<a href="#" onClick="return toggleMember('tools', false);"><tt><b>tools</b></tt></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="member-close"><input type="button" value="Close" onClick="toggleMember('tools', false);"></div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
|
||||
<div class="member-text">
|
||||
<p>The list of available tools.</p>
|
||||
|
||||
|
||||
<ul><b>Type:</b>
|
||||
<li>
|
||||
Array of <a href="../classes/Tool.html"><tt>Tool</tt></a> objects
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<h3>View Event Handlers (for PaperScript)</h3>
|
||||
|
||||
<div id="onframe-member" class="member">
|
||||
<div id="onframe-link" class="member-link">
|
||||
|
@ -285,7 +320,7 @@
|
|||
</div>
|
||||
|
||||
|
||||
<h3>Mouse Event Handlers</h3>
|
||||
<h3>Mouse Event Handlers (for PaperScript)</h3>
|
||||
|
||||
<div id="onmousedown-member" class="member">
|
||||
<div id="onmousedown-link" class="member-link">
|
||||
|
@ -415,7 +450,7 @@
|
|||
</div>
|
||||
|
||||
|
||||
<h3>Keyboard Event Handlers</h3>
|
||||
<h3>Keyboard Event Handlers (for PaperScript)</h3>
|
||||
|
||||
<div id="onkeydown-member" class="member">
|
||||
<div id="onkeydown-link" class="member-link">
|
||||
|
@ -477,25 +512,6 @@
|
|||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="style-member" class="member">
|
||||
<div id="style-link" class="member-link">
|
||||
<a name="style" href="#" onClick="return toggleMember('style', false);"><tt><b>Style</b></tt></a>
|
||||
</div>
|
||||
<div id="style-description" class="member-description hidden">
|
||||
<div class="member-header">
|
||||
<div class="member-title">
|
||||
<div class="member-link">
|
||||
<a href="#" onClick="return toggleMember('style', false);"><tt><b>Style</b></tt></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="member-close"><input type="button" value="Close" onClick="toggleMember('style', false);"></div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
10
dist/docs/classes/index.html
vendored
10
dist/docs/classes/index.html
vendored
|
@ -1,6 +1,7 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Paper.js</title>
|
||||
<base target="classFrame">
|
||||
<link rel="stylesheet" href="../resources/css/reference.css" type="text/css">
|
||||
|
@ -29,6 +30,8 @@
|
|||
<li><a href="../classes/PlacedItem.html">PlacedItem</a></li>
|
||||
<li><a href="../classes/Raster.html">Raster</a></li>
|
||||
<li><a href="../classes/PlacedSymbol.html">PlacedSymbol</a></li>
|
||||
<li><hr /></li>
|
||||
<li><a href="../classes/HitResult.html">HitResult</a></li>
|
||||
</ul>
|
||||
<li>
|
||||
<h2>Paths</h2>
|
||||
|
@ -55,6 +58,7 @@
|
|||
<li><a href="../classes/RGBColor.html">RGBColor</a></li>
|
||||
<li><a href="../classes/GrayColor.html">GrayColor</a></li>
|
||||
<li><a href="../classes/HSBColor.html">HSBColor</a></li>
|
||||
<li><a href="../classes/HSLColor.html">HSLColor</a></li>
|
||||
</ul>
|
||||
<li>
|
||||
<h2>Gradients</h2>
|
||||
|
@ -81,6 +85,12 @@
|
|||
<li><a href="../classes/CharacterStyle.html">CharacterStyle</a></li>
|
||||
<li><a href="../classes/ParagraphStyle.html">ParagraphStyle</a></li>
|
||||
</ul>
|
||||
<li>
|
||||
<h2>JavaScript</h2>
|
||||
<ul>
|
||||
<li><a href="../classes/PaperScope.html">PaperScope</a></li>
|
||||
<li><a href="../classes/PaperScript.html">PaperScript</a></li>
|
||||
</ul>
|
||||
</ul>
|
||||
</body>
|
||||
</html>
|
1
dist/docs/index.html
vendored
1
dist/docs/index.html
vendored
|
@ -1,6 +1,7 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>
|
||||
Paper.js API
|
||||
</title>
|
||||
|
|
3590
dist/docs/resources/js/paper.js
vendored
3590
dist/docs/resources/js/paper.js
vendored
File diff suppressed because one or more lines are too long
9
dist/docs/resources/js/reference.js
vendored
9
dist/docs/resources/js/reference.js
vendored
|
@ -119,10 +119,15 @@ PaperScript = HtmlElement.extend({
|
|||
var scope = paper.PaperScope.get(script.$);
|
||||
if (scope) {
|
||||
// Update script to edited version
|
||||
script.setText(editor.getValue());
|
||||
var code = editor.getValue();
|
||||
script.setText(code);
|
||||
// Keep a reference to the used canvas, since we're going to
|
||||
// fully clear the scope and initialize again with this canvas.
|
||||
var canvas = scope.view.canvas;
|
||||
// Clear scope first, then evaluate a new script.
|
||||
scope.clear();
|
||||
scope.evaluate(script.$);
|
||||
scope.initialize(canvas);
|
||||
scope.evaluate(code);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
578
dist/paper.js
vendored
578
dist/paper.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue