Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > 519a657156f8292188a5d8f560aa6169 > files > 28

pygame-doc-1.8.1-4mdv2010.0.i586.rpm


<html>
<title>overlay - Pygame Documentation</title>
<body bgcolor=#aaeebb text=#000000 link=#331111 vlink=#331111>


<table cellpadding=0 cellspacing=0 border=0 style='border: 3px solid black;' width='100%'>
<tr>
<td bgcolor='#c2fc20' style='padding: 6px;' align=center valign=center><a href='http://www.pygame.org/'><img src='../pygame_tiny.gif' border=0 width=200 height=60></a><br><b>pygame documentation</b></td>
<td bgcolor='#6aee28' style='border-left: 3px solid black; padding: 6px;' align=center valign=center>
	||&nbsp;
	<a href=http://www.pygame.org>Pygame Home</a> &nbsp;||&nbsp;
	<a href=../index.html>Help Contents</a> &nbsp;||
	<a href=index.html>Reference Index</a> &nbsp;||
	<br>&nbsp;<br>
	
<a href="cdrom.html">Cdrom</a>&nbsp;||&nbsp;
<a href="color.html">Color</a>&nbsp;||&nbsp;
<a href="cursors.html">Cursors</a>&nbsp;||&nbsp;
<a href="display.html">Display</a>&nbsp;||&nbsp;
<a href="draw.html">Draw</a>&nbsp;||&nbsp;
<a href="event.html">Event</a>&nbsp;||&nbsp;
<a href="font.html">Font</a>&nbsp;||&nbsp;
<a href="image.html">Image</a>&nbsp;||&nbsp;
<a href="joystick.html">Joystick</a>&nbsp;||&nbsp;
<a href="key.html">Key</a>&nbsp;||&nbsp;
<a href="mask.html">Mask</a>&nbsp;||&nbsp;
<a href="mixer.html">Mixer</a>&nbsp;||&nbsp;
<a href="mouse.html">Mouse</a>&nbsp;||&nbsp;
<a href="movie.html">Movie</a>&nbsp;||&nbsp;
<a href="music.html">Music</a>&nbsp;||&nbsp;
<a href="overlay.html">Overlay</a>&nbsp;||&nbsp;
<a href="pixelarray.html">Pixelarray</a>&nbsp;||&nbsp;
<a href="pygame.html">Pygame</a>&nbsp;||&nbsp;
<a href="rect.html">Rect</a>&nbsp;||&nbsp;
<a href="scrap.html">Scrap</a>&nbsp;||&nbsp;
<a href="sndarray.html">Sndarray</a>&nbsp;||&nbsp;
<a href="sprite.html">Sprite</a>&nbsp;||&nbsp;
<a href="surface.html">Surface</a>&nbsp;||&nbsp;
<a href="surfarray.html">Surfarray</a>&nbsp;||&nbsp;
<a href="time.html">Time</a>&nbsp;||&nbsp;
<a href="transform.html">Transform</a>
</td></tr></table>
<br>


<a name="pygame.Overlay">
<big><b>pygame.Overlay</big></b><br><ul>
  <i>pygame object for video overlay graphics</i><br>
  <tt>pygame.Overlay(format, (width, height)): return Overlay</tt><br>
<ul><small><table>
  <tr><td><a href="overlay.html#Overlay.display">Overlay.display</a> - <font size=-1>set the overlay pixel data</font></td><td>set the overlay pixel data</td></tr>
  <tr><td><a href="overlay.html#Overlay.set_location">Overlay.set_location</a> - <font size=-1>control where the overlay is displayed</font></td><td>control where the overlay is displayed</td></tr>
  <tr><td><a href="overlay.html#Overlay.get_hardware">Overlay.get_hardware</a> - <font size=-1>test if the Overlay is hardware accelerated</font></td><td>test if the Overlay is hardware accelerated</td></tr>
</table></small></ul>
<p>The Overlay objects provide support for accessing hardware video overlays. Video overlays do not use standard <tt>RGB</tt> pixel formats, and can use multiple resolutions of data to create a single image. </p>
<p>The Overlay objects represent lower level access to the display hardware. To use the object you must understand the technical details of video overlays. </p>
<p>The Overlay format determines the type of pixel data used. Not all hardware will support all types of overlay formats. Here is a list of available format types: </p>
<pre>  YV12_OVERLAY, IYUV_OVERLAY, YUV2_OVERLAY, UYVY_OVERLAY, YVYU_OVERLAY
</pre><p>The width and height arguments control the size for the overlay image data. The overlay image can be displayed at any size, not just the resolution of the overlay. </p>
<p>The overlay objects are always visible, and always show above the regular display contents. </p>
<!--COMMENTS:pygame.Overlay--> &nbsp;<br> 


<a name="Overlay.display">
<big><b>Overlay.display</big></b><br><ul>
  <i>set the overlay pixel data</i><br>
  <tt>Overlay.display((y, u, v)): return None</tt><br>
  <tt>Overlay.display(): return None</tt><br>
<p>Display the yuv data in SDL's overlay planes. The y, u, and v arguments are strings of binary data. The data must be in the correct format used to create the Overlay. </p>
<p>If no argument is passed in, the Overlay will simply be redrawn with the current data. This can be useful when the Overlay is not really hardware accelerated. </p>
<p>The strings are not validated, and improperly sized strings could crash the program. </p>
<!--COMMENTS:Overlay.display--> &nbsp;<br> 
<br></ul>


<a name="Overlay.set_location">
<big><b>Overlay.set_location</big></b><br><ul>
  <i>control where the overlay is displayed</i><br>
  <tt>Overlay.set_location(rect): return None</tt><br>
<p>Set the location for the overlay. The overlay will always be shown relative to the main display Surface. This does not actually redraw the overlay, it will be updated on the next call to <tt><a href="overlay.html#Overlay.display">Overlay.display</a> - <font size=-1>set the overlay pixel data</font></tt>. </p>
<!--COMMENTS:Overlay.set_location--> &nbsp;<br> 
<br></ul>


<a name="Overlay.get_hardware">
<big><b>Overlay.get_hardware</big></b><br><ul>
  <i>test if the Overlay is hardware accelerated</i><br>
  <tt>Overlay.get_hardware(rect): return int</tt><br>
<p>Returns a True value when the Overlay is hardware accelerated. If the platform does not support acceleration, software rendering is used. </p>
<!--COMMENTS:Overlay.get_hardware--> &nbsp;<br> 
<br></ul>
<br></ul>

</body></html>