Wither

Coordinate Tracer Plotting

Recommended Posts

Good day, everyone! Those that remember me will find that I return from my 10 year seclusion with more life experience! And a cat that I live alone with. Those that don't will get nothing of value out of this first paragraph.

 

I made a simple tool for plotting points on the canvas that I hadn't quite seen done the same way before. I had a need for finding particular points on an image and mousing around to read the coordinates on the bottom was tedious and less precise than I'd like. My solution was to draw a crosshair centered on whatever point you tell it. It can optionally place the [x, y] reference as an ordered pair nearby the point as well. It uses your selected Primary Color for everything.  It's great for locating points on a GUI image (if you, like me, happen to be working on modding a game that uses a single image for its GUI elements). I'm sure you could find other uses for it! Screenshots included to try and demonstrate its practical usage.

My coding ability is mostly in the "pattern recognition" phase, but I figured there's no reason not to share it. Made in CodeLab, then migrated to VS for dynamic control over the input sliders. Please feel free to message me with coding tips and messages akin to "oh my god, I thought you were dead!"

Thanks to the PdN Team for giving me well over a decade of entertainment in the world of photo manipulation!

pointfinder1.jpg

pointfinder2.jpg

pointfinder3.jpg

PointFinder.zip

  • Like 1
  • Upvote 3

Share this post


Link to post
Share on other sites
1 hour ago, Wither said:

... feel free to message me with coding tips ...

 

You can actually link the two Offset sliders in the UI.

Add a property rule in the OnCreatePropertyCollection() override. Edit the property names to reflect those in your project.

PropertyCollectionRule[] propRules = new PropertyCollectionRule[]
{
    new LinkValuesBasedOnBooleanRule<int, Int32Property>(new object[] { PropertyNames.XOffset, PropertyNames.YOffset }, PropertyNames.LinkBoxDims, false)
};

return new PropertyCollection(props, propRules);

 

1 hour ago, Wither said:

... messages akin to "oh my god, I thought you were dead!" ...

 

Welcome back.

Share this post


Link to post
Share on other sites

Welcome back @Wither ... if I remember correctly, it was your drum kit in Paint.net that was one of the things that inspired me to see what I could do in PDN

Share this post


Link to post
Share on other sites

The response to this simple thing reminds me of why I love this community!

First attempts at adapting that code snippet haven't been terrific, but I'll keep googling and compiling until it clicks.

 

Good to be back!

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.