Location: PHPKode > projects > Dompdf > dompdf-0.4/doc/dompdf/Canvas.html
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml">
		<head>
			<!-- template designed by Marco Von Ballmoos -->
			<title>Docs For Class Canvas</title>
			<link rel="stylesheet" href="../media/stylesheet.css" />
			<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
		</head>
		<body>
			<div class="page-body">			
<h2 class="class-name">Interface Canvas</h2>

<a name="sec-description"></a>
<div class="info-box">
	<div class="info-box-title">Description</div>
	<div class="nav-bar">
					<span class="disabled">Description</span> |
															<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
						
					</div>
	<div class="info-box-body">
        		<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Main rendering interface</p>
<div class="description"><p>Currently only <a href="../dompdf/CPDF_Adapter.html">CPDF_Adapter</a> and <a href="../dompdf/PDFLib_Adapter.html">PDFLib_Adapter</a>  implement this interface.</p><p>Implementations should measure x and y increasing to the left and down,  respectively, with the origin in the top left corner.  Implementations  are free to use a unit other than points for length, but I can't  guarantee that the results will look any good.</p></div>
		<p class="notes">
			Located in <a class="field" href="_include_canvas_cls_php.html">/include/canvas.cls.php</a> (line <span class="field">55</span>)
		</p>
		
				
		<pre></pre>
	
			</div>
</div>




	<a name="sec-method-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Method Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
												<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
		</div>
		<div class="info-box-body">			
			<div class="method-summary">
								
				<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#circle" title="details" class="method-name">circle</a>
											(<span class="var-type">mixed</span>&nbsp;<span class="var-name">$x</span>, <span class="var-type">mixed</span>&nbsp;<span class="var-name">$y</span>, <span class="var-type">float</span>&nbsp;<span class="var-name">$r1</span>, <span class="var-type">array</span>&nbsp;<span class="var-name">$color</span>, [<span class="var-type">float</span>&nbsp;<span class="var-name">$width</span> = <span class="var-default">null</span>], [<span class="var-type">array</span>&nbsp;<span class="var-name">$style</span> = <span class="var-default">null</span>], [<span class="var-type">bool</span>&nbsp;<span class="var-name">$fill</span> = <span class="var-default">false</span>], <span class="var-type">float</span>&nbsp;<span class="var-name">$x1</span>, <span class="var-type">float</span>&nbsp;<span class="var-name">$y1</span>)
									</div>
								
				<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#filled_rectangle" title="details" class="method-name">filled_rectangle</a>
											(<span class="var-type">float</span>&nbsp;<span class="var-name">$x1</span>, <span class="var-type">float</span>&nbsp;<span class="var-name">$y1</span>, <span class="var-type">float</span>&nbsp;<span class="var-name">$w</span>, <span class="var-type">float</span>&nbsp;<span class="var-name">$h</span>, <span class="var-type">array</span>&nbsp;<span class="var-name">$color</span>)
									</div>
								
				<div class="method-definition">
											<span class="method-result">float</span>
										<a href="#get_font_height" title="details" class="method-name">get_font_height</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$font</span>, <span class="var-type">float</span>&nbsp;<span class="var-name">$size</span>)
									</div>
								
				<div class="method-definition">
											<span class="method-result">int</span>
										<a href="#get_page_count" title="details" class="method-name">get_page_count</a>
										()
									</div>
								
				<div class="method-definition">
											<span class="method-result">int</span>
										<a href="#get_page_number" title="details" class="method-name">get_page_number</a>
										()
									</div>
								
				<div class="method-definition">
											<span class="method-result">float</span>
										<a href="#get_text_width" title="details" class="method-name">get_text_width</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$text</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$font</span>, <span class="var-type">float</span>&nbsp;<span class="var-name">$size</span>, <span class="var-type">float</span>&nbsp;<span class="var-name">$spacing</span>)
									</div>
								
				<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#image" title="details" class="method-name">image</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$img_url</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$img_type</span>, <span class="var-type">float</span>&nbsp;<span class="var-name">$x</span>, <span class="var-type">float</span>&nbsp;<span class="var-name">$y</span>, <span class="var-type">int</span>&nbsp;<span class="var-name">$w</span>, <span class="var-type">int</span>&nbsp;<span class="var-name">$h</span>)
									</div>
								
				<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#line" title="details" class="method-name">line</a>
											(<span class="var-type">float</span>&nbsp;<span class="var-name">$x1</span>, <span class="var-type">float</span>&nbsp;<span class="var-name">$y1</span>, <span class="var-type">float</span>&nbsp;<span class="var-name">$x2</span>, <span class="var-type">float</span>&nbsp;<span class="var-name">$y2</span>, <span class="var-type">array</span>&nbsp;<span class="var-name">$color</span>, <span class="var-type">float</span>&nbsp;<span class="var-name">$width</span>, [<span class="var-type">array</span>&nbsp;<span class="var-name">$style</span> = <span class="var-default">null</span>])
									</div>
								
				<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#new_page" title="details" class="method-name">new_page</a>
										()
									</div>
								
				<div class="method-definition">
											<span class="method-result">string</span>
										<a href="#output" title="details" class="method-name">output</a>
										()
									</div>
								
				<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#polygon" title="details" class="method-name">polygon</a>
											(<span class="var-type">array</span>&nbsp;<span class="var-name">$points</span>, <span class="var-type">array</span>&nbsp;<span class="var-name">$color</span>, [<span class="var-type">float</span>&nbsp;<span class="var-name">$width</span> = <span class="var-default">null</span>], [<span class="var-type">array</span>&nbsp;<span class="var-name">$style</span> = <span class="var-default">null</span>], [<span class="var-type">bool</span>&nbsp;<span class="var-name">$fill</span> = <span class="var-default">false</span>])
									</div>
								
				<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#rectangle" title="details" class="method-name">rectangle</a>
											(<span class="var-type">float</span>&nbsp;<span class="var-name">$x1</span>, <span class="var-type">float</span>&nbsp;<span class="var-name">$y1</span>, <span class="var-type">float</span>&nbsp;<span class="var-name">$w</span>, <span class="var-type">float</span>&nbsp;<span class="var-name">$h</span>, <span class="var-type">array</span>&nbsp;<span class="var-name">$color</span>, <span class="var-type">float</span>&nbsp;<span class="var-name">$width</span>, [<span class="var-type">array</span>&nbsp;<span class="var-name">$style</span> = <span class="var-default">null</span>])
									</div>
								
				<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#set_page_count" title="details" class="method-name">set_page_count</a>
											(<span class="var-type">int</span>&nbsp;<span class="var-name">$count</span>)
									</div>
								
				<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#stream" title="details" class="method-name">stream</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$filename</span>, [<span class="var-type">array</span>&nbsp;<span class="var-name">$options</span> = <span class="var-default">null</span>])
									</div>
								
				<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#text" title="details" class="method-name">text</a>
											(<span class="var-type">float</span>&nbsp;<span class="var-name">$x</span>, <span class="var-type">float</span>&nbsp;<span class="var-name">$y</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$text</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$font</span>, <span class="var-type">float</span>&nbsp;<span class="var-name">$size</span>, [<span class="var-type">array</span>&nbsp;<span class="var-name">$color</span> = <span class="var-default">array(0,0,0)</span>], <span class="var-type">float</span>&nbsp;<span class="var-name">$adjust</span>, <span class="var-type">float</span>&nbsp;<span class="var-name">$angle</span>)
									</div>
							</div>
		</div>
	</div>		

	
	<a name="sec-methods"></a>
	<div class="info-box">
		<div class="info-box-title">Methods</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
																<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
						
		</div>
		<div class="info-box-body">
			<A NAME='method_detail'></A>
<a name="methodcircle" id="circle"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">circle</span> (line <span class="line-number">164</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Draws a circle at x,y with radius $r1</p>
<div class="description"><p>See <a href="../dompdf/Style.html#methodmunge_colour">Style::munge_colour()</a> for the format of the colour array.  See Cpdf::setLineStyle() for a description of the $style  parameter (aka dash)</p></div>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			circle
		</span>
					(<span class="var-type">mixed</span>&nbsp;<span class="var-name">$x</span>, <span class="var-type">mixed</span>&nbsp;<span class="var-name">$y</span>, <span class="var-type">float</span>&nbsp;<span class="var-name">$r1</span>, <span class="var-type">array</span>&nbsp;<span class="var-name">$color</span>, [<span class="var-type">float</span>&nbsp;<span class="var-name">$width</span> = <span class="var-default">null</span>], [<span class="var-type">array</span>&nbsp;<span class="var-name">$style</span> = <span class="var-default">null</span>], [<span class="var-type">bool</span>&nbsp;<span class="var-name">$fill</span> = <span class="var-default">false</span>], <span class="var-type">float</span>&nbsp;<span class="var-name">$x1</span>, <span class="var-type">float</span>&nbsp;<span class="var-name">$y1</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">float</span>
				<span class="var-name">$x1</span>			</li>
					<li>
				<span class="var-type">float</span>
				<span class="var-name">$y1</span>			</li>
					<li>
				<span class="var-type">float</span>
				<span class="var-name">$r1</span>			</li>
					<li>
				<span class="var-type">array</span>
				<span class="var-name">$color</span>			</li>
					<li>
				<span class="var-type">float</span>
				<span class="var-name">$width</span>			</li>
					<li>
				<span class="var-type">array</span>
				<span class="var-name">$style</span>			</li>
					<li>
				<span class="var-type">bool</span>
				<span class="var-name">$fill</span><span class="var-description">: Fills the circle if true</span>			</li>
				</ul>
		
		
	</div>
<a name="methodfilled_rectangle" id="filled_rectangle"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">filled_rectangle</span> (line <span class="line-number">123</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Draws a filled rectangle at x1,y1 with width w and height h</p>
<div class="description"><p>See <a href="../dompdf/Style.html#methodmunge_colour">Style::munge_colour()</a> for the format of the colour array.</p></div>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			filled_rectangle
		</span>
					(<span class="var-type">float</span>&nbsp;<span class="var-name">$x1</span>, <span class="var-type">float</span>&nbsp;<span class="var-name">$y1</span>, <span class="var-type">float</span>&nbsp;<span class="var-name">$w</span>, <span class="var-type">float</span>&nbsp;<span class="var-name">$h</span>, <span class="var-type">array</span>&nbsp;<span class="var-name">$color</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">float</span>
				<span class="var-name">$x1</span>			</li>
					<li>
				<span class="var-type">float</span>
				<span class="var-name">$y1</span>			</li>
					<li>
				<span class="var-type">float</span>
				<span class="var-name">$w</span>			</li>
					<li>
				<span class="var-type">float</span>
				<span class="var-name">$h</span>			</li>
					<li>
				<span class="var-type">array</span>
				<span class="var-name">$color</span>			</li>
				</ul>
		
		
	</div>
<a name="methodget_font_height" id="get_font_height"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">get_font_height</span> (line <span class="line-number">215</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Calculates font height, in points</p>
	
	<div class="method-signature">
		<span class="method-result">float</span>
		<span class="method-name">
			get_font_height
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$font</span>, <span class="var-type">float</span>&nbsp;<span class="var-name">$size</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$font</span>			</li>
					<li>
				<span class="var-type">float</span>
				<span class="var-name">$size</span>			</li>
				</ul>
		
		
	</div>
<a name="methodget_page_count" id="get_page_count"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">get_page_count</span> (line <span class="line-number">69</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Returns the total number of pages</p>
	
	<div class="method-signature">
		<span class="method-result">int</span>
		<span class="method-name">
			get_page_count
		</span>
				()
			</div>
	
		
		
	</div>
<a name="methodget_page_number" id="get_page_number"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">get_page_number</span> (line <span class="line-number">62</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Returns the current page number</p>
	
	<div class="method-signature">
		<span class="method-result">int</span>
		<span class="method-name">
			get_page_number
		</span>
				()
			</div>
	
		
		
	</div>
<a name="methodget_text_width" id="get_text_width"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">get_text_width</span> (line <span class="line-number">206</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Calculates text size, in points</p>
	
	<div class="method-signature">
		<span class="method-result">float</span>
		<span class="method-name">
			get_text_width
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$text</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$font</span>, <span class="var-type">float</span>&nbsp;<span class="var-name">$size</span>, <span class="var-type">float</span>&nbsp;<span class="var-name">$spacing</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$text</span><span class="var-description">: the text to be sized</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$font</span><span class="var-description">: the desired font</span>			</li>
					<li>
				<span class="var-type">float</span>
				<span class="var-name">$size</span><span class="var-description">: the desired font size</span>			</li>
					<li>
				<span class="var-type">float</span>
				<span class="var-name">$spacing</span><span class="var-description">: word spacing, if any</span>			</li>
				</ul>
		
		
	</div>
<a name="methodimage" id="image"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">image</span> (line <span class="line-number">179</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Add an image to the pdf.</p>
<div class="description"><p>The image is placed at the specified x and y coordinates with the  given width and height.</p></div>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			image
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$img_url</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$img_type</span>, <span class="var-type">float</span>&nbsp;<span class="var-name">$x</span>, <span class="var-type">float</span>&nbsp;<span class="var-name">$y</span>, <span class="var-type">int</span>&nbsp;<span class="var-name">$w</span>, <span class="var-type">int</span>&nbsp;<span class="var-name">$h</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$img_url</span><span class="var-description">: the path to the image</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$img_type</span><span class="var-description">: the type (e.g. extension) of the image</span>			</li>
					<li>
				<span class="var-type">float</span>
				<span class="var-name">$x</span><span class="var-description">: x position</span>			</li>
					<li>
				<span class="var-type">float</span>
				<span class="var-name">$y</span><span class="var-description">: y position</span>			</li>
					<li>
				<span class="var-type">int</span>
				<span class="var-name">$w</span><span class="var-description">: width (in pixels)</span>			</li>
					<li>
				<span class="var-type">int</span>
				<span class="var-name">$h</span><span class="var-description">: height (in pixels)</span>			</li>
				</ul>
		
		
	</div>
<a name="methodline" id="line"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">line</span> (line <span class="line-number">93</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Draws a line from x1,y1 to x2,y2</p>
<div class="description"><p>See <a href="../dompdf/Style.html#methodmunge_colour">Style::munge_colour()</a> for the format of the colour array.  See Cpdf::setLineStyle() for a description of the format of the  $style parameter (aka dash).</p></div>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			line
		</span>
					(<span class="var-type">float</span>&nbsp;<span class="var-name">$x1</span>, <span class="var-type">float</span>&nbsp;<span class="var-name">$y1</span>, <span class="var-type">float</span>&nbsp;<span class="var-name">$x2</span>, <span class="var-type">float</span>&nbsp;<span class="var-name">$y2</span>, <span class="var-type">array</span>&nbsp;<span class="var-name">$color</span>, <span class="var-type">float</span>&nbsp;<span class="var-name">$width</span>, [<span class="var-type">array</span>&nbsp;<span class="var-name">$style</span> = <span class="var-default">null</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">float</span>
				<span class="var-name">$x1</span>			</li>
					<li>
				<span class="var-type">float</span>
				<span class="var-name">$y1</span>			</li>
					<li>
				<span class="var-type">float</span>
				<span class="var-name">$x2</span>			</li>
					<li>
				<span class="var-type">float</span>
				<span class="var-name">$y2</span>			</li>
					<li>
				<span class="var-type">array</span>
				<span class="var-name">$color</span>			</li>
					<li>
				<span class="var-type">float</span>
				<span class="var-name">$width</span>			</li>
					<li>
				<span class="var-type">array</span>
				<span class="var-name">$style</span>			</li>
				</ul>
		
		
	</div>
<a name="methodnew_page" id="new_page"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">new_page</span> (line <span class="line-number">223</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Starts a new page</p>
<div class="description"><p>Subsequent drawing operations will appear on the new page.</p></div>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			new_page
		</span>
				()
			</div>
	
		
		
	</div>
<a name="methodoutput" id="output"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">output</span> (line <span class="line-number">238</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Returns the PDF as a string</p>
	
	<div class="method-signature">
		<span class="method-result">string</span>
		<span class="method-name">
			output
		</span>
				()
			</div>
	
		
		
	</div>
<a name="methodpolygon" id="polygon"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">polygon</span> (line <span class="line-number">147</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Draws a polygon</p>
<div class="description"><p>The polygon is formed by joining all the points stored in the $points  array.  $points has the following structure:  <pre><ol><code><pre><li> <span class="src-key">array</span><span class="src-sym">(</span><span class="src-num">0 </span>=&gt; <span class="src-id">x1</span><span class="src-sym">,</span></li>
<li>       <span class="src-num">1 </span>=&gt; <span class="src-id">y1</span><span class="src-sym">,</span></li>
<li>       ...</li>
<li>       <span class="src-sym">)</span><span class="src-sym">;</span></li>
</pre></code></ol></pre></p><p>See <a href="../dompdf/Style.html#methodmunge_colour">Style::munge_colour()</a> for the format of the colour array.  See Cpdf::setLineStyle() for a description of the $style  parameter (aka dash)</p></div>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			polygon
		</span>
					(<span class="var-type">array</span>&nbsp;<span class="var-name">$points</span>, <span class="var-type">array</span>&nbsp;<span class="var-name">$color</span>, [<span class="var-type">float</span>&nbsp;<span class="var-name">$width</span> = <span class="var-default">null</span>], [<span class="var-type">array</span>&nbsp;<span class="var-name">$style</span> = <span class="var-default">null</span>], [<span class="var-type">bool</span>&nbsp;<span class="var-name">$fill</span> = <span class="var-default">false</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">array</span>
				<span class="var-name">$points</span>			</li>
					<li>
				<span class="var-type">array</span>
				<span class="var-name">$color</span>			</li>
					<li>
				<span class="var-type">float</span>
				<span class="var-name">$width</span>			</li>
					<li>
				<span class="var-type">array</span>
				<span class="var-name">$style</span>			</li>
					<li>
				<span class="var-type">bool</span>
				<span class="var-name">$fill</span><span class="var-description">: fill  Fills the polygon if true</span>			</li>
				</ul>
		
		
	</div>
<a name="methodrectangle" id="rectangle"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">rectangle</span> (line <span class="line-number">110</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Draws a rectangle at x1,y1 with width w and height h</p>
<div class="description"><p>See <a href="../dompdf/Style.html#methodmunge_colour">Style::munge_colour()</a> for the format of the colour array.  See Cpdf::setLineStyle() for a description of the $style  parameter (aka dash)</p></div>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			rectangle
		</span>
					(<span class="var-type">float</span>&nbsp;<span class="var-name">$x1</span>, <span class="var-type">float</span>&nbsp;<span class="var-name">$y1</span>, <span class="var-type">float</span>&nbsp;<span class="var-name">$w</span>, <span class="var-type">float</span>&nbsp;<span class="var-name">$h</span>, <span class="var-type">array</span>&nbsp;<span class="var-name">$color</span>, <span class="var-type">float</span>&nbsp;<span class="var-name">$width</span>, [<span class="var-type">array</span>&nbsp;<span class="var-name">$style</span> = <span class="var-default">null</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">float</span>
				<span class="var-name">$x1</span>			</li>
					<li>
				<span class="var-type">float</span>
				<span class="var-name">$y1</span>			</li>
					<li>
				<span class="var-type">float</span>
				<span class="var-name">$w</span>			</li>
					<li>
				<span class="var-type">float</span>
				<span class="var-name">$h</span>			</li>
					<li>
				<span class="var-type">array</span>
				<span class="var-name">$color</span>			</li>
					<li>
				<span class="var-type">float</span>
				<span class="var-name">$width</span>			</li>
					<li>
				<span class="var-type">array</span>
				<span class="var-name">$style</span>			</li>
				</ul>
		
		
	</div>
<a name="methodset_page_count" id="set_page_count"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">set_page_count</span> (line <span class="line-number">76</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Sets the total number of pages</p>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			set_page_count
		</span>
					(<span class="var-type">int</span>&nbsp;<span class="var-name">$count</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">int</span>
				<span class="var-name">$count</span>			</li>
				</ul>
		
		
	</div>
<a name="methodstream" id="stream"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">stream</span> (line <span class="line-number">231</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Streams the PDF directly to the browser</p>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			stream
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$filename</span>, [<span class="var-type">array</span>&nbsp;<span class="var-name">$options</span> = <span class="var-default">null</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$filename</span><span class="var-description">: the name of the PDF file</span>			</li>
					<li>
				<span class="var-type">array</span>
				<span class="var-name">$options</span><span class="var-description">: associative array, 'Attachment' =&gt; 0 or 1, 'compress' =&gt; 1 or 0</span>			</li>
				</ul>
		
		
	</div>
<a name="methodtext" id="text"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">text</span> (line <span class="line-number">195</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Writes text at the specified x and y coordinates</p>
<div class="description"><p>See <a href="../dompdf/Style.html#methodmunge_colour">Style::munge_colour()</a> for the format of the colour array.</p></div>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			text
		</span>
					(<span class="var-type">float</span>&nbsp;<span class="var-name">$x</span>, <span class="var-type">float</span>&nbsp;<span class="var-name">$y</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$text</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$font</span>, <span class="var-type">float</span>&nbsp;<span class="var-name">$size</span>, [<span class="var-type">array</span>&nbsp;<span class="var-name">$color</span> = <span class="var-default">array(0,0,0)</span>], <span class="var-type">float</span>&nbsp;<span class="var-name">$adjust</span>, <span class="var-type">float</span>&nbsp;<span class="var-name">$angle</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">float</span>
				<span class="var-name">$x</span>			</li>
					<li>
				<span class="var-type">float</span>
				<span class="var-name">$y</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$text</span><span class="var-description">: the text to write</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$font</span><span class="var-description">: the font file to use</span>			</li>
					<li>
				<span class="var-type">float</span>
				<span class="var-name">$size</span><span class="var-description">: the font size, in points</span>			</li>
					<li>
				<span class="var-type">array</span>
				<span class="var-name">$color</span>			</li>
					<li>
				<span class="var-type">float</span>
				<span class="var-name">$adjust</span><span class="var-description">: word spacing adjustment</span>			</li>
					<li>
				<span class="var-type">float</span>
				<span class="var-name">$angle</span><span class="var-description">: angle to write the text at, measured CW starting from the x-axis</span>			</li>
				</ul>
		
		
	</div>
						
		</div>
	</div>


	<p class="notes" id="credit">
		Documentation generated on Fri, 04 Mar 2005 13:31:16 -0700 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.3.0RC3</a>
	</p>
	</div></body>
</html>
Return current item: Dompdf