Sign in to follow this  
Guest

ImageSize in XML gauges

Recommended Posts

Hi all,I am a novice programmer of the new XML gauges, and for starting, a very simple question: In the sentence "ImageSize X,Y,Z,K", the Z and K parameters are the witdh and height of the bmp image, but what are the X and Y parameters?thanks

Share this post


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

>Hi all, >>I am a novice programmer of the new XML gauges, and for >starting, a very simple question: In the sentence "ImageSize >X,Y,Z,K", the Z and K parameters are the witdh and height of >the bmp image, but what are the X and Y parameters? That would be ImageSizes="x,y,z,w"The first set refer to the 'default' size image stored in the 640 sub-directory of the gauge. The second set (z,w) are the dimensions of the 2nd (higher resolution) image stored in the 1024 sub-directory of the gauge.Note, it isn't strictly necessary to have both sizes, but you must at least have the 'default' size.Two points to keep in mind when designing artwork for gauges:1) The ratio between 640x480 and 1024x768 is 1:1.62) If you want to use both sizes, then to be sure that you are developing the gauge properly, use ONLY the 640x480 set when determining x,y cordinates (i.e., don't even HAVE a 1024 sub-directory in the gauge folder during development!). This will make sure that you're actually working with the 'small' set!When you are finished, designing and testing the gauge, edit the .XML code to add the ImageSizes for the 1024x768 set, and - of course - be sure to create a 1024 subdirctory and put the larger set of .bmp files in it! :)HINTS ON CREATING ARTWORK:I'm not going to retype the same information that's in the SDK, but I will tell you now that when designing your artwork, it's better to start with the largest images your paint program can handle, and then scale them downwards. IOW, create a very large set of image(s) [do NOT place 'type' at this time!], place *everything* in separate layers, then re-size them to your final dimensions.After creating the appropriate sizes, save the separate 'parts' (such as a needles, knobs, etc.) from each layer into a separate .bmp file. Since they were all 're-sized' together, you are guaranteed that they will play together well... :)Now, you can add the type (numbers, labels, etc.) to each set of graphic images. This is necessary because the 640 set will use aliased type, and the 1024 set will use anti-aliased type.I know this is more than you asked for, but hopefully it will help! :)Have fun!

Share this post


Link to post
Share on other sites

Hi BillThank you very much for your answer, a very complete lesson.

Share this post


Link to post
Share on other sites

Is it possible to have folders for resolutions other than 600 and 1024? For example, can I include folders called "1280" and "1600"?

Share this post


Link to post
Share on other sites

>Is it possible to have folders for resolutions other than 600>and 1024? For example, can I include folders called "1280" and>"1600"?No. Well, you can have any folder you want, but it will not be used by the gauge.

Share this post


Link to post
Share on other sites

FWIW, that schema isn't used in FSX any longer. In fact, it's seldom use by anyone for FS9 gauges either... ;)I mean, who builds a "low resolution panel" anymore?Does anyone still USE 640x480 screen resolution? :)

Share this post


Link to post
Share on other sites

I'm a liitle puzzled now.I've checked my own XML gauges and none of the actual gauges use ImageSizes. For development puposes I keep the gauges for my Hawker Fury with the aircraft in C:Program FilesMicrosoft GamesFlight Simulator 9AircraftHawker_Fury_1panelFury I don't need either a 640 or 1024 sub folder. I reference the gauges in panel config by, for example:gauge01=Fury!Turn_Slip, 446, 360 The only reference I have to any size is for the background in panel.cfg:{Window00}file_1024=Fury07.bmpsize_mm=1024,768

Share this post


Link to post
Share on other sites

That scheme was introduced for FS2002's debut of the XML gauge system. At that time, many people were still using lower res monitors, so it made perfect sense to have a "dual-resolution gauge texture" system.Beginning with FS2004 (FS9), the dual-resolution scheme was depecrated, although it was -of course- still supported.Now, with FSX although support for the earlier XML Schema (syntax) is provided, it is highly likely that it will not be supported in the next FS release.

Share this post


Link to post
Share on other sites

-snip-> Now, with FSX although support for the earlier XML Schema> (syntax) is provided, it is highly likely that it will> not be supported in the next FS release. groan! So that would mean we would be stuck with the 'new in FSX' BLOATED, difficult at best for a human to parse, XML... :( Paul

Share this post


Link to post
Share on other sites

Precisely... now the question is, what's the point of the ImageSizes parameter anyway? You can put any values in there, the image will always show up in its original size. As far as I can see there's no way of scaling images, which is a shame as we're stuck with 1024x768 res gauges.

Share this post


Link to post
Share on other sites

>Precisely... now the question is, what's the point of the>ImageSizes parameter anyway? You can put any values in there,>the image will always show up in its original size.The original purpose of the ImageSizes value was to allow the fs panel system to automatically re-calculate x,y coordinates for the "upscaled size bitmaps."All x,y coordinates specified in the actual gauge script was based on the "low resolution" bitmap set.Since this is no longer needed, the ImageSizes property is no longer required, and unless you DO have a dual set of bitmaps, it is simply ignored.

Share this post


Link to post
Share on other sites

It's like Bill said. Forget about that image size - just don't use it in your gauges. Make the bitmaps in a good size, maybe twice as large as they will appear in the 2D panel and simply scale down the whole gauge via the panel.cfg. This will give you the best results - at least this is my opinion about this.Only in case you run FS on a low end machine, it makes sense to scale down the bitmaps to that size, they appear in the 2D panel (or the VC in default view). In this case FS can "use" the bitmaps as they are and does not have to rescale them, which will give you some more fps...

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this