1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125
|
<?xml version="1.0" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>SWF::Bitmap - Bitmap class</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rev="made" href="mailto:feedback@suse.de" />
</head>
<body style="background-color: white">
<!-- INDEX BEGIN -->
<div name="index">
<p><a name="__index__"></a></p>
<ul>
<li><a href="#name">NAME</a></li>
<li><a href="#synopsis">SYNOPSIS</a></li>
<li><a href="#description">DESCRIPTION</a></li>
<li><a href="#methods">METHODS</a></li>
<li><a href="#author">AUTHOR</a></li>
<li><a href="#see_also">SEE ALSO</a></li>
</ul>
<hr name="index" />
</div>
<!-- INDEX END -->
<p>
</p>
<h1><a name="name">NAME</a></h1>
<p>SWF::Bitmap - Bitmap class</p>
<p>
</p>
<hr />
<h1><a name="synopsis">SYNOPSIS</a></h1>
<pre>
use SWF::Bitmap;
$bitmap = new SWF::Bitmap('filename');
$fill = $shape->addBitmapFill($bitmap);</pre>
<p>
</p>
<hr />
<h1><a name="description">DESCRIPTION</a></h1>
<p>SWF::Bitmap enables you to add JPG and DBL files.
It is a helper class most useful for filling shapes
(i.e. SWF::Shape objects).
DBL files ('Define Bitmap Lossless') are produced from
PNG or GIF files by using png2dbl or gif2dbl tools.</p>
<p>
</p>
<hr />
<h1><a name="methods">METHODS</a></h1>
<dl>
<dt><strong><a name="bitmap" class="item">new SWF::Bitmap($file, [$alpha])</a></strong>
<dd>
<p>Creates a new SWF::Bitmap object using 'file'. The file extension
has to be one of ".jpg",".jpeg" or ".dbl" (not case sensitive).
In all other cases use either <code>newSWFDBLBitmap()</code> or newSWFJpeg...()
constructors. The alpha parameter represents a filename for opacity
data ('alpha' channel), but only for JPG files. Alpha data files
are produced by tool gif2mask. The original GIF used for gif2mask input
file containing alpha information should have same dimensions (width x height)
as the JPG file.</p>
</dd>
</li>
<dt><strong>newSWFDBLBitmap SWF::Bitmap($file)</strong>
<dd>
<p>Creates a new SWF::Bitmap object using DBL file.
Use this constructor if you have a file with DBL data,
but not with .dbl filename extension.</p>
</dd>
</li>
<dt><strong>newSWFJpegBitmap SWF::Bitmap($file)</strong>
<dd>
<p>Creates a new SWF::Bitmap object using JPG file.
Use this constructor if you have a file with JPG data,
but not with .jpg or .jpeg filename extension.</p>
</dd>
</li>
<dt><strong>newSWFJpegWithAlpha SWF::Bitmap($file,$alpha)</strong>
<dd>
<p>Creates a new SWF::Bitmap object using JPG file similar <code>newSWFJpegBitmap()</code>
with additional opacity information in 'alpha' file. Use this constructor
if you have a file with JPG data, but not with .jpg or .jpeg filename extension
and if there is opacity information available in 'alpha' file.
Alpha data files are produced by gif2mask tool. The original GIF file
containing alpha information used for gif2mask input should have same dimensions
as the JPG file.</p>
</dd>
</li>
<dt><strong><a name="getwidth" class="item">$width = $bitmap-><code>getWidth()</code>;</a></strong>
<dd>
<p>Returns width of bitmap in pixels.</p>
</dd>
</li>
<dt><strong><a name="getheight" class="item">$height = $bitmap-><code>getHeight()</code>;</a></strong>
<dd>
<p>Returns height of bitmap in pixels.</p>
</dd>
</li>
</dl>
<p>
</p>
<hr />
<h1><a name="author">AUTHOR</a></h1>
<p>Soheil Seyfaie (<a href="mailto:soheil@netcom.ca">soheil@netcom.ca</a>) and
developers of ming.sourceforge.net</p>
<p>
</p>
<hr />
<h1><a name="see_also">SEE ALSO</a></h1>
<p>SWF, SWF::Fill, SWF::Shape, SWF::Button, SWF::Constants, png2dbl, gif2dbl, gif2mask</p>
</body>
</html>
|