Salut Laurent,
Hallo plc-user,
I'll have to find plc-user's messages about the dimensions of the thumbnails, like this.
https://qelectrotech.org/forum/viewtopi … 393#p17393
As I suggested several times we should use a front-view-scaling where the user can see the real size at first sight or where he/she can calculate the real size by using a simple integer factor:
1 mm <-> 2 px1 px is also the smallest step size, a QET-Element can be moved in diagram-editor. So then we could "move" the elements by 1 px = 1/2 millimeter in real-life.
Thanks going through these discussions was a good read. Either I hadn't seen these or just forgot about them, when I got back and started working on this. I agree the 1 mm <-> 2 px ratio seems like it would work well, I'll make this change and do some testing on it.
Another question is if I have a dxf that is "unit less" should I do any scaling at all or just assume it's in pixels. I don't recall which drawing it was at the moment, I'll have to try and go back to find it, but I had one drawing which was unit less and with no scaling it was quite small, but with no dimensions at all it's hard to make any assumptions and give a reasonable output that would work across all drawings. So perhaps it's better to just leave them as is, and if the user needs to scale using QET_ElementScaler they do.
Hello vadoola!
About the texts / fontsThat wasn't meant as a negative criticism: just a remark that this is the case.
It is clear to me in particular that there is still a lot of work to be done to integrate the texts correctly into the element. You will have "a lot of fun” with the text position, because it is not directly on the baseline of the first letter, but on a bounding box that is specified by qt, but not well described...A difference to many other software: QET can only handle font-sizes which are integer numbers!
No worries I didn't interpret it as negative criticism. I was just trying to point out myself that right now nothing is really handled at all for fonts and there is a lot of work there.
In another forum post there was a bug report about the text ending up in the wrong location. I looked into it and found out why, but fixing it wasn't so straight forward. Essentially per the DXF spec, if text isn't using the default alignment of Top and Left, you need to use the "Second alignment points" and then calculate the size of the text in the appropriate font, to get the x and y coordinates. Reading in these second alignment points from the DXF is easy, but calculating the text dimensions in the appropriate font not so much.
I already started doing a bit of work on the font handling stuff last night. There is a lot of work to do there, but hopefully I can start getting some small improvements going.