How to rotate text

Help creating logic scripts for Air Manager Instruments

Moderators: russ, Ralph

Message
Author
User avatar
Sling
Posts: 5237
Joined: Mon Sep 11, 2017 2:37 pm
Contact:

Re: How to rotate text

#11 Post by Sling »

By the way I have also just tried the new text rotate in AM 3.3.2 and it works as expected. Nice.

I know it's a fair amount of work to convert a large instrument particularly the text, but I really think you should consider AM3. All the new features make it a must have for me.

jedeen
Posts: 527
Joined: Fri Jan 13, 2017 5:41 pm

Re: How to rotate text

#12 Post by jedeen »

Sling wrote: Sat Dec 30, 2017 12:33 am You simply add the text after the image in your code such that it sits on top of the image. you need to adjust the x, y accordingly. I thought you were going to try images though?
Right, I think I understand.......
You mean something like this: my_image = img_add("background.png, my_text", 0, 0, 100, 40) ?????????

As what AM3.1......you are right and it will (I think) decrease my lines of codes when I implement that line drawing code from Corjan to. But I still
have 7 or 8 people who are using that PFD and ND in AM2.3.1 And those are the people who direct communicate whit me.....I don't know about others.
I am now coding that VOR thingy and the MAP center page and the PLN page for the ND, and it takes quite a fair amount of time to do every thing twice.
Maybe I reconsider my decision. ;)
And considering the text modification in AM3.2....there is a nice tool for Notepad++ 32" called TextFX.....with that tool it only took me 30 minutes to change all the text in both instruments.

Anyway....thanks for the advice, Sling

User avatar
Sling
Posts: 5237
Joined: Mon Sep 11, 2017 2:37 pm
Contact:

Re: How to rotate text

#13 Post by Sling »

That's not going to work. I am now really confused as to what you are trying to achieve.

We have jumped from using images as text to text on images so I'm now not sure what you want to achieve.

Pardon my questions and thought process but if you've coded a PFD and ND how come your asking about text on an image. I must be missing something. I think you are asking how to put text on top of an image. If so how have you managed so far?

I'm happy to help but I'm just trying to establish what you actually want help with.

Tony

JackZ
Posts: 2264
Joined: Mon Feb 22, 2016 1:02 pm

Re: How to rotate text

#14 Post by JackZ »

If I interpret correctly what Derk is trying to achieve, it is to find a way to have some text that is being created « on the fly » (in his case VOR radial bearings inbound/outbound) rotated to an angle in order to follow the radial dashed line angle he has drawn on his ND.

Since the text is not defined beforehand, it is not possible for him to rotate mere images.

IMHO the easiest would be to create 10 small images of all the digits from 0 to 9, then have a specific « number to image » creation routine that would compose the 3 proper images in a row to create the desired number (say 096, which would be comprised of image_0, along image_9, along image_6), add then put the three images in a group and then rotate the 3 images.

Doable, but a lot of work for the (now) deprecated v2.1.3, considering that the rotate_text function is already in v3.3.

Jacques
My YouTube Chanel on the A320 (Real SOPs by an Airline Pilot IRL):
https://www.youtube.com/playlist?list=P ... 0Q6SBASRqJ

jedeen
Posts: 527
Joined: Fri Jan 13, 2017 5:41 pm

Re: How to rotate text

#15 Post by jedeen »

Exactly as Jacques says....that was what I was doing....but it turned out it is even more complicated.
Those numbers are not always on the same side of the dashed radial line, so I had to divide the compasrose in 4 quadrants in the case of map center page and
in 2 quadrants in case of the normal map page. So...I began to wonder if I (as a novice) was on the right track.....and as it turns out...yes...thanks to Jaques.

And you are right, why so much afford for a deprecated AM2.3.1. I have decide to leave the text's in a horizontal position, and move on.

Thanks guys for the time .....

User avatar
Sling
Posts: 5237
Joined: Mon Sep 11, 2017 2:37 pm
Contact:

Re: How to rotate text

#16 Post by Sling »

Jacques,
Yes that's what I originally thought. I suggested the 10 image solution in my very first post on this topic but Derk thought it wasn't possible. I told him it was but then text add code was mentioned and I thought we were back to just using normal text horizontally. Hence why I got a bit confused. Thanks for your view on it.

Derk,
It seems you've decided to stick with horizontal text for 2.1.3.

Can I please urge you again to seriously consider AM3. This functionality can be achieved in a single line of code. Why compromise on quality and continue to develop for an old version when the new one is so much more capable. I understand there are people using it on 2.1.3 but it's time to upgrade people IMHO.

I do understand though I for one am still running Windows 7.

jedeen
Posts: 527
Joined: Fri Jan 13, 2017 5:41 pm

Re: How to rotate text

#17 Post by jedeen »

Sling: you are right. You did suggest that 10 image solution earlier....but at that time I did not completely understand it.
After I did understand it and did a survey I saw that there was more needed then a few lines of code. (which you also mentioned)

I started this morning again with migrating my code to AM3.2........I lost my last copy :oops:
I found an instrument made by Crashtender in which he extensively uses lib's, so I thought...I will give it a try to use those lib's in my
ND code/instrument again.
I also did send you a PM.

Thanks again for your time....it is highly appreciated.

Have fun
Derk

Post Reply