09-13-2022 10:50 AM
Is there any reference for how LabVIEW Picture Controls really work? Everything in the Picture Functions palette casts a cluster to a string and it isn't even the same cluster. I would love to know the underpinnings so I might be able to stretch the functionality. Does anyone know of such a reference?
Currently, I am trying to use Draw Multiple Lines vi to draw a "greyed out" polygon by just guessing and checking and it isn't working.
Solved! Go to Solution.
09-13-2022 12:21 PM - edited 09-13-2022 12:22 PM
Maybe once you define the meaning of a "greyed out polygon" and what you are actually trying to do, we can probably give you an easy solution. I usually use draw multiple lines. You can set the line color to grey.
09-13-2022 12:30 PM - edited 09-13-2022 12:35 PM
@usrfrnly wrote:
Is there any reference for how LabVIEW Picture Controls really work? Everything in the Picture Functions palette casts a cluster to a string and it isn't even the same cluster. I would love to know the underpinnings so I might be able to stretch the functionality. Does anyone know of such a reference?
Currently, I am trying to use Draw Multiple Lines vi to draw a "greyed out" polygon by just guessing and checking and it isn't working.
There really isn't. There are probably a few minor variations possible but the code in the VIs is the whole documentation you get.
The principle is that the picture control reads a stream of graphic primitive commands. Each of them starts of with an int16 opcode and then follows binary data in the form of a header that depends on this opcode. After that there is often some optional data based on parameters in the header. The principle is similar to how Windows EMF or the Macintosh Quickdraw used to stream graphic commands into a byte stream but it is not verbatim taken from either of them, but a LabVIEW private implementation.
Basically the code in those VIs is all the public documentation that exists. There are likely a few extra opcodes that are not really implemented in VIs like this, mostly they are however older opcodes that got superseded by newer ones that have additional features. For instance there was a copyBitmap in the past that did not have support for a mask or something like that. Rather than trying to hack this into the existing opcode they simply created a new opcode with a different data header and all was well. Maybe there are a few more hidden opcodes but the only documentation about them that exists is the LabVIEW source code itself and that is well protected. 😀
09-13-2022 12:37 PM
My bad. That omission was a product of too many edits. The Picture Functions palette has a vi called Draw Greyed Out Rect that creates a semi-transparent color block. When one uses draw multiple lines, the fill option creates a solid color block (the "polygon" in my original post) and not a "greyed out" one. if there is an easy solution to changing the fill in draw multiple lines from solid to greyed out, that would be terrific.
However, my intent was to reach a deeper understanding of the possible solutions rather than just solve one little problem. That is why I asked for a reference and not a solution.
09-13-2022 01:46 PM
The way to solve your problem could look like this:
09-13-2022 02:41 PM