05-29-2009 06:55 AM - edited 05-29-2009 07:00 AM
I seem to have run into a couple of bugs bug in the display of text overlays in the Vision 8.6 package (running under LV 8.2.1).
1). When I draw a text with a certain font size, it scales nicely (vector-based) when I zoom in. If I want to cover this text with a rectangle, however, I see some anomalies when Zooming. It seems like the text is not being scaled properly for the changes in ZOOM level. I use the Rectangle shown as an area of interest which responds as expected, thus seemingly excluding the possibility that the rectangle and not the text is being scaled incorrectly.
Text as displayed at Zoom 1 (Expanded for clarity)
Text and Rectangle at Zoom 10 (not scaled)
Drawing bug?
2). On a related note, when using the"Application" font choise, the text does not seem tos cale at ALL when zooming. I see no mention of this behaviour at all in the HELP.
Application font Text at Zoom 11
Documentation bug or Font scaling bug?
Shane.
Ps Please bear in mind that ALL images shown have the SAME SIZE rectangles drawn (Except for the lowest example where the font is different - therefore different size bounding box)
06-08-2009 03:06 AM
Hi,
could you please send me the VI you tested?
Best regards
Rüdiger
06-08-2009 04:20 AM - edited 06-08-2009 04:20 AM
Sure,
here's a small example you can see the problem on.
Setting font to "Application font" stops the text scaling when the image is zoomed and setting it to "Arial" (for example) results in wrong scailing when zoomed.
Regards
Shane.
Ps Forgot to mention the VI is written in LV 8.2.1 with Vision 8.6 installed.
06-08-2009 05:29 AM
Forgot to make "Vertical Alignment" for the text to be "top" by default, otherwise the text is not displayed.
Shane.
06-09-2009 10:02 AM
Hi,
you have to use "merge overlay" and call the picture event case again. Please see the attached VI.
Best regards
Rüdiger
06-09-2009 01:49 PM - edited 06-09-2009 01:50 PM
I need the VI as LabVIEW 8.2.1 version (as mentioned twice in my posts above)
Vision components can be 8.6 as this is what I'm using but the development environmant for LabVIEW itself on my maching is 8.2.1.
Shane.
06-10-2009 03:31 PM
Anybody? Please?
Shane.
06-11-2009 11:46 AM
Shane,
I think there are no serious bugs, but some "undocumented" behavior.
At the first, "Application" font not scaled with zoom. From my point of view its not so bad. I using this fact when I want to place some text for mark ROIs, for example. When Image with ROIs zoomed, then marks are not zoomed (otherwise they will too big and stay out of image).
For second trouble with zoom for vector-based fonts here is small drawing bug, caused by resizing vector-based fonts. For example, you have put Arial 12 pt and cover it with rectangle and all looks good with Zoom = 1. Now with Zoom factor 5x font is rescaled, probably with size 60 pt. This caused misplacement text and rectangle.
You have three possibilities:
- merge overlay into another image, then show this as bitmap overlay in zoomed image (but you will not get nice vector fonts in this case, of course)
- recalculate rectangle bounds depends from zoom factor and used font (here no recipes - just try this with different zoom ratio)
- submit feature request to NI - then probably you will get this in Vision x.x
Andrey.
06-11-2009 03:30 PM
I disagree.
The bahaviour of the Application (and System font BTW), while possible very useful are not described anywhere that I could find. This makes it at least a documentation bug.
As to the incorrect scaling of the fonts, I don't see merging as a solution because this is modifying the original image, something which Overlays should NOT do. It also loses a lot of fidelity when zooming and just looks bad.
The fonts are being scaled improperly so I will submit it as a bug.
I will also suggest fixing the documentation to mention that not all font types will be scaled.
Shane.
06-12-2009 03:04 AM
Hi,
here from my side the VI in version 8.2.
Best regards
Rüdiger