Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
SWF::Builder::CharacteUsereContributed Perl DoSWF::Builder::Character::Text(3)

NAME
       SWF::Builder::Character::Text - SWF static text object

SYNOPSIS
	 my $text = $mc->new_static_text( $font	)
	   ->size(10)
	   ->color('000000')
	   ->text('This	is a text.');

	 my $text_i = $text->place;

DESCRIPTION
       This module creates static texts, which cannot be changed at playing
       time.

       $text = $mc->new_static_text( [$font, $text] )
	   returns a new static	text.  $font is	an SWF::Builder::Font object.

       $text->font( $font )
	   applies the font to the following text.  $font is an
	   SWF::Builder::Font object.

       $text->size( $size )
	   sets	a font size to $size in	pixel.

       $text->color( $color )
	   sets	color of the following text.  The color	can take a six or
	   eight-figure	hexadecimal string, an array reference of R, G,	B, and
	   optional alpha value, an array reference of named parameters	such
	   as [Red => 255], and	SWF::Element::RGB/RGBA object.

       $text->text( $string )
	   writes the $string.	The glyph data of the applied font is embedded
	   if needed.  The string can also include a newline code, "\n".

       $text->position(	$x, $y )
	   sets	the position of	the following text.  ($x, $y) are coordinates
	   in pixel relative to	the origin of the text object.

       $text->leading( $leading	)
	   sets	the vertical distance between the lines	in pixel.

       $text->kerning( [$kerning] )
	   sets/gets a flag to adjust spacing between kern pair.

       $text->get_bbox
	   returns the bounding	box of the text, a list	of coordinates ( top-
	   left	X, top-left Y, bottom-right X, bottom-right Y ).

       $text_i = $text->place( ... )
	   returns the display instance	of the text. See SWF::Builder.

COPYRIGHT
       Copyright 2003 Yasuhiro Sasama (ySas), <ysas@nmt.ne.jp>

       This library is free software; you can redistribute it and/or modify it
       under the same terms as Perl itself.

perl v5.24.1			  2017-07-02  SWF::Builder::Character::Text(3)

NAME | SYNOPSIS | DESCRIPTION | COPYRIGHT

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=SWF::Builder::Character::Text&sektion=3&manpath=FreeBSD+12.1-RELEASE+and+Ports>

home | help