documentation clarification _translate

Let Sim Innovations know about your Air Manager experience and let us know about your dream feature addition

Moderators: russ, Ralph

Post Reply
Message
Author
CirrusSRPilot
Posts: 13
Joined: Tue Nov 29, 2022 4:14 am
Location: Darwin, Minnesota USA
Contact:

documentation clarification _translate

#1 Post by CirrusSRPilot »

Please update the documentation wiki on the _translate function:

If the translate function is called multiple times within a canvas_draw will the translation be cumulative or is it referenced to the original canvas location?

ie does

Code: Select all

_translate (0,100)
_translate (0,100)
_move_to(0,0)
_line_to (0,100)
start the line at (0,100) or (0,200)?

Please advise if there is a different location to post documentation questions
Own and fly Cirrus SR22 N919TL out of KLJF. Developing instrument to match the cockpit of a G1 SR22.

User avatar
Keith Baxter
Posts: 4674
Joined: Wed Dec 20, 2017 11:00 am
Location: Botswana

Re: documentation clarification _translate

#2 Post by Keith Baxter »

Hi,
All the following are cumulative from their last position. _rotate() _translate() and _scale(). This is in the wiki.

https://siminnovations.com/wiki/index.p ... _translate

Code: Select all

 -- From this point everything is drawn with a x offset of 100
  _translate(100, 0)
Keith
AMD RYZEN 9 5950X CPU, Corsair H80I cooler, ASUS TUF GAMING B550-PLUS AMD Ryzen Mother Board,  32Gb ram Corsair Vengeance 3000Mh, MSI GTX960 4G graphics card 

Post Reply