-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add move_to
method for Path
#68
Comments
@charlesneimog cool project! and would certainly be great to make svg drawing simpler that way (i tried to do that in a more complicated way by translating the svg paths to pdlua paths in https://github.com/ben-wes/pd-dualsense/blob/main/dsshow-shapes.lua )! just adding this probably not surprising findings:
@agraef : i just realized that https://agraef.github.io/pd-lua/tutorial/pd-lua-intro.html doesn't mention the path drawing at all yet. i could make a draft for at least mentioning these methods briefly? or should this stay part of the help files only? also, @charlesneimog's code made me realize that currently, pdlua's help mentions |
wow, this would be really cool :) time to make a CAC tool for Pd like Open Music! @timothyschoen can you tackle that for the next update? |
I wonder: if you're only drawing the path instead of filling it, couldn't you just create a new Path instead of move_to? The difficulty with a move_to function is that it would need to function correctly for drawing and filling. And filling a path with a hole in it might not be simple |
I don't thing so @timothyschoen, mainly because of the subtraction that @ben-wes was talking about (I think). This is the result for when I try to create a new Path --x, y = params[1] * scaling, params[2] * scaling
--p:line_to(x, y) -- NOTE: Should be move_to
x, y = params[1] * scaling, params[2] * scaling
p = Path(x, y) The comment lines are the current implementation! |
@charlesneimog that's what i meant, yes. svg's default is the
|
Hi @agraef and @timothyschoen , happy end of 2024! 😄
I'm working on developing a library for handling simple scores using
pdlua
. https://github.com/charlesneimog/pd-scoreI’m rendering music glyphs using the Bravura font and the
d
attribute for SVG path data (you can check out more details here: https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/d).It works well, but I’m missing the
move_to
function onpdlua
api. It’s essentially meant to move the cursor to a new position without drawing anything. I’ve tried implementing it myself usingc
, but I don't know anything aboutTk
, plugdata or PurrData.For now, I’m using
line_to
, which almost works on low resolution but not or higher.Here’s an example of what I’m seeing:
Pure Data
PurrData
Plug Data
Obs.: Create a new
Path()
does not work because thefill
becomes wrong!I believe this would be amazing not just for score, but would be possible to draw anything from
svg
.The text was updated successfully, but these errors were encountered: