Text rotation in GfxTextOut

Dear seniors,

In one of my code, I am required to display the x and y labels. I am able to display the x label properly as per my requirement, and I am also able to display the y label vertically as per my requirement. What I am trying to do is rotate the text in the Y label is it possible to do so?

bezels = Param( "Bezels", 25, 0, 50, 1 );
width = Status( "pxwidth" );
height = Status( "pxheight" );

// Set x axis label
GfxTextOut( "Ratio", ( ( width + bezels ) / 2 ), ( height - bezels ) );

// Set y axis label
ylabel = "Momentum";

for( i = 0; i < StrLen( ylabel ); i++ )
{
    GfxTextOut( StrMid( ylabel, i, 1 ), ( bezels / 2 ), ( ( height - ( bezels * 5 ) ) / 2 ) + i * 14 );
}

Thanks

If you want text to be rotated you can use

http://www.amibroker.com/guide/afl/gfxselectfont.html

Quote:

orientation - specifies the angle (in 0.1-degree units) between the baseline of a character and the x-axis. The angle is measured counterclockwise from the x-axis.

3 Likes

Thanks this is working perfectly.

This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.