C Library Functions  - textang (3)

NAME

textang(3f) - [M_pixel:TEXT] set text angle (LICENSE:PD)

CONTENTS

Synopsis
Description
Options
Example
Author
License

SYNOPSIS

definition:

   subroutine textang(ang)
   real,intent(in) :: ang

DESCRIPTION

Set the text angle. This angles strings and chars. This routine only affects software text.

OPTIONS

ANG The angle in degrees to draw text with when using drawstr(3f). Angles are measured counterclockwise with zero degrees at the horizontal line to the right of the original.

EXAMPLE

Sample program:

   program demo_textang
   use :: M_pixel
   use :: M_pixel, only : cosd, sind
   use :: M_pixel__writegif, only : writegif
   implicit none
   integer :: i
   !! set up drawing environment
   call prefsize(600,600)
   call vinit()
   call ortho2(-100.0,100.0,-100.0,100.0)
   call textsize(7.0,7.0)
   call linewidth(20)
   do i=1,30
      !! draw radial lines
      call color(1)
      call move2(0.0,0.0)
      call draw2(100.0*cosd(i*12),100.0*sind(i*12))
      !! draw rotated text
      call color(7)
      call move2(30.0*cosd(i*12),30.0*sind(i*12))
      call textang(i*12.0)
      call drawstr(’angled text’)
   enddo

call writegif(’textang.3M_pixel.gif’,P_pixel,P_colormap) call execute_command_line(’display textang.3M_pixel.gif’)

call vexit()

end program demo_textang

AUTHOR

John S. Urban

LICENSE

Public Domain


Nemo Release 3.1 textang (3) July 22, 2023
Generated by manServer 1.08 from 741d2765-13d6-4566-8bc1-942a853766fa using man macros.