Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

239 lines (174 sloc) 5.94 KB
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
<html xmlns="">
<meta name="generator" content=
"HTML Tidy for Linux/x86 (vers 1 September 2005), see" />
<title>RMagick 0.0.0: RVG Reference: RVG::Tspan Class</title>
<meta http-equiv="Content-Type" content=
"text/html; charset=us-ascii" />
<meta name="GENERATOR" content="Quanta Plus" />
<meta name="Copyright" content=
"Copyright (C) 2006 by Timothy P. Hunter" />
<link rel="stylesheet" type="text/css" href="css/doc.css" />
<script type="text/javascript" src="scripts/doc.js">
<script type="text/javascript">
<style type="text/css">
<h6 id="header">RMagick 0.0.0 User's Guide and Reference</h6>
<div class="nav">
&laquo;&nbsp;<a href="rvgtext.html">Prev</a> | <a href=
"index.html">Contents</a> | <a href=
<h1>class RVG::Tspan <span class="superclass">&lt;
<div id="toc">
<h2>Table of Contents</h2>
<h3>class methods</h3>
<li><a href="#new">new</a></li>
<h3>instance methods</h3>
<div class="toccol">
<li><a href="#d">d</a></li>
<li><a href="#rotate">rotate</a></li>
<li><a href="#tspan">tspan</a></li>
<h3>shared methods</h3>
<p>In addition to the methods listed above, <code>class
RVG::Tspan</code> also implements the <a href=
"rvgstyle.html">styles</a> method.</p>
<h2 class="methods">class methods</h2>
<div class="sig">
<h3 id="new">new</h3>
<p><span class="arg">text</span>=nil,
<span class="arg">x</span>=0, <span class="arg">y</span>=0) [
<span class="arg">{ |tspan| ...}</span> ] -&gt;
<div class="desc">
<p>This method may be invoked indirectly via the <a href=
"rvgtext.html#tspan">tspan</a> method in
<p>Tspan objects are containers, so this method yields to a
block if one is present. The only objects that a tspan can
contain are other tspans. Styles defined on a tspan propagate
to any tspans contained within it.</p>
<p>All arguments are optional.</p>
<dd>A string. If present, this string is drawn at the current
text position. By default the string is positioned with the
lower-left corner of the first glyph at the current text
position. Use the <a href=
"rvgtext.html#text_anchor">:text_anchor</a> style to override
this behavior. After the string is rendered, the current text
position is moved to the end of the string.</dd>
<dt>x, y</dt>
<dd>Specify a new current text position within the current
user coordinate system.</dd>
<p><a href="javascript:popup('tspan01.rb.html')"><img src=
"ex/tspan01.gif" title="Click to see the example script" alt=
"tspan example" /></a></p>
<h2 class="methods">instance methods</h2>
<div class='sig'>
<h3 id='d'>d</h3>
<p><span class="arg">tspan</span>.d(<span class=
"arg">dx</span>[, <span class="arg">dy</span>=0]) [
<span class="arg">{ |self| ...}</span> ] -&gt;
<div class="desc">
<p>The <span class="arg">dx</span> and <span class=
"arg">dy</span> arguments are added to the the current text
position to form a new current text position. Yields to a block
if one is present.</p>
<dt>dx, dy</dt>
<dd>The distance, in the user coordinate system, to be added
to the current text position.</dd>
<p><a href="javascript:popup('tspan02.rb.html')"><img src=
"ex/tspan02.gif" title="Click to see the example script" alt=
"tspan example 2" /></a></p>
<div class='sig'>
<h3 id='rotate'>rotate</h3>
<p><span class="arg">tspan</span>.rotate(<span class=
"arg">degrees</span>) [ <span class="arg">{ |self| ...}</span>
] -&gt; <em>self</em></p>
<div class="desc">
<p>Rotates the text about the current text position by the
specified number of <span class="arg">degrees</span>. Yields to
a block if one is present.</p>
<dd>The amount of rotation</dd>
<p><a href="javascript:popup('tspan03.rb.html')"><img src=
"ex/tspan03.gif" title="Click to see the example script" alt=
"tspan example 3" /></a></p>
<div class='sig'>
<h3 id='tspan'>tspan</h3>
<p><span class="arg">tspan</span>.tspan(<span class=
"arg">string</span>=0, <span class="arg">x</span>=nil,
<span class="arg">y</span>=0) [ <span class="arg">{ |tspan|
...}</span> ] -&gt; <em>tspan</em></p>
<div class="desc">
<p>Calls <a href="#new"></a> to construct a tspan
and adds it to the tspan. Yields to a block if one is present,
passing the new tspan as an argument. Styles defined on the
container tspan propagate to the contained tspan.</p>
<dd>A text string.</dd>
<dt>x, y</dt>
<dd>A new initial text position</dd>
<p>The new tspan, so other <code>RVG::Tspan</code> methods can
be chained to it.</p>
<p class="spacer">&nbsp;</p>
<div class="nav">
&laquo; <a href="rvgtext.html">Prev</a> | <a href=
"index.html">Contents</a> | <a href="rvguse.html">Next</a>
Jump to Line
Something went wrong with that request. Please try again.