Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
purr-data
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sanket Bhukan
purr-data
Commits
e0e93697
"README.md" did not exist on "315b83c159dfa84b47c50dec2857e35a36e95d3f"
Commit
e0e93697
authored
8 years ago
by
Jonathan Wilkes
Browse files
Options
Downloads
Patches
Plain Diff
document the svg path parsing logic
parent
4c1c5689
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
pd/doc/4.data.structures/pd-l2ork/ds-tutorials/12.path.pd
+17
-10
17 additions, 10 deletions
pd/doc/4.data.structures/pd-l2ork/ds-tutorials/12.path.pd
with
17 additions
and
10 deletions
pd/doc/4.data.structures/pd-l2ork/ds-tutorials/12.path.pd
+
17
−
10
View file @
e0e93697
...
...
@@ -3,21 +3,21 @@
#X text 0 1 New Drawing Commands: path;
#X text 1 1 __________________________;
#X text 53 23 Paths are complex drawings.;
#X obj 53
5
7 struct drawtut-path float x float y;
#X scalar drawtut-path 292 1
7
4 \;;
#X msg 53 1
2
7 stroke black \, stroke-width 1 \, fill yellow \, transform
#X obj 53
4
7 struct drawtut-path float x float y;
#X scalar drawtut-path 292 1
2
4 \;;
#X msg 53 1
0
7 stroke black \, stroke-width 1 \, fill yellow \, transform
scale 2;
#X text 671 2
7
1 <- a complex path;
#X obj 53
10
2 loadbang;
#X text 52 4
2
4 Svg paths are quite complex and powerful. After the
#X text 671 2
2
1 <- a complex path;
#X obj 53
8
2 loadbang;
#X text 52 4
0
4 Svg paths are quite complex and powerful. After the
word "path" \, you must specify single-letter drawing commands followed
by numeric coordinate and shape data for the command. A single path
can have several subpaths-- the one to the left has three \, one for
each letter.;
#X text 52 4
9
4 You can find out more about them in the svg specification:
#X text 52 4
7
4 You can find out more about them in the svg specification:
;
#X obj 52
51
5 pddp/pddplink http://www.w3.org/TR/SVG/paths.html;
#X obj 53 1
5
3 draw path m 156.27 34.6306 3.94531 0 0 25.8398 14.1992
#X obj 52
49
5 pddp/pddplink http://www.w3.org/TR/SVG/paths.html;
#X obj 53 1
3
3 draw path m 156.27 34.6306 3.94531 0 0 25.8398 14.1992
0 0 3.32031 -18.1445 0 0 -29.1602 m -19.6484 2.67578 c -2.86459 2.7e-05
-5.14324 1.06773 -6.83593 3.20312 -1.6797 2.13544 -2.51954 5.04559
-2.51953 8.73047 -1e-05 3.67189 0.83983 6.57553 2.51953 8.71094 1.69269
...
...
@@ -32,7 +32,7 @@ each letter.;
1.22395 -8.28123 3.67187 -11.0156 2.46093 -2.74737 5.74218 -4.12106
9.84375 -4.12109 m -32.6953 0.527344 3.94531 0 0 25.8398 14.1992 0
0 3.32031 -18.1445 0 0 -29.1602;
#X text 468
34
9 Unfortunately the bounding-box calculation for some
#X text 468
29
9 Unfortunately the bounding-box calculation for some
curves doesn't work as precisely as it should. This means some paths
may extend past the edges of the selection rectangle in Pd. (Like the
bottom of the "O" in the example above;
...
...
@@ -44,5 +44,12 @@ bottom of the "O" in the example above;
#X text 16 46 DESCRIPTION drawing paths to display data structure data
;
#X restore 776 520 pd META;
#X text 466 375 If you copy/paste path data from SVGs on the web \,
try putting the data in quotes and prepending "d=" \, like this:;
#X text 466 415 [draw path d="M-2 0 3-3"];
#X text 466 437 When you instantiate it \, Pd will normalize the path
data by putting spaces between each item in the path \, removing commas
\, and making all commands explicit \, like this:;
#X text 466 485 [draw path M -2 0 L 3 -3];
#X connect 5 0 11 0;
#X connect 7 0 5 0;
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment