-
Notifications
You must be signed in to change notification settings - Fork 19
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
Box2d label with Draw
#650
Conversation
I want to set up the font size for text labels, but I found it complex, made it an independent issue. |
python/rikai/types/geometry.py
Outdated
""" | ||
# TODO add font size | ||
return Draw( | ||
[self, Text(text, (int(self.xmin), int(self.ymin)), color)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as I suggested in #632 , we should shift the (xmin, ymin) like (xmin, ymin-10), and 10 should be the default height (or a bit bigger) of the font size
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's automatically add some margin by default so the label doesn't overlap with the bounding box. other than that this looks a lot simpler. nice work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar to #632, but extend
Draw
instead of using a list.It can have a sugar
which list hasn't.
part of #550