Sophie

Sophie

distrib > Mageia > 1 > i586 > by-pkgid > c87dfbd6f7f653536d7b07ed7038c9d8 > files > 3577

clanlib0.8-docs-0.8.1-6.mga1.i586.rpm


<!-- clanlib header begin -->
<HTML>
<HEAD>
<TITLE>CL_Surface::draw - ClanLib Game SDK</TITLE>
<STYLE TYPE="text/css"><!--
HTML BODY
{
	font-family: verdana, helvetica, sans-serif;
	font-size: 12px;
}
H1 { font-size: 22px; }
H2 { font-size: 18px; }
H3 { font-size: 16px; }
H4 { font-size: 14px; }
P { font-size: 12px; }
LI { font-size: 12px; }
--></STYLE>
</HEAD>

<body bgcolor=white text=black link=blue vlink=#800080>

<center>
<img src="http://clanlib.org/gfx/clanlib.png">
</center>
<!-- clanlib header end -->

<center>
<p>
<a href="http://clanlib.org/docs.html">Home</a> |
<a href="classes.html">All Classes</a> |
<a href="modules.html">Grouped Classes</a> |
<a href="index.html">Index</a> |
<a href="search.html">Search</a>
</p>
</center>
<h1>CL_Surface::draw</h1>
<p>  Stateful draw surface on graphic context.  Stateless draw surface on graphic context.</p>
<pre>
	void draw(
		float x = 0, float y = 0, CL_GraphicContext* context = 0);

	void draw(
		const CL_Rect& dest, CL_GraphicContext* context = 0);

	void draw(
		const CL_Rect& src, const CL_Rect& dest, CL_GraphicContext* context = 0);

	void draw(
		const CL_Surface_DrawParams1& params1, CL_GraphicContext* context = 0);

	void draw(
		const CL_Surface_DrawParams2& params2, CL_GraphicContext* context = 0);
</pre>
<p><b>Parameters:</b></p>
<dl>
<dt><i>x, y</i></dt><dd>Anchor position of where to render surface. Actual rendering position depends on the anchor and the alignment mode.</dd>
<dt><i>context</i></dt><dd>Graphic context on which to render upon. If null, will use CL_Display's current graphic context.</dd>
<dt><i>dest</i></dt><dd>Rectangle to draw surface in.</dd>
<dt><i>src</i></dt><dd>Rectangle specifying the sub section of a surface to render.</dd>
<dt><i>srcX, srcY, srcWidth, srcHeight</i></dt><dd>Source rectangle for the surface.</dd>
<dt><i>srcX[4], srcY[4]</i></dt><dd>Four vertex points used as the source rectangle for the render.</dd>
<dt><i>destX, destY</i></dt><dd>Destination origin point for render.</dd>
<dt><i>destZ</i></dt><dd>Depth value for zbuffer when rendering.</dd>
<dt><i>red[4], green[4], blue[4], alpha[4]</i></dt><dd>Color for each corner of rectangle.</dd>
<dt><i>red, green, blue, alpha</i></dt><dd>Color for entire rectangle.</dd>
<dt><i>blend_src</i></dt><dd>Source blend function.</dd>
<dt><i>blend_dest</i></dt><dd>Destination blend function.</dd>
<dt><i>scale_x, scale_y</i></dt><dd>Scale values for render.</dd>
<dt><i>translate_origin</i></dt><dd>Alignment origin.</dd>
<dt><i>translate_x, translate_y</i></dt><dd>Translate relative to alignment origin.</dd>
<dt><i>rotate_angle</i></dt><dd>Angle in degrees to rotate the surface in the X-Y direction.</dd>
<dt><i>rotate_pitch</i></dt><dd>Angle in degrees to rotate the surface in the Y-Z direction.</dd>
<dt><i>rotate_yaw</i></dt><dd>Angle in degrees to rotate the surface in the X-Z direction.</dd>
<dt><i>rotate_origin</i></dt><dd>Rotation origin.</dd>
<dt><i>rotate_x, rotate_y</i></dt><dd>Rotation hotspot relative to rotation origin.</dd>
<dt><i>sub_pixel_accuracy</i></dt><dd>If true, floating point data isn't truncated and the texture matrix isn't offset (applicable to GL only)</dd>
<dt><i>context</i></dt><dd>Graphic context on which to render upon. If null, will use CL_Display's current graphic context.</dd>
</dl>
<p><b>Detailed description:</b></p>  <p>These drawing functions will draw the surface on the graphic context, using the attributes on CL_Surface.
  Attributes such as scaling, translate hotspot, rotate hotspot, blend functions, color will be used when
  drawing the surface.</p>  <p>Stateless drawing functions will not use any of the state attributes on CL_Surface. The state attributes
  on CL_Surface are parameters such as scaling, hotspots, blending functions and color. Instead the drawing
  functions take all the parameters it need to perform the render.</p>
  Subpixel versions don't perform texture texel shifting or truncate input to integers.
<p><b>See also:</b></p>
<p><a href="CL_GraphicContext.html">CL_GraphicContext</a> | <a href="CL_Rect.html">CL_Rect</a> | <a href="CL_Surface_DrawParams2.html">CL_Surface_DrawParams2</a> | <a href="CL_Surface.html">CL_Surface</a> | <a href="CL_Display.html">CL_Display</a> | <a href="CL_Surface_DrawParams1.html">CL_Surface_DrawParams1</a></p>


<!-- clanlib footer begin -->

<center><br><br><font color="#a0a0a0">
Questions or comments, write to the <a href="http://clanlib.org/contact.html">ClanLib mailing list</a>.
</font></center>

</body>
</html>
<!-- clanlib footer end -->