/Doc/ImageBase.html

https://bitbucket.org/alsh/pygui-mirror · 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>
  4. ImageBase is an abstract base class for 2D images that can be drawn on a Canvas.<br>
  5. <h2>Properties</h2>
  6. <blockquote> <dl><dt><tt>width</tt></dt><dd><i>Read only.</i> The width of the image in pixels.</dd></dl>
  7. <dl><dt><tt>height</tt></dt><dd><i>Read only.</i> The height of the image in pixels.</dd></dl>
  8. <dl><dt><tt>size</tt></dt><dd><i>Read only.</i> The size of the image in pixels.</dd></dl>
  9. <dl><dt><tt>bounds</tt></dt><dd><i>Read only.</i> The bounding rectangle of the image. The
  10. top left corner will always be (0, 0).</dd></dl>
  11. </blockquote>
  12. <h2>Methods</h2>
  13. <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
  14. 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>
  15. and <span style="font-style: italic;">dst_rect</span> are different sizes, the image is scaled to fit.</dd></dl>
  16. </blockquote>
  17. <br>
  18. </body></html>