← Back to team overview

kicad-developers team mailing list archive

Re: [Patch] bitmap2component: Support for multiple input units.

 

On 2019-06-14 14:24, Johannes Wågen wrote:
Hi

I have made a patch to bitmap2component so that it supports entering
dimensions in mm, inches, mils, and DPI. It is now also possible to
lock the aspectratio to the ratio of the input bitmap. When the aspect
ratio is locked and one dimension is changed, the other one is
automatically updated.

I have tried to follow the coding guidelines to the best of my
abilities, but I was a bit unsure on the capitalization of some
things. Please let me know if there is anything that need changing. I
have only tested it on linux, where it works fine.

For the future the bitmap2component is in need of a bit of
refactoring, and should possibly be moved to a common dialog. That can
be accessed from a menu in the other programs. But I think my patch
should help with the usability of the program for now.

Hi Johannes-

Thank you for the patch. This is a nice feature. I tested it and it seems to work as expected.

I have only a few small requests. First, it would be nice if you used the common EDA_UNITS_T so that we can keep the constants, well... constant. Feel free to expand it if you need "DPI".

The lock icon seems a bit off when unlocked. See attached image. Not sure what's happening here.

Best-
Seth

Attachment: unlock.png
Description: PNG image


References