Skip to content
View in the app

A better way to browse. Learn more.

The AVSIM Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Scaling images in XML

Featured Replies

Is it possible to scale an image, or element containing an image, in XML (by L:var, similar to Shift and Rotate?) Couldn't find a way all weekend, but it seems silly that this would have been left out of gauge XML...I'm working on a simple chart veiwer...XML may not work at all, as I also know of no way to dynamically load .jpgs or .gifs in XML (or even .bmps, dynamically....is it possible to reload a single window in a panel?)Failing this, can anyone recommend something out there for simple chart veiwing...no GPS, no moving maps, no "You Are Here" airplane - just something I can zoom and pan a chart with, preferably in a window I can undock and put on the second monitor? Please save me from a miserable existence, doomed to learning 'C' gauge programming....Douglas

  • Commercial Member

You may be able to (in XML) define several image sizes in several elements and control visibility using a scale var.In other words, (L:Scale, number) 1 ==.., etc....(L:Scale, number) 2 ==.., etc....etc...I've never tried to use the ImageSizes tag in that way, but it seems some variation of it may work as a ghetto method of scaling your map. You'd be using the same image.The other method would be to load a different image (presumably at a different scale) based on the scale setting.(L:Scale, number) 1 ==.., etc....(L:Scale, number) 2 ==.., etc....Just a couple ideas to try...--Jon

Jon,Thanks, your solution "B" was what I've come up with so far, but as you know, it's not ideal. I haven't been able to make ImageSizes (or ) do anything at all to the element/image.Gonna go try "HeightCode"...Douglas

Jan,I'll check out HeightCode (and WidthCode) and report back here, thanks!Douglas

The ImageSizes attributer reads ImageSizes="width,height,0,0".Play with the last two varibles of the ImageSize attribute. If they work the same as the variables used in an panel.cfg file you would have your solution.gauge #=gauge. X Y Width Heightgauge01=superh!hud2, 750, 641, 120, 120,

>Play with the last two varibles of the ImageSize attribute. >If they work the same as the variables used in an panel.cfg>file you would have your solution.If they worked, I wouldn't have asked the question :-)Actually, according to the SDK, they're not supposed to work the same. ImageSizes specifies the width and height of each of two bitmaps (A throwback to FS95 days, I believe, when panels were distributed with 640x and 1024x graphics.) So: w1,h1,w2,h2 as opposed to the x,y,w,h syntax in panel.cfg.In any event, they appear to have no effect on the on-screen size of the image.I've been sidetracked installing and learning a c compiler so I haven't tried the suggested HeightCode, but I'm sceptical that it will work on images as well as polys.Douglas

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.