Post by tenochtitlanuk on Feb 2, 2019 12:46:36 GMT -5
This may give you some ideas- but note it is much harder if you actually want the LETTERS turned sideways!
nomainwin
WindowWidth = 400 WindowHeight = 400
open "Graphics" for graphics_nsb as #wg
#wg "trapclose [quit]"
#wg "fill lightgray ; backcolor lightgray"
for i =1 to 10 call verticalText "Example",_ ' Desired text int( 20 +360 *rnd( 1)), int( 20 +160 *rnd( 1)),_ ' Position "Courier_New bold",_ ' Font 8 +int( 20 *rnd( 1)),_ ' Font size randCol$() ' Font colour next i
#wg "flush"
wait
[quit] close #wg end
function randCol$() R =int( 256 *rnd( 1)) R$ =str$( R) G$ ="120" B$ =str$( 256 -R) randCol$ =R$ +" " +G$ +" " +B$ end function
In a graphics window, print the text horizontally, determine the pixel locations of a rectangle that enclose the just-printed text, determine a rectangular block of pixels to place the text vertically, read the horizontal box (pixel by pixel) and, successively, color the appropriate pixel in the vertical box. I needed the forum to instruct me as to how to determine the color (R,G,B) of an individual pixel. It worked for my purpose, but was slow and a task in subscript accountability. The original horizontal rectangle can be back-ground colored as you read through the pixel locations (simultaneously filling the vertical rectangle with the text turned 90 degrees upright). This gave me a label for the vertical axis in a Y vs X plot. There are likely easier ways to accomplish the task. You might find a routine to print text at any angle you choose (I remember seeing that somewhere).