Archived

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

Guest iholrf

XML - For A Change... ;)

Recommended Posts

Is it possible to use something like:

<Polygon Color="Cyan" Bright="yes">	<Point X="0" Y="0"/>	<Point X="4" Y="0"/>	<Point X="2" Y="3"/></Polygon>

in a

<Value>(A:NAV1 TOFROM,ENUM)</Value>  <Case Value="0">

statement, as a direct replacement for a bitmap?I wish to replace all the bitmaps with vector drawing instructions in a gauge I'm working on, and this seems to be a minor roadblock... ;)

Share this post


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

Bill,I've had no success replacing the s in an XML "case" statement with anything else, tho I haven't specifically tried Polygons. My guess is that is simply a restatement of the C-language MAKE_ICON structure...Douglas

Share this post


Link to post
Share on other sites

>Bill,>I've had no success replacing the s in an XML "case">statement with anything else, tho I haven't specifically tried>Polygons. My guess is that is simply a restatement of>the C-language MAKE_ICON structure...You may well be right. Were this in C it would be much easier, but the C translation will take too long at this time, so I'm working on getting the XML version ready first.I'll simply have to replace the routine with a sequence of "if" conditons instead... ;)It just seems silly to have a green triangle displayed with a bitmap instead of a filled !

Share this post


Link to post
Share on other sites

Extract from my HSI (A:HSI TF flags, ENUM) 1 ==(A:NAV1 OBS,radians) (A:Plane heading degrees gyro,radians) -Hope this helpsnick

Share this post


Link to post
Share on other sites

>Extract from my HSI>Hope this helps>nickIt most certainly does, Nick! Thanks!

Share this post


Link to post
Share on other sites

Very nice, I think this is one for the snippet archive... heheh, I'm like a school boy when I find cool new stuff.CheersShad

Share this post


Link to post
Share on other sites

Quoted and re-edited to recover the XML Script!

<!--TO pointer-->   <Element><Visible>(A:HSI TF flags, ENUM) 1 ==</Visible>	  <Position X="188" Y="200"/><Polygon FillColor="White" Luminous="Yes">	<Point X="38" Y="-16"/>	<Point X="20" Y="-16"/>	<Point X="29" Y="-32"/>	<Point X="38" Y="-16"/></Polygon>			   	  <Rotate>		 <Value>(A:NAV1 OBS,radians) (A:Plane heading degrees gyro,radians) -</Value>	  </Rotate>   </Element>

Share this post


Link to post
Share on other sites