paper 0.12.16 → 0.12.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +19 -4
- package/dist/docs/assets/js/paper.js +22 -14
- package/dist/docs/classes/Color.html +2 -2
- package/dist/docs/classes/CompoundPath.html +3 -4
- package/dist/docs/classes/Curve.html +2 -2
- package/dist/docs/classes/CurveLocation.html +2 -2
- package/dist/docs/classes/Event.html +2 -2
- package/dist/docs/classes/Gradient.html +2 -2
- package/dist/docs/classes/GradientStop.html +2 -2
- package/dist/docs/classes/Group.html +3 -4
- package/dist/docs/classes/HitResult.html +2 -2
- package/dist/docs/classes/Item.html +3 -4
- package/dist/docs/classes/Key.html +2 -2
- package/dist/docs/classes/KeyEvent.html +2 -2
- package/dist/docs/classes/Layer.html +3 -4
- package/dist/docs/classes/Matrix.html +2 -2
- package/dist/docs/classes/MouseEvent.html +2 -2
- package/dist/docs/classes/PaperScope.html +2 -2
- package/dist/docs/classes/PaperScript.html +2 -2
- package/dist/docs/classes/Path.html +3 -4
- package/dist/docs/classes/PathItem.html +3 -4
- package/dist/docs/classes/Point.html +2 -2
- package/dist/docs/classes/PointText.html +3 -4
- package/dist/docs/classes/Project.html +3 -2
- package/dist/docs/classes/Raster.html +3 -4
- package/dist/docs/classes/Rectangle.html +2 -2
- package/dist/docs/classes/Segment.html +2 -2
- package/dist/docs/classes/Shape.html +3 -4
- package/dist/docs/classes/Size.html +2 -2
- package/dist/docs/classes/Style.html +2 -2
- package/dist/docs/classes/SymbolDefinition.html +2 -2
- package/dist/docs/classes/SymbolItem.html +3 -4
- package/dist/docs/classes/TextItem.html +3 -4
- package/dist/docs/classes/Tool.html +2 -2
- package/dist/docs/classes/ToolEvent.html +2 -2
- package/dist/docs/classes/Tween.html +2 -2
- package/dist/docs/classes/View.html +3 -3
- package/dist/docs/classes/global.html +2 -2
- package/dist/docs/classes/index.html +2 -2
- package/dist/docs/index.html +1 -1
- package/dist/paper-core.js +22 -14
- package/dist/paper-core.min.js +3 -3
- package/dist/paper-full.js +22 -14
- package/dist/paper-full.min.js +3 -3
- package/dist/paper.d.ts +175 -147
- package/dist/paperjs/LICENSE.txt +23 -0
- package/dist/paperjs/dist/node/canvas.js +66 -0
- package/dist/paperjs/dist/node/extend.js +156 -0
- package/dist/paperjs/dist/node/self.js +58 -0
- package/dist/paperjs/dist/node/xml.js +40 -0
- package/dist/paperjs/dist/paper-core.d.ts +1 -0
- package/dist/paperjs/dist/paper-core.js +15703 -0
- package/dist/paperjs/dist/paper-core.min.js +32 -0
- package/dist/paperjs/dist/paper-full.js +17472 -0
- package/dist/paperjs/dist/paper-full.min.js +32 -0
- package/dist/paperjs/dist/paper.d.ts +7394 -0
- package/dist/paperjs/docs/assets/css/docs.css +414 -0
- package/dist/paperjs/docs/assets/js/codemirror.js +4 -0
- package/dist/paperjs/docs/assets/js/docs.js +493 -0
- package/dist/paperjs/docs/assets/js/jquery.js +6 -0
- package/dist/paperjs/docs/assets/js/paper.js +17472 -0
- package/dist/paperjs/docs/classes/Color.html +2188 -0
- package/dist/paperjs/docs/classes/CompoundPath.html +8877 -0
- package/dist/paperjs/docs/classes/Curve.html +2323 -0
- package/dist/paperjs/docs/classes/CurveLocation.html +672 -0
- package/dist/paperjs/docs/classes/Event.html +176 -0
- package/dist/paperjs/docs/classes/Gradient.html +240 -0
- package/dist/paperjs/docs/classes/GradientStop.html +273 -0
- package/dist/paperjs/docs/classes/Group.html +6864 -0
- package/dist/paperjs/docs/classes/HitResult.html +239 -0
- package/dist/paperjs/docs/classes/Item.html +6628 -0
- package/dist/paperjs/docs/classes/Key.html +139 -0
- package/dist/paperjs/docs/classes/KeyEvent.html +308 -0
- package/dist/paperjs/docs/classes/Layer.html +6850 -0
- package/dist/paperjs/docs/classes/Matrix.html +1744 -0
- package/dist/paperjs/docs/classes/MouseEvent.html +355 -0
- package/dist/paperjs/docs/classes/PaperScope.html +459 -0
- package/dist/paperjs/docs/classes/PaperScript.html +198 -0
- package/dist/paperjs/docs/classes/Path.html +11775 -0
- package/dist/paperjs/docs/classes/PathItem.html +8639 -0
- package/dist/paperjs/docs/classes/Point.html +2699 -0
- package/dist/paperjs/docs/classes/PointText.html +7029 -0
- package/dist/paperjs/docs/classes/Project.html +1305 -0
- package/dist/paperjs/docs/classes/Raster.html +7843 -0
- package/dist/paperjs/docs/classes/Rectangle.html +1654 -0
- package/dist/paperjs/docs/classes/Segment.html +939 -0
- package/dist/paperjs/docs/classes/Shape.html +7363 -0
- package/dist/paperjs/docs/classes/Size.html +1825 -0
- package/dist/paperjs/docs/classes/Style.html +919 -0
- package/dist/paperjs/docs/classes/SymbolDefinition.html +311 -0
- package/dist/paperjs/docs/classes/SymbolItem.html +6755 -0
- package/dist/paperjs/docs/classes/TextItem.html +6869 -0
- package/dist/paperjs/docs/classes/Tool.html +761 -0
- package/dist/paperjs/docs/classes/ToolEvent.html +446 -0
- package/dist/paperjs/docs/classes/Tween.html +374 -0
- package/dist/paperjs/docs/classes/View.html +1772 -0
- package/dist/paperjs/docs/classes/global.html +425 -0
- package/dist/paperjs/docs/classes/index.html +88 -0
- package/dist/paperjs/docs/index.html +11 -0
- package/dist/paperjs/examples/Animated/AnimatedStar.html +53 -0
- package/dist/paperjs/examples/Animated/BooleanOperations.html +115 -0
- package/dist/paperjs/examples/Animated/CandyCrash.html +151 -0
- package/dist/paperjs/examples/Animated/Extruded.html +50 -0
- package/dist/paperjs/examples/Animated/Lines.html +53 -0
- package/dist/paperjs/examples/Animated/Smoothing.html +70 -0
- package/dist/paperjs/examples/Animated/Space.html +86 -0
- package/dist/paperjs/examples/Animated/SpaceUsingShapes.html +79 -0
- package/dist/paperjs/examples/Games/Paperoids.html +569 -0
- package/dist/paperjs/examples/JSON/Circle Testing.html +34 -0
- package/dist/paperjs/examples/JSON/Compound Path.html +25 -0
- package/dist/paperjs/examples/JSON/Empty Path Testing.html +31 -0
- package/dist/paperjs/examples/JSON/Gradients.html +34 -0
- package/dist/paperjs/examples/JSON/Group Transform.html +28 -0
- package/dist/paperjs/examples/JSON/Line Testing.html +44 -0
- package/dist/paperjs/examples/JSON/Random Path Testing.html +42 -0
- package/dist/paperjs/examples/JSON/Raster.html +29 -0
- package/dist/paperjs/examples/JSON/Rect and Attribute Testing.html +56 -0
- package/dist/paperjs/examples/JSON/Rotated Primitives.html +55 -0
- package/dist/paperjs/examples/JSON/Selection.html +43 -0
- package/dist/paperjs/examples/JSON/Shapes.html +54 -0
- package/dist/paperjs/examples/JSON/Symbols.html +30 -0
- package/dist/paperjs/examples/JSON/Text Testing.html +38 -0
- package/dist/paperjs/examples/JSON/Tiger.html +19 -0
- package/dist/paperjs/examples/JSON/Transform Test 1.html +32 -0
- package/dist/paperjs/examples/JSON/Transform Test 2.html +30 -0
- package/dist/paperjs/examples/Node.js/AnimatedStar.js +52 -0
- package/dist/paperjs/examples/Node.js/BooleanOperations.js +36 -0
- package/dist/paperjs/examples/Node.js/JSONtoPDF.js +20 -0
- package/dist/paperjs/examples/Node.js/Raster.js +32 -0
- package/dist/paperjs/examples/Node.js/RasterRemote.js +33 -0
- package/dist/paperjs/examples/Node.js/SvgExport.js +52 -0
- package/dist/paperjs/examples/Node.js/SvgImport.js +23 -0
- package/dist/paperjs/examples/Node.js/Tadpoles.js +16 -0
- package/dist/paperjs/examples/Node.js/Tadpoles.pjs +278 -0
- package/dist/paperjs/examples/Node.js/in.json +1 -0
- package/dist/paperjs/examples/Node.js/in.svg +16 -0
- package/dist/paperjs/examples/Paperjs.org/BooleanOperattions.html +115 -0
- package/dist/paperjs/examples/Paperjs.org/BouncingBalls.html +103 -0
- package/dist/paperjs/examples/Paperjs.org/Chain.html +54 -0
- package/dist/paperjs/examples/Paperjs.org/DivisionRaster.html +72 -0
- package/dist/paperjs/examples/Paperjs.org/FutureSplash.html +122 -0
- package/dist/paperjs/examples/Paperjs.org/HitTesting.html +103 -0
- package/dist/paperjs/examples/Paperjs.org/InteractiveTiger.html +777 -0
- package/dist/paperjs/examples/Paperjs.org/MetaBalls.html +132 -0
- package/dist/paperjs/examples/Paperjs.org/NyanRainbow.html +202 -0
- package/dist/paperjs/examples/Paperjs.org/PathIntersections.html +76 -0
- package/dist/paperjs/examples/Paperjs.org/Qbertify.html +146 -0
- package/dist/paperjs/examples/Paperjs.org/RadialRainbows.html +80 -0
- package/dist/paperjs/examples/Paperjs.org/RoundedRectangles.html +41 -0
- package/dist/paperjs/examples/Paperjs.org/SatieLikedToDraw.html +140 -0
- package/dist/paperjs/examples/Paperjs.org/Simplify.html +63 -0
- package/dist/paperjs/examples/Paperjs.org/SpiralRaster.html +120 -0
- package/dist/paperjs/examples/Paperjs.org/Tadpoles.html +283 -0
- package/dist/paperjs/examples/Paperjs.org/Voronoi.html +134 -0
- package/dist/paperjs/examples/Rasters/PhyllotaxisRaster.html +96 -0
- package/dist/paperjs/examples/Rasters/Raster.html +34 -0
- package/dist/paperjs/examples/Rasters/RotationRaster.html +44 -0
- package/dist/paperjs/examples/Rasters/Smoothing.html +36 -0
- package/dist/paperjs/examples/SVG Export/Circle Testing.html +32 -0
- package/dist/paperjs/examples/SVG Export/Clipping.html +17 -0
- package/dist/paperjs/examples/SVG Export/Compound Path.html +22 -0
- package/dist/paperjs/examples/SVG Export/Empty Path Testing.html +28 -0
- package/dist/paperjs/examples/SVG Export/Gradients.html +52 -0
- package/dist/paperjs/examples/SVG Export/Group Transform.html +25 -0
- package/dist/paperjs/examples/SVG Export/Line Testing.html +41 -0
- package/dist/paperjs/examples/SVG Export/Random Path Testing.html +39 -0
- package/dist/paperjs/examples/SVG Export/Raster.html +21 -0
- package/dist/paperjs/examples/SVG Export/Rect and Attribute Testing.html +53 -0
- package/dist/paperjs/examples/SVG Export/Rotated Primitives.html +80 -0
- package/dist/paperjs/examples/SVG Export/Shapes.html +58 -0
- package/dist/paperjs/examples/SVG Export/Symbols.html +27 -0
- package/dist/paperjs/examples/SVG Export/Text Testing.html +45 -0
- package/dist/paperjs/examples/SVG Export/Tiger.html +23 -0
- package/dist/paperjs/examples/SVG Export/Transform Test 1.html +29 -0
- package/dist/paperjs/examples/SVG Export/Transform Test 2.html +27 -0
- package/dist/paperjs/examples/SVG Import/Arcs.html +78 -0
- package/dist/paperjs/examples/SVG Import/Butterfly.html +223 -0
- package/dist/paperjs/examples/SVG Import/Circle and Ellipse Testing.html +26 -0
- package/dist/paperjs/examples/SVG Import/Clipping.html +100 -0
- package/dist/paperjs/examples/SVG Import/From File.html +30 -0
- package/dist/paperjs/examples/SVG Import/Gradient.html +138 -0
- package/dist/paperjs/examples/SVG Import/Gradients.html +30 -0
- package/dist/paperjs/examples/SVG Import/Inkscape Pivot.html +52 -0
- package/dist/paperjs/examples/SVG Import/Inkscape.html +88 -0
- package/dist/paperjs/examples/SVG Import/Line Testing.html +24 -0
- package/dist/paperjs/examples/SVG Import/MoreGradients.html +107 -0
- package/dist/paperjs/examples/SVG Import/Multiple Paths Test 1.html +42 -0
- package/dist/paperjs/examples/SVG Import/Multiple Paths Test 2.html +33 -0
- package/dist/paperjs/examples/SVG Import/Nested Groups Test.html +78 -0
- package/dist/paperjs/examples/SVG Import/Polybezier.html +43 -0
- package/dist/paperjs/examples/SVG Import/Rect Testing.html +25 -0
- package/dist/paperjs/examples/SVG Import/Symbols.html +24 -0
- package/dist/paperjs/examples/SVG Import/Testing.html +40 -0
- package/dist/paperjs/examples/SVG Import/Text Testing.html +19 -0
- package/dist/paperjs/examples/SVG Import/Tiger.html +742 -0
- package/dist/paperjs/examples/SVG Import/Transform Testing.html +22 -0
- package/dist/paperjs/examples/SVG Import/Viewbox.html +38 -0
- package/dist/paperjs/examples/Scripts/Arcs.html +39 -0
- package/dist/paperjs/examples/Scripts/BlendModes.html +77 -0
- package/dist/paperjs/examples/Scripts/BooleanOperations.html +937 -0
- package/dist/paperjs/examples/Scripts/CompoundPath.html +19 -0
- package/dist/paperjs/examples/Scripts/CurveTimeParameterization.html +61 -0
- package/dist/paperjs/examples/Scripts/HslColor.html +53 -0
- package/dist/paperjs/examples/Scripts/PathStructure.html +82 -0
- package/dist/paperjs/examples/Scripts/PathTangents.html +73 -0
- package/dist/paperjs/examples/Scripts/Resize.html +42 -0
- package/dist/paperjs/examples/Scripts/RoundRectangle.html +28 -0
- package/dist/paperjs/examples/Scripts/Shapes.html +54 -0
- package/dist/paperjs/examples/Scripts/StrokeBounds.html +101 -0
- package/dist/paperjs/examples/Scripts/StrokeScaling.html +65 -0
- package/dist/paperjs/examples/Tools/BezierTool.html +90 -0
- package/dist/paperjs/examples/Tools/Circles.html +28 -0
- package/dist/paperjs/examples/Tools/Clouds.html +35 -0
- package/dist/paperjs/examples/Tools/DrippingBrush.html +73 -0
- package/dist/paperjs/examples/Tools/FancyBrush.html +82 -0
- package/dist/paperjs/examples/Tools/Grid.html +44 -0
- package/dist/paperjs/examples/Tools/MultiLines.html +44 -0
- package/dist/paperjs/examples/Tools/MultipleTools.html +44 -0
- package/dist/paperjs/examples/Tools/PathEditing.html +95 -0
- package/dist/paperjs/examples/Tools/SquareRounded.html +76 -0
- package/dist/paperjs/examples/Tools/Stars.html +38 -0
- package/dist/paperjs/examples/Tools/Vektor.html +200 -0
- package/dist/paperjs/examples/Tools/Wave.html +50 -0
- package/dist/paperjs/examples/Tools/WormFarm.html +88 -0
- package/dist/paperjs/examples/Worker/Main.html +53 -0
- package/dist/paperjs/examples/Worker/Worker.js +14 -0
- package/dist/paperjs/examples/css/style.css +12 -0
- package/package.json +4 -4
|
@@ -0,0 +1,311 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8">
|
|
5
|
+
<title>SymbolDefinition</title>
|
|
6
|
+
<base target="class-frame">
|
|
7
|
+
<link href="../assets/css/docs.css" rel="stylesheet" type="text/css">
|
|
8
|
+
<script src="../assets/js/paper.js"></script>
|
|
9
|
+
<script src="../assets/js/jquery.js"></script>
|
|
10
|
+
<script src="../assets/js/codemirror.js"></script>
|
|
11
|
+
<script src="../assets/js/docs.js"></script>
|
|
12
|
+
</head>
|
|
13
|
+
<body>
|
|
14
|
+
<article class="reference">
|
|
15
|
+
<div class="reference-class">
|
|
16
|
+
<h1>SymbolDefinition</h1>
|
|
17
|
+
|
|
18
|
+
<p>Symbols allow you to place multiple instances of an item in your project. This can save memory, since all instances of a symbol simply refer to the original item and it can speed up moving around complex objects, since internal properties such as segment lists and gradient positions don’t need to be updated with every transformation.</p>
|
|
19
|
+
|
|
20
|
+
</div>
|
|
21
|
+
|
|
22
|
+
<!-- =============================== constructors ========================== -->
|
|
23
|
+
<div class="reference-members">
|
|
24
|
+
<h2>Constructors</h2>
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
<div id="symboldefinition-item" class="member">
|
|
28
|
+
<div class="member-link">
|
|
29
|
+
<a name="symboldefinition-item" href="#symboldefinition-item"><tt><b>SymbolDefinition</b>(item[, dontCenter])</tt></a>
|
|
30
|
+
</div>
|
|
31
|
+
<div class="member-description hidden">
|
|
32
|
+
<div class="member-text">
|
|
33
|
+
<p>Creates a Symbol definition.</p>
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
<ul class="member-list">
|
|
37
|
+
<h4>Parameters:</h4>
|
|
38
|
+
|
|
39
|
+
<li>
|
|
40
|
+
<tt>item:</tt>
|
|
41
|
+
<a href="../classes/Item.html"><tt>Item</tt></a>
|
|
42
|
+
— the source item which is removed from the scene graph and becomes the symbol’s definition.
|
|
43
|
+
|
|
44
|
+
</li>
|
|
45
|
+
|
|
46
|
+
<li>
|
|
47
|
+
<tt>dontCenter:</tt>
|
|
48
|
+
<tt>Boolean</tt>
|
|
49
|
+
|
|
50
|
+
— optional, default: <tt>false</tt>
|
|
51
|
+
</li>
|
|
52
|
+
|
|
53
|
+
</ul>
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
<ul class="member-list">
|
|
57
|
+
<h4>Returns:</h4>
|
|
58
|
+
|
|
59
|
+
<li>
|
|
60
|
+
<tt><a href="../classes/SymbolDefinition.html"><tt>SymbolDefinition</tt></a></tt>
|
|
61
|
+
</li>
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
</ul>
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
<h4>Example:<span class="description">Placing 100 instances of a symbol:</span></h4>
|
|
70
|
+
|
|
71
|
+
<div class="paperscript split">
|
|
72
|
+
|
|
73
|
+
<div class="buttons">
|
|
74
|
+
<div class="button run">Run</div>
|
|
75
|
+
</div>
|
|
76
|
+
|
|
77
|
+
<script type="text/paperscript" canvas="canvas-0">
|
|
78
|
+
var path = new Path.Star(new Point(0, 0), 6, 5, 13);
|
|
79
|
+
path.style = {
|
|
80
|
+
fillColor: 'white',
|
|
81
|
+
strokeColor: 'black'
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
// Create a symbol definition from the path:
|
|
85
|
+
var definition = new SymbolDefinition(path);
|
|
86
|
+
|
|
87
|
+
// Place 100 instances of the symbol definition:
|
|
88
|
+
for (var i = 0; i < 100; i++) {
|
|
89
|
+
// Place an instance of the symbol definition in the project:
|
|
90
|
+
var instance = definition.place();
|
|
91
|
+
|
|
92
|
+
// Move the instance to a random position within the view:
|
|
93
|
+
instance.position = Point.random() * view.size;
|
|
94
|
+
|
|
95
|
+
// Rotate the instance by a random amount between
|
|
96
|
+
// 0 and 360 degrees:
|
|
97
|
+
instance.rotate(Math.random() * 360);
|
|
98
|
+
|
|
99
|
+
// Scale the instance between 0.25 and 1:
|
|
100
|
+
instance.scale(0.25 + Math.random() * 0.75);
|
|
101
|
+
}
|
|
102
|
+
</script>
|
|
103
|
+
<div class="canvas"><canvas width="516" height="240" id="canvas-0"></canvas></div>
|
|
104
|
+
</div>
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
</div>
|
|
108
|
+
</div>
|
|
109
|
+
</div>
|
|
110
|
+
|
|
111
|
+
</div>
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
<!-- ================================ properties =========================== -->
|
|
118
|
+
<div class="reference-members">
|
|
119
|
+
<h2>Properties</h2>
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
<div id="project" class="member">
|
|
123
|
+
<div class="member-link">
|
|
124
|
+
<a name="project" href="#project"><tt><b>project</b></tt></a>
|
|
125
|
+
</div>
|
|
126
|
+
<div class="member-description hidden">
|
|
127
|
+
|
|
128
|
+
<div class="member-text">
|
|
129
|
+
<p>The project that this symbol belongs to.</p>
|
|
130
|
+
|
|
131
|
+
<p>Read only.</p>
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
<ul class="member-list">
|
|
136
|
+
<h4>Type:</h4>
|
|
137
|
+
<li>
|
|
138
|
+
<a href="../classes/Project.html"><tt>Project</tt></a>
|
|
139
|
+
</li>
|
|
140
|
+
</ul>
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
</div>
|
|
145
|
+
|
|
146
|
+
</div>
|
|
147
|
+
</div>
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
<div id="item" class="member">
|
|
151
|
+
<div class="member-link">
|
|
152
|
+
<a name="item" href="#item"><tt><b>item</b></tt></a>
|
|
153
|
+
</div>
|
|
154
|
+
<div class="member-description hidden">
|
|
155
|
+
|
|
156
|
+
<div class="member-text">
|
|
157
|
+
<p>The item used as the symbol’s definition.</p>
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
<ul class="member-list">
|
|
162
|
+
<h4>Type:</h4>
|
|
163
|
+
<li>
|
|
164
|
+
<a href="../classes/Item.html"><tt>Item</tt></a>
|
|
165
|
+
</li>
|
|
166
|
+
</ul>
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
</div>
|
|
171
|
+
|
|
172
|
+
</div>
|
|
173
|
+
</div>
|
|
174
|
+
|
|
175
|
+
</div>
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
<!-- ============================== methods ================================ -->
|
|
182
|
+
<div class="reference-members">
|
|
183
|
+
<h2>Methods</h2>
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
<div id="place" class="member">
|
|
187
|
+
<div class="member-link">
|
|
188
|
+
<a name="place" href="#place"><tt><b>place</b>([position])</tt></a>
|
|
189
|
+
</div>
|
|
190
|
+
<div class="member-description hidden">
|
|
191
|
+
<div class="member-text">
|
|
192
|
+
<p>Places in instance of the symbol in the project.</p>
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
<ul class="member-list">
|
|
196
|
+
<h4>Parameters:</h4>
|
|
197
|
+
|
|
198
|
+
<li>
|
|
199
|
+
<tt>position:</tt>
|
|
200
|
+
<a href="../classes/Point.html"><tt>Point</tt></a>
|
|
201
|
+
— the position of the placed symbol
|
|
202
|
+
— optional
|
|
203
|
+
</li>
|
|
204
|
+
|
|
205
|
+
</ul>
|
|
206
|
+
|
|
207
|
+
|
|
208
|
+
<ul class="member-list">
|
|
209
|
+
<h4>Returns:</h4>
|
|
210
|
+
|
|
211
|
+
<li>
|
|
212
|
+
<tt><a href="../classes/SymbolItem.html"><tt>SymbolItem</tt></a></tt>
|
|
213
|
+
</li>
|
|
214
|
+
|
|
215
|
+
|
|
216
|
+
</ul>
|
|
217
|
+
|
|
218
|
+
|
|
219
|
+
|
|
220
|
+
|
|
221
|
+
|
|
222
|
+
</div>
|
|
223
|
+
</div>
|
|
224
|
+
</div>
|
|
225
|
+
|
|
226
|
+
|
|
227
|
+
<div id="clone" class="member">
|
|
228
|
+
<div class="member-link">
|
|
229
|
+
<a name="clone" href="#clone"><tt><b>clone</b>()</tt></a>
|
|
230
|
+
</div>
|
|
231
|
+
<div class="member-description hidden">
|
|
232
|
+
<div class="member-text">
|
|
233
|
+
<p>Returns a copy of the symbol.</p>
|
|
234
|
+
|
|
235
|
+
|
|
236
|
+
|
|
237
|
+
<ul class="member-list">
|
|
238
|
+
<h4>Returns:</h4>
|
|
239
|
+
|
|
240
|
+
<li>
|
|
241
|
+
<tt><a href="../classes/SymbolDefinition.html"><tt>SymbolDefinition</tt></a></tt>
|
|
242
|
+
</li>
|
|
243
|
+
|
|
244
|
+
|
|
245
|
+
</ul>
|
|
246
|
+
|
|
247
|
+
|
|
248
|
+
|
|
249
|
+
|
|
250
|
+
|
|
251
|
+
</div>
|
|
252
|
+
</div>
|
|
253
|
+
</div>
|
|
254
|
+
|
|
255
|
+
|
|
256
|
+
<div id="equals-symbol" class="member">
|
|
257
|
+
<div class="member-link">
|
|
258
|
+
<a name="equals-symbol" href="#equals-symbol"><tt><b>equals</b>(symbol)</tt></a>
|
|
259
|
+
</div>
|
|
260
|
+
<div class="member-description hidden">
|
|
261
|
+
<div class="member-text">
|
|
262
|
+
<p>Checks whether the symbol’s definition is equal to the supplied symbol.</p>
|
|
263
|
+
|
|
264
|
+
|
|
265
|
+
<ul class="member-list">
|
|
266
|
+
<h4>Parameters:</h4>
|
|
267
|
+
|
|
268
|
+
<li>
|
|
269
|
+
<tt>symbol:</tt>
|
|
270
|
+
<a href="../classes/SymbolDefinition.html"><tt>SymbolDefinition</tt></a>
|
|
271
|
+
|
|
272
|
+
|
|
273
|
+
</li>
|
|
274
|
+
|
|
275
|
+
</ul>
|
|
276
|
+
|
|
277
|
+
|
|
278
|
+
<ul class="member-list">
|
|
279
|
+
<h4>Returns:</h4>
|
|
280
|
+
|
|
281
|
+
<li>
|
|
282
|
+
<tt><tt>Boolean</tt></tt> — <tt>true</tt> if they are equal, <tt>false</tt> otherwise
|
|
283
|
+
</li>
|
|
284
|
+
|
|
285
|
+
|
|
286
|
+
</ul>
|
|
287
|
+
|
|
288
|
+
|
|
289
|
+
|
|
290
|
+
|
|
291
|
+
|
|
292
|
+
</div>
|
|
293
|
+
</div>
|
|
294
|
+
</div>
|
|
295
|
+
|
|
296
|
+
|
|
297
|
+
|
|
298
|
+
</div>
|
|
299
|
+
|
|
300
|
+
|
|
301
|
+
|
|
302
|
+
|
|
303
|
+
<!-- =========================== copyright notice ========================== -->
|
|
304
|
+
<p class="footer">
|
|
305
|
+
Paper.js v0.12.17<br>
|
|
306
|
+
Copyright © 2011—2022 <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>
|
|
307
|
+
<div class="content-end"></div>
|
|
308
|
+
|
|
309
|
+
|
|
310
|
+
</article>
|
|
311
|
+
</body>
|