PDA

View Full Version : XML gauge maskimage and background



MaddogK
May 10th, 2016, 06:48
I'm re-purposing an old and seldom used gauge with new artwork, and am having issues with the maskimage for the 'pointer' that never existed in the original gauge. I cannot figure out how the mask is positioned in reference to the pointer element, they're both the same bitmap but the mask has been edited to only have the window I need for the background. The transparency part works fine, but the position and axis are moving the pointer position to odd places in the gauge. Can someone clarify how the position and axis in the mask and pointer relate to the main gauge background ?

My pointer is exactly where I want it, and rotates correctly. It is 200X200 24 bit BMP with an axis @ 100,100. My mask is also 200X200 8 bit BMP, so I assume the axis would also be @ 100,100. Since the mask is higher up in the order, does it's position determine where the 'pointer' position is referenced or is it the other way around ? It surely doesn't position independently on the gauge face, since they're tied together being in the same element group. I tried positioning the mask @ the same position as the pointer, and the pointer moves off the right and down, I've put the mask @ 0,0 and the pointer remains off to the right and down of it's original position. If I remove the mask element the pointer snaps back to it's intended position. Should I position the mask @ the pointers position, and position the pointer @ 0,0 ? I don't get it.

Alternately, I can use the 'background' image as the mask by moving it lower in the stack, but since moving it to it's own element it leaves the gauge without an image to use for the background- so If I create a new image, what can I do with it since it won't really be viewable ? Can I use it for night illumination ?

MaddogK
May 11th, 2016, 06:45
*shrug

I dunno what I did, but removing the position statement for the element, loading the aircraft, putting the position statement back, and reloading the aircraft again seems to have reset the gauge so that all the elements are where they're supposed to be.
:dizzy:

Tho I did notice the mask and needle no longer position themselves where the axis is, but instead position the top /left corner of the bitmap @ the coordinates in the position statement, which now throws my non-linearity items way off.

weird