Archived

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

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!

Share this post


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

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.

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

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

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."

Share this post


Link to post
Share on other sites