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.

XML: Rotate Vector Arrow

Featured Replies

  • Moderator

I need to rotate a wind direction arrow, and I'd prefer to keep it as a vector drawn graphic.Can anyone tell me why this won't work? Without the tags, the 'arrow' will display onscreen where it's drawn......as soon as the and are added, the arrow simply disappears entirely!(A:Ambient Wind Direction, degrees) /-/Note: I've already tried drawing the 'arrow' as a self-contained graphic and using the to locate it to the "upper-left corner" as we do a bitmap, and adjusting the to the correct pivot point. It does the same vanishing act!

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

Bill, I'm ####-u-ming here. Cause the result could be the 1st sylabel.(sp) I braught up an old code sequence just too be sure.. Maybe try....Draw the vector stuff completely.... then rotate. Just like loading a bitmap then rotate,,, for instance.(A:Ambient Wind Direction, degrees) /-/RomanProud "TEAM AVSIM" RTW race member.XP Pro, FS9, FR Locked @ 23, AMD 1800+ OCd to 1900+, APIC MProc Mod (24 IRQs), Latency Mods, ECS K7S5a V1.1, 7 fans, 1 gig, 100 & 60 Gig 7200rpm HD, ASUS/NVidia GeForce 64mb AGP on 21", NVidia FX5500 vivo 256mb (CRAP) on 18", Nvidia 93.71s ( The highest can go for the GeForce3 & 5500 combined ), Savage4 32mb on 15", BV services mods.

20AUG21_Avsim_Sig.png?dl=1  FS RTWR   SHRS F-111   JoinFS   Little Navmap 
 

 

  • Author
  • Moderator

Thanks, Roman! I had to "localize" the vector points to "bitmap sizes", and then add the . (A:Ambient Wind Direction, degrees) /-/The next task is to each of the numbers on the ROSE wheel so that they are always vertically.Here is the result in sim's VC... 100% vector drawn... :)http://img511.imageshack.us/img511/1713/li...ardwip01xk1.jpgShot at 2008-06-15

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator
  • Author
  • Moderator

As it happens, there is one small error in the code above...The definition must be INSIDE the definition... ;)1. Draw the image you need in Photoshop (or similar program) to "scale" and then determine the vector drawing coordinates, as shown in the example below. Note that I began at (0,17) and worked clockwise around the image when recording the coordinates (shown as red pixels):http://img377.imageshack.us/img377/6963/windarrowry3.jpgShot at 2008-06-152. Write the XML script using the coordinates from above, and add to your gauge as a new . Note that the should be the "center point" where the "axis" of your should be relative to the background image!The should be the "center point" of the vector drawn image itself, and must be inside the definition!

	<Element id="Wind Direction Arrow">		<Position X="580" Y="952"/>		<Polygon FillColor="White" Bright="Yes">			<Axis X="12" Y="19"/>			<Point X="0" Y="17"/>			<Point X="12" Y="0"/>			<Point X="13" Y="0"/>			<Point X="24" Y="17"/>			<Point X="15" Y="17"/>			<Point X="15" Y="37"/>			<Point X="10" Y="37"/>			<Point X="10" Y="17"/>		</Polygon>		<Rotate>			<Value>(A:Ambient Wind Direction, radians)</Value>		</Rotate>	</Element>

3. Here is the final result as seen in the VC in the sim. Note that the only true bitmap in this picture is the background bezel:http://img511.imageshack.us/img511/1713/li...ardwip01xk1.jpgShot at 2008-06-15

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

Hi Bill, do you find that if you draw using 100% vector drawn, that the relative positions of the graphics change if you resize the gauge or have it show as a pop-up?I get a more stable result using bitmaps for shapes but all text is generated.cheers,nick

  • Author
  • Moderator

Nick, I have found that if I design the gauge at the actual size of it's intended display resolution, that I have far less problems with "migrating vector drawn elements..." I have noticed that even "text" will suffer a bit from misplacement if the gauge is radically scaled either up or down from its "native size."

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

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.