/Doc/ImageBase.html
HTML | 22 lines | 18 code | 4 blank | 0 comment | 0 complexity | baa71a25a01a00c2bd3c19d744266d4b MD5 | raw file
1<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<html><head><meta content="text/html; charset=ISO-8859-1" http-equiv="content-type"><title>PyGUI - ImageBase class</title></head><body>
3<h1>class <span style="font-family: monospace;">ImageBase</span></h1>
4ImageBase is an abstract base class for 2D images that can be drawn on a Canvas.<br>
5<h2>Properties</h2>
6
7
8<blockquote> <dl><dt><tt>width</tt></dt><dd><i>Read only.</i> The width of the image in pixels.</dd></dl>
9 <dl><dt><tt>height</tt></dt><dd><i>Read only.</i> The height of the image in pixels.</dd></dl>
10 <dl><dt><tt>size</tt></dt><dd><i>Read only.</i> The size of the image in pixels.</dd></dl>
11 <dl><dt><tt>bounds</tt></dt><dd><i>Read only.</i> The bounding rectangle of the image. The
12top left corner will always be (0, 0).</dd></dl>
13</blockquote>
14<h2>Methods</h2>
15
16
17<blockquote> <dl><dt><tt>draw(canvas,</tt> <tt>src_rect,</tt> <tt>dst_rect)</tt></dt><dd>Draws the part of the image specified by <span style="font-style: italic;">src_rect</span> in the
18 area of the given <a href="Canvas.html">Canvas</a> specified by <span style="font-style: italic;">dst_rect.</span> If <span style="font-style: italic;">src_rect</span>
19 and <span style="font-style: italic;">dst_rect</span> are different sizes, the image is scaled to fit.</dd></dl>
20 </blockquote>
21<br>
22</body></html>