[UP]


Manual Reference Pages  - boxtext (3)

NAME

boxtext(3f) - [M_draw:TEXT] stretch and draw the SOFTWARE string s so that it fits in the imaginary box (LICENSE:PD)

CONTENTS

Synopsis
Description
Options
Example

SYNOPSIS

subroutine boxtext(x, y, l, h, s) real x, y, l, h, s

DESCRIPTION

Draw the string S so that it fits in the imaginary box defined with bottom left hand corner at (x, y), length l, and height h. This only applies to software text. The textsize is temporarily resized so that the string fills the specified box.

OPTIONS

X,Y position of lower left corner of box in world coordinates
L length of box in world coordinates
H height of box in world coordinates
S string to stretch into box and draw

EXAMPLE

Simple program:

    program demo_boxtext
    use M_draw,     only : vinit,vexit,prefsize,vgetdev,clear,page
    use M_draw,     only : centertext,polyfill,font,linewidth,color
    use M_draw,     only : getkey
    use M_draw,     only : color,rect,boxtext
    use M_draw,     only : D_BLACK,   D_WHITE
    use M_draw,     only : D_RED,     D_GREEN,    D_BLUE
    use M_draw,     only : D_YELLOW,  D_MAGENTA,  D_CYAN
    implicit none
    real              :: x1=0.0,    x2=40.0,    y1=0.0,    y2=7.0
    real              :: xmin=1.0,  xmax=39.0,  ymin=1.0,  ymax=6.0
    integer           :: idum
       call prefsize(int(x2-x1)*25,int(y2-y1)*25)
       call vinit(’ ’)
       call page(x1,x2,y1,y2)
       call centertext(.true.)
       call font("times.rb")
       call color(D_GREEN)
       call clear()
       call linewidth(200)
       call color(D_CYAN); call polyfill(.false.); call rect(xmin,ymin,xmax,ymax)
       call color(D_WHITE); call polyfill(.true.);  call rect(xmin,ymin,xmax,ymax)
       call color(D_BLACK)
       call boxtext(xmin,ymin,xmax-xmin,ymax-ymin,"This text is in the box")
       idum=getkey()
       call vexit()
    end program demo_boxtext


boxtext (3) March 11, 2021
Generated by manServer 1.08 from b70eb877-279c-4018-a6f0-239360283af6 using man macros.