• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

RotateTransform(); in loops

JB3DG

Resource contributor
Messages
1,325
Country
southafrica
Hi guys

I have been running into major issues when trying to create a GDI+ compass rose using RotateTransform(loop variable); inside a loop. It draws the marks extremely erratically and sometimes goes into a endless loop state and i end up with a solid arc.

Anyone have some examples of how they draw a compass rose in a loop?

Thanks
JB
 
This works like a compass with no rotate. And it rolls over.

Code:
<Gauge Name="ADF 1" Version="1.0">
  <Image Name="ADF_Background.bmp"  ImageSizes="84,128,84,128"/>

<Element>
     <Image Name="ADF_Numbers.bmp">
        <Nonlinearity>
           <Item Value="0" X="0" Y="20"/>
           <Item Value="10" X="0" Y="620"/>
        </Nonlinearity>
     </Image>
     <Shift>
        <Value>(A:ADF1 ACTIVE FREQUENCY, KHz) 10 / int 10 * /-/ (A:ADF1 ACTIVE FREQUENCY, KHz) + </Value>
     </Shift>
  </Element>

  <Mouse>
    <Help ID="HELPID_RADIO_ADF"/>
    <Tooltip ID="TOOLTIPTEXT_ADF_ID"/>
  </Mouse>
</Gauge>

http://www.flysim.us/help/ADF100_Numbers.bmp
 
Lol. oh and for the record....I am sorted. The mistake was leaving the TranslateTransform(); and ResetTransform(); out of the loop. When i put them in....bingo off it went.
 
One day I might have to try to use C++ again.
I used the C++ samples 3 years ago but could never get anything to export correctly. Plus C++ is a bit tougher than XML.

Thanks for the post:rotfl:
 
Believe me it is worth it. Once you grasp the basics (variables and functions to arrays, objects, and pointers) a whole new world is opened up and I have to say....what would take me hours and days in GIMP and XML takes me seconds and minutes in GDI+.
 
Even If i was good at C++ i can write an xml gauge in 1 minute. So the last 5 days i have written 120 new gauges for my project. It would take more to
convince me to try GDI. I think it's all what your good at. XML can slow me down at times. I am sure all methods have their ups and downs. i can re write
a gauge and update it in 15 seconds and check my work. i would hate to lose that time saver.

i purchased a sound module from Bill. Sometime it's a must.....

Here is a pedestal i made in 3 days......just for fun!

http://www.flysim.us/website/Bell204_autoviewer/images/bell205_269.jpg
http://www.flysim.us/website/Bell204_autoviewer/images/bell205_267.jpg
i love the toggle switches, how they sit inside the housing to expose light....:stirthepo
 
Last edited:
Back
Top