Archived

This topic is now archived and is closed to further replies.

Guest the_lord

ADI in XML, I need explenation

Recommended Posts

Hi there,i'm currently building my first ADI, at the moment I don't wanna have it precise or any indications on it, I just want that the card is in the frame... but right now it looks like thishttp://img168.imageshack.us/img168/4024/problemvt7.jpgthe code is as follows(A:Attitude indicator pitch degrees,degrees) /-/(A:Attitude indicator bank degrees,radians)Now the first picture calles Background.bmp is the Frame of the ADI, Mask.bmp is black, Ladder is what you also see on the screenshot...can anyone try to help me and explain it to me, as I didn't yet really understood the tutorial I read... maybe someone can explain me the structure step by stepthese are the three bitmaps I havehttp://img265.imageshack.us/img265/8103/workud5.jpgRegardsJohann

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

I see you using background.bmp as a mask image in your listed code above.

Share this post


Link to post
Share on other sites

As Ed said you are using the background image as a mask, which is why the ladder.bmp is showing. The structure is this.Background.bmpMask.bmpLadder.bmpCode Taken from a PFD I did a while ago(A:Circuit general panel on,bool) Your bitmap would be Background.bmp - Frame of the ADI // Your bitmap would be mask.bmp//Your bitmap would be Ladder.bmp(A:Attitude indicator pitch degrees, degrees) /-/(A:Attitude indicator bank degrees, radians)make sure the mask image is 1,1,1 for the bit you want to see and 0,0,0 for the bits that you do not want to see.Hope this helps

Share this post


Link to post
Share on other sites

Hi,Personally I don't use a mask for ADI's but rather a set of bitmaps in this order:- Ladder- Attitude background with Alpha- Attitude background with tag that removes upper and lower excedents from ladder bitmap -to avoid the problem you seem to have in your example.Something like:Tom

Share this post


Link to post
Share on other sites

>The most obvious problem is that you have the transparent and>mask areas inverted! What you have as 0,0,0 should be 1,1,1>and vice-versa... ;)>>>Bill, even that it's true the mask area is inverted, it is not a problem in the way he did the code because the ladder is being drawn over the mask bitmap, which means this last one plays no game at all here.The problem, as we can see in his composed picture, is that the ladder bmp overpasses both top and bottom of the gauge's cage. This is easy to fix using a tag, as I explained above - or resizing the ladder bmp (wouldn't be my choice though)-Tom

Share this post


Link to post
Share on other sites

ok, i started the whole thing again from scratch and got it to work now..this is how it looks in FS Panelstudioadinm1.jpgand this is how it looks in FSadiflusiiu3.jpgIf i'm not mistaken you move the top left corner of a bitmap with the axis command... i tried some different combinations, but didn't get the ADI Card Centeredhere's the code(A:Attitude indicator pitch degrees, degrees) /-/(A:Attitude indicator bank degrees, radians)

Share this post


Link to post
Share on other sites

"If i'm not mistaken you move the top left corner of a bitmap with the axis command..."Actually what you 'define' with the tag is the displacement (offset) of X and Y coordinates as to set the center of rotation for the bitmap - using together with a tag.In case of , the coordinate's reference is given by tag, so you need to keep this in mind when working with combined with . In your example, I believe should be your reference point, adjusting only Y scale to positive and negative values as neeeded.It is very common to use a tag instead of for , as it is expected Y to vary up/down proportionaly.Tom

Share this post


Link to post
Share on other sites

yeah, I used the scale command in my first code, well, now i implented it again and I found the error... actualy a pretty stupid one: I was simply using the wrong .bmp file for the ADI Card, which had a different seize...thanks for your help anyway

Share this post


Link to post
Share on other sites