Jump to content
Sign in to follow this  
n4gix

XML: Rotate Vector Arrow

Recommended Posts

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

Share this post


Link to post
Share on other sites

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 
 

 

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

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  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...