Part Type Icon in Label Template #268
pe5er
started this conversation in
Ideas / Feature Requests
Replies: 1 comment 1 reply
-
Just now coming back around to getting Binner fully configured for my home makerspace and am in the same boat with needing a good solution for QR code and images on labels for a PT-P700. Was curious if you had any additional comments/observations about the formatting you've figured out since your original posting. Thanks! |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
It would be really cool if we could add Part Type Icons to Label Templates. That would enable automatic generation of labels that look like the one below (but with vector based icons instead of images):
I've had a play with the code base, but I am hampered by a complete lack of C# and dot net experience, so i'm not sure i'll be able to figure out a complete solution by myself!
That gets me a Part Type Icon element that I can drag into the template editor:
I've added:
but when I watch partType in the debugger, it says icon is null. I was expecting this field to contain the icon's SVG data.
as a test, I created a new part type with a custom svg icon. This shows up in the PartType response. Good enough for now:
now i'm getting somewhere! next step is to convert the SVG into a graphic, and merge that with the label. For this I plan to use svg.skia.
Here's the function for converting SVGs to graphics and merging them:
and the result, very close to what I want!
Next to do is to get the aspect ratio right, and make sure the icons render correctly. They should also be black and white only, no grayscale.
Beta Was this translation helpful? Give feedback.
All reactions