<div dir="ltr"><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Oct 29, 2020 at 10:30 PM Jonathan Wilkes <<a href="mailto:jon.w.wilkes@gmail.com">jon.w.wilkes@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Canvas snap-to-grid feature is now available for review:<br>
<br>
<a href="https://git.purrdata.net/jwilkes/purr-data/-/merge_requests/597" rel="noreferrer" target="_blank">https://git.purrdata.net/jwilkes/purr-data/-/merge_requests/597</a></blockquote><div><br></div><div>Thanks a bunch, I've really been waiting for this! :)</div><div><br></div><div>I already merged this into my testing branch and had a quick look, works fine for me so far.</div><div><br></div><div>I noticed one cosmetic issue, though. I'd suggest changing the translations for <span class="gmail-line" id="gmail-LC420" lang="html"><span class="gmail-s">prefs.gui.grid.show_grid and </span></span><span class="gmail-line" id="gmail-LC417" lang="html"><span class="gmail-s">prefs.gui.grid.show_grid_tt. This option is still</span></span> displayed as "grid background in edit mode" right now, but has actually become a "snap to grid" option.</div><div><br></div><div>My suggested translations can be found at <a href="https://bitbucket.org/agraef/purr-data/commits/7aca2748">https://bitbucket.org/agraef/purr-data/commits/7aca2748</a>. (@Joseph, can you please check my French? Thanks.)</div><div><br></div><div> I already have these in my testing branch, so I can add this to your MR if you want. Just let me know.</div><div><br></div><div>If anyone else wants to give it a go, try purr-data_2.15.2+git4745+7aca2748 which is currently building in the OBS preview channel at <a href="https://build.opensuse.org/package/show/home:aggraef:purr-data-git/purr-data">https://build.opensuse.org/package/show/home:aggraef:purr-data-git/purr-data</a>.</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Albert-- can you take a look at my math in canvas_snap_to_grid?<br></blockquote><div><br></div><div>Looks good to me!<span class="gmail-line" id="gmail-LC5821" lang="c"><span class="gmail-s"><br></span></span></div><div> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">I notice that once you start moving the selection, it kind of "snaps<br>
backwards" to the "floor" gridline. Is there an easy way to fix it so<br>
it always snaps to the closest gridline for the general case (e.g., in<br>
the assignment to dx/dy below the snap_got_anchor conditional)?<br></blockquote><div><br></div><div>I haven't thought about this in any depth, but have you tried rounding just xnew-xwas to the nearest grid point and finally adding snap_dx, likewise for y? That said,<span class="gmail-line" id="gmail-LC5821" lang="c"><span class="gmail-s"> for me it already works well enough as it is. :)<br></span></span></div><div><br> </div><div>Albert</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
-Jonathan<br>
_______________________________________________<br>
L2Ork-dev mailing list<br>
<a href="mailto:L2Ork-dev@disis.music.vt.edu" target="_blank">L2Ork-dev@disis.music.vt.edu</a><br>
<a href="https://disis.music.vt.edu/listinfo/l2ork-dev" rel="noreferrer" target="_blank">https://disis.music.vt.edu/listinfo/l2ork-dev</a></blockquote></div><br clear="all"><br>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr">Dr. Albert Gr"af<br>Computer Music Research Group, JGU Mainz, Germany<br>Email: <a href="mailto:aggraef@gmail.com" target="_blank">aggraef@gmail.com</a>, web: <a href="https://agraef.github.io/" target="_blank">https://agraef.github.io/</a></div></div></div></div></div></div></div>