Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

hvectext(1gv) [debian man page]

HVECTEXT(1gv)															     HVECTEXT(1gv)

hvectext - construct Geomview VECT text object from Hershey fonts SYNOPSIS
hvectext [-w totallength] [-s textheight] [-plane xy|xz|yz] [-at X Y Z] [-align n|s|e|w|ne|nw|se|sw|c] [-hershey fontfile.gsf] [--] text string ... DESCRIPTION
Hvectext generates a Geomview/OOGL vector-text object, of given height or total length (default -s .25). It aligns the given 3-D point (default -at 0 0 0) with the given corner of the text (default -align c). Alignment specs are like geographic directions; -align sw puts the ``at'' point at the ``southwest'' corner of the text, so that its lower left corner is at that coordinate. The corresponding VECT object is written to standard output. If no non-blank text characters are given, hvectext produces a null geom object ("{ }") as output. The special option -- marks the end of options; it's useful in case the text itself begins with a hyphen. Hvectext accepts Ghostscript Hershey fonts; the built-in default is Hershey-Plain-Simplex a.k.a. hrpl_s.gsf. Others of interest: hrsy_r.gsf (Symbol), hrpl_t.gsf (Triplex). For a complete list, see all the Ghostscript font files of nontrivial size whose names begin with "hr". Although there's no way to switch fonts within the string, the first line of output from hvectext is an OOGL comment resembling: # Continue with: -align sw -plane xy -s 0.25 -at 1.24378 0 0 giving options for hvectext to continue the string where it left off. ENVIRONMENT
GS_FONTPATH, if present, is a colon-separated list of directories in which Hershey font files are sought. FILES
perl (either version 4 or 5) must be installed. /usr/local/lib/ghostscript/fonts is searched if -hershey is given and GS_FONTPATH isn't set. Geometry Center 1 Nov 1996 HVECTEXT(1gv)

Check Out this Related Man Page

Text::Align(3pm)					User Contributed Perl Documentation					  Text::Align(3pm)

GD::Text::Align - Draw aligned strings SYNOPSIS
use GD; use GD::Text::Align; my $gd = GD::Image->new(800,600); # allocate colours, do other things. my $align = GD::Text::Align->new($gd valign => 'top', halign => 'right', ); $align->set_font('arial', 12); $align->set_text('some string'); @bb = $align->bounding_box(200, 400, PI/3); # you can do things based on the bounding box here $align->draw(200, 400, PI/3); DESCRIPTION
GD::Text::Align provides an object that draws a string aligned to a coordinate at an angle. For builtin fonts only two angles are valid: 0 and PI/2. All other angles will be converted to one of these two. METHODS
This class inherits everything from GD::Text. I will only discuss the methods and attributes here that are not discussed there, or that have a different interface or behaviour. Methods directly inherited include "set_text" and "set_font". GD::Text::Align->new($gd_object, attrib => value, ...) Create a new object. The first argument to new has to be a valid GD::Image object. The other arguments will be passed on to the set method. $align->set(attrib => value, ...) Set an attribute. Valid attributes are the ones discussed in GD::Text and: valign, halign Vertical and horizontal alignment of the string. See also set_valign and set_halign. colour, color Synonyms. The colour to use to draw the string. This should be the index of the colour in the GD::Image object's palette. The default value is the last colour in the GD object's palette at the time of the creation of $align. $align->get(attribute) Get the value of an attribute. Valid attributes are all the attributes mentioned in GD::Text, the attributes mentioned under the "set" method and x, y and angle The x and y coordinate and the angle to be used. You can only do this after a call to the draw or bounding_box methods. Note that these coordinates are not necessarily the same ones that were passed in. Instead, they are the coordinates from where the GD methods will start drawing. I doubt that this is very useful to anyone. Note that while you can set the colour with both 'color' and 'colour', you can only get it as 'colour'. Sorry, but such is life in Australia. $align->set_valign(value) Set the vertical alignment of the string to one of 'top', 'center', 'base' or 'bottom'. For builtin fonts the last two are the same. The value 'base' denotes the baseline of a TrueType font. Returns true on success, false on failure. $align->set_halign(value) Set the horizontal alignment of the string to one of 'left', 'center', or 'right'. Returns true on success, false on failure. $align->set_align(valign, halign) Set the vertical and horizontal alignment. Just here for convenience. See also "set_valign" and "set_halign". Returns true on success, false on failure. $align->draw(x, y, angle) Draw the string at coordinates x, y at an angle angle in radians. The x and y coordinate become the pivot around which the string rotates. Note that for the builtin GD fonts the only two valid angles are 0 and PI/2. Returns the bounding box of the drawn string (see "bounding_box()"). $align->bounding_box(x, y, angle) Return the bounding box of the string to draw. This returns an eight-element list (exactly like the GD::Image->stringTTF method): (x1,y1) lower left corner (x2,y2) lower right corner (x3,y3) upper right corner (x4,y4) upper left corner Note that upper, lower, left and right are relative to the string, not to the canvas. The bounding box can be used to make decisions about whether to move the string or change the font size prior to actually drawing the string. NOTES
As with all Modules for Perl: Please stick to using the interface. If you try to fiddle too much with knowledge of the internals of this module, you may get burned. I may change them at any time. You can only use TrueType fonts with version of GD > 1.20, and then only if compiled with support for this. If you attempt to do it anyway, you will get errors. In the following, terms like 'top', 'upper', 'left' and the like are all relative to the string to be drawn, not to the canvas. BUGS
Any bugs inherited from GD::Text. COPYRIGHT
copyright 1999 Martien Verbruggen ( SEE ALSO
GD, GD::Text, GD::Text::Wrap perl v5.12.3 2003-02-24 Text::Align(3pm)
Man Page

Featured Tech Videos