Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > bad97183153701b09df5fae1052b1c30 > files > 1954

crystalspace-doc-1.2.1-5mdv2010.0.i586.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>Crystal Space 1.2.1: ivideo/graph2d.h Source File (Crystal Space 1.2.1 Public API Reference)</title>
<link href="tabs.css" rel="stylesheet" type="text/css">
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<table border="0" cellpadding="0" cellspacing="0" width="100%" class="head">
 <tr height="59">
  <td class="head" width="202" valign="bottom" style="padding-left:0;"><a href="http://www.crystalspace3d.org/"><img src="csblur.png" width="236" height="59" alt="CrystalSpace" border="0"></a></td>
  <td class="head"><h2>Public API Reference</h2></td>
 </tr>
 <tr height="11">
  <td colspan="2" class="headshadow" valign="top" style="padding-left:0;"><img src="csblurb.png" width="236" height="11" alt="" border="0"></td>
 </tr>
</table>
<div class="content">
<!-- Generated by Doxygen 1.5.3 -->
<div class="tabs">
  <ul>
    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
    <li><a href="modules.html"><span>Modules</span></a></li>
    <li><a href="namespaces.html"><span>Namespaces</span></a></li>
    <li><a href="classes.html"><span>Classes</span></a></li>
    <li class="current"><a href="files.html"><span>Files</span></a></li>
    <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
  </ul>
</div>
<h1>ivideo/graph2d.h</h1><a href="ivideo_2graph2d_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
<a name="l00002"></a>00002 <span class="comment">    Copyright (C) 2001 by Jorrit Tyberghein</span>
<a name="l00003"></a>00003 <span class="comment">    Copyright (C) 1998-2000 by Andrew Zabolotny &lt;bit@eltech.ru&gt;</span>
<a name="l00004"></a>00004 <span class="comment"></span>
<a name="l00005"></a>00005 <span class="comment">    This library is free software; you can redistribute it and/or</span>
<a name="l00006"></a>00006 <span class="comment">    modify it under the terms of the GNU Library General Public</span>
<a name="l00007"></a>00007 <span class="comment">    License as published by the Free Software Foundation; either</span>
<a name="l00008"></a>00008 <span class="comment">    version 2 of the License, or (at your option) any later version.</span>
<a name="l00009"></a>00009 <span class="comment"></span>
<a name="l00010"></a>00010 <span class="comment">    This library is distributed in the hope that it will be useful,</span>
<a name="l00011"></a>00011 <span class="comment">    but WITHOUT ANY WARRANTY; without even the implied warranty of</span>
<a name="l00012"></a>00012 <span class="comment">    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU</span>
<a name="l00013"></a>00013 <span class="comment">    Library General Public License for more details.</span>
<a name="l00014"></a>00014 <span class="comment"></span>
<a name="l00015"></a>00015 <span class="comment">    You should have received a copy of the GNU Library General Public</span>
<a name="l00016"></a>00016 <span class="comment">    License along with this library; if not, write to the Free</span>
<a name="l00017"></a>00017 <span class="comment">    Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.</span>
<a name="l00018"></a>00018 <span class="comment">*/</span>
<a name="l00019"></a>00019 
<a name="l00020"></a>00020 <span class="preprocessor">#ifndef __CS_IVIDEO_GRAPH2D_H__</span>
<a name="l00021"></a>00021 <span class="preprocessor"></span><span class="preprocessor">#define __CS_IVIDEO_GRAPH2D_H__</span>
<a name="l00022"></a>00022 <span class="preprocessor"></span>
<a name="l00031"></a>00031 <span class="preprocessor">#include "<a class="code" href="scf_8h.html" title="Crystal Space Shared Class Facility (SCF).">csutil/scf.h</a>"</span>
<a name="l00032"></a>00032 <span class="preprocessor">#include "<a class="code" href="rgbpixel_8h.html" title="RGB colors.">csgfx/rgbpixel.h</a>"</span>
<a name="l00033"></a>00033 <span class="preprocessor">#include "<a class="code" href="cursor_8h.html" title="Mouse cursor IDs.">ivideo/cursor.h</a>"</span>
<a name="l00034"></a>00034 
<a name="l00035"></a>00035 
<a name="l00036"></a>00036 <span class="keyword">struct </span><a class="code" href="structiImage.html" title="The iImage interface is used to work with image objects.">iImage</a>;
<a name="l00037"></a>00037 <span class="keyword">struct </span><a class="code" href="structiFontServer.html" title="A font server interface.">iFontServer</a>;
<a name="l00038"></a>00038 <span class="keyword">struct </span><a class="code" href="structiFont.html" title="A font object.">iFont</a>;
<a name="l00039"></a>00039 <span class="keyword">struct </span><a class="code" href="structiNativeWindow.html" title="This interface represents a native window.">iNativeWindow</a>;
<a name="l00040"></a>00040 <span class="keyword">struct </span><a class="code" href="structiGraphics2D.html" title="This is the interface for 2D renderer.">iGraphics2D</a>;
<a name="l00041"></a>00041 
<a name="l00042"></a>00042 <span class="keyword">class </span><a class="code" href="classcsRect.html" title="Rectangle class: simple class for manipulating 2D rectangles.">csRect</a>;
<a name="l00043"></a>00043 
<a name="l00045"></a>00045 <span class="keyword">enum</span>
<a name="l00046"></a>00046 {
<a name="l00051"></a><a class="code" href="group__gfx2d.html#gga57e16cd48de3b9a989056ff8df26f8454886ddf8e7152c7de68ce148eeba005">00051</a>   <a class="code" href="group__gfx2d.html#gga57e16cd48de3b9a989056ff8df26f8454886ddf8e7152c7de68ce148eeba005" title="Write by baseline, x and y are treated as the pen position on a baseline.">CS_WRITE_BASELINE</a>    = (1 &lt;&lt; 0),
<a name="l00055"></a><a class="code" href="group__gfx2d.html#gga57e16cd48de3b9a989056ff8df26f8470c03137897cfcdd55da3da9584c5e37">00055</a>   <a class="code" href="group__gfx2d.html#gga57e16cd48de3b9a989056ff8df26f8470c03137897cfcdd55da3da9584c5e37" title="Don&amp;#39;t use anti-aliased glyphs.">CS_WRITE_NOANTIALIAS</a> = (1 &lt;&lt; 1)
<a name="l00056"></a>00056 };
<a name="l00057"></a>00057 
<a name="l00059"></a><a class="code" href="structcsPixelCoord.html">00059</a> <span class="keyword">struct </span><a class="code" href="structcsPixelCoord.html" title="Simple 2D pixel coordinate.">csPixelCoord</a>
<a name="l00060"></a>00060 {
<a name="l00062"></a><a class="code" href="structcsPixelCoord.html#3ef06d4c8826da90ec4b8f7d959362fe">00062</a>   <span class="keywordtype">int</span> <a class="code" href="structcsPixelCoord.html#3ef06d4c8826da90ec4b8f7d959362fe" title="X component.">x</a>;
<a name="l00064"></a><a class="code" href="structcsPixelCoord.html#02fcc2403605e00c969262d2f4f431dc">00064</a>   <span class="keywordtype">int</span> <a class="code" href="structcsPixelCoord.html#02fcc2403605e00c969262d2f4f431dc" title="Y component.">y</a>;
<a name="l00065"></a>00065 };
<a name="l00066"></a>00066 
<a name="l00070"></a><a class="code" href="structcsPixelFormat.html">00070</a> <span class="keyword">struct </span><a class="code" href="structcsPixelFormat.html" title="Structure describing the pixel format.">csPixelFormat</a>
<a name="l00071"></a>00071 {
<a name="l00077"></a><a class="code" href="structcsPixelFormat.html#604edca9430a5d5b4e812baa49e7fbf1">00077</a>   <a class="code" href="group__util.html#g1134b580f8da4de94ca6b1de4d37975e" title="unsigned 32-bit integer (0..4 294 967 295)">uint32</a> <a class="code" href="structcsPixelFormat.html#604edca9430a5d5b4e812baa49e7fbf1" title="The masks to extract the color information from a pixel (truecolor mode only).">RedMask</a>, <a class="code" href="structcsPixelFormat.html#f15b67458e85bdf86cf2c2aa6a2c298c">GreenMask</a>, <a class="code" href="structcsPixelFormat.html#344c300262e89a13626c644d2ddb5865">BlueMask</a>, <a class="code" href="structcsPixelFormat.html#7bc610c1f073b232fe4ae22f6696baa2">AlphaMask</a>;
<a name="l00082"></a><a class="code" href="structcsPixelFormat.html#5b707202477e14246335d24e1e428fe8">00082</a>   <span class="keywordtype">int</span> <a class="code" href="structcsPixelFormat.html#5b707202477e14246335d24e1e428fe8" title="The shifts to extract the color information from a pixel (truecolor mode only).">RedShift</a>, <a class="code" href="structcsPixelFormat.html#38b92fd903f6010730e88a36fd60c0da">GreenShift</a>, <a class="code" href="structcsPixelFormat.html#449980233ccf3a383530cc3d24cfb2b8">BlueShift</a>, <a class="code" href="structcsPixelFormat.html#8fe4f27d7f55ee71c0919658b3471899">AlphaShift</a>;
<a name="l00084"></a><a class="code" href="structcsPixelFormat.html#ab76d988886d16b779a5610b2cceee1c">00084</a>   <span class="keywordtype">int</span> <a class="code" href="structcsPixelFormat.html#ab76d988886d16b779a5610b2cceee1c" title="The number of significant bits for every color.">RedBits</a>, <a class="code" href="structcsPixelFormat.html#4ac98dd68e5529a831a85e0af15f2202">GreenBits</a>, <a class="code" href="structcsPixelFormat.html#4d1b414f4376180d379948fa4570e795">BlueBits</a>, <a class="code" href="structcsPixelFormat.html#d83273bbb742ff808cfe067b649c62a9">AlphaBits</a>;
<a name="l00085"></a>00085 
<a name="l00092"></a><a class="code" href="structcsPixelFormat.html#f02f2fb5a97de4077d7b9067743c1c55">00092</a>   <span class="keywordtype">int</span> <a class="code" href="structcsPixelFormat.html#f02f2fb5a97de4077d7b9067743c1c55" title="Number of palette entries.">PalEntries</a>;
<a name="l00093"></a>00093 
<a name="l00101"></a><a class="code" href="structcsPixelFormat.html#edc82fc868b361aa8a2f6a316fdd2258">00101</a>   <span class="keywordtype">int</span> <a class="code" href="structcsPixelFormat.html#edc82fc868b361aa8a2f6a316fdd2258" title="Number of bytes for every pixel.">PixelBytes</a>;
<a name="l00102"></a>00102 
<a name="l00107"></a><a class="code" href="structcsPixelFormat.html#f8f67304c3819c3b4954ca6922281599">00107</a>   <span class="keywordtype">void</span> <a class="code" href="structcsPixelFormat.html#f8f67304c3819c3b4954ca6922281599" title="Little helper function to complete a csPixelFormat structure given that the masks...">complete</a> ()
<a name="l00108"></a>00108   {
<a name="l00109"></a>00109 <span class="preprocessor">#define COMPUTE(comp)                                                   \</span>
<a name="l00110"></a>00110 <span class="preprocessor">    {                                                                   \</span>
<a name="l00111"></a>00111 <span class="preprocessor">      unsigned long i, tmp = comp##Mask;                                \</span>
<a name="l00112"></a>00112 <span class="preprocessor">      for (i = 0; tmp &amp;&amp; !(tmp &amp; 1); tmp &gt;&gt;= 1, i++) {}                 \</span>
<a name="l00113"></a>00113 <span class="preprocessor">      comp##Shift = i;                                                  \</span>
<a name="l00114"></a>00114 <span class="preprocessor">      for (i = 0; tmp &amp; 1; tmp &gt;&gt;= 1, i++) {}                           \</span>
<a name="l00115"></a>00115 <span class="preprocessor">      comp##Bits = i;                                                   \</span>
<a name="l00116"></a>00116 <span class="preprocessor">    }</span>
<a name="l00117"></a>00117 <span class="preprocessor"></span>    COMPUTE (Red);
<a name="l00118"></a>00118     COMPUTE (Green);
<a name="l00119"></a>00119     COMPUTE (Blue);
<a name="l00120"></a>00120     COMPUTE (Alpha);
<a name="l00121"></a>00121 <span class="preprocessor">#undef COMPUTE</span>
<a name="l00122"></a>00122 <span class="preprocessor"></span>  }
<a name="l00123"></a>00123 };
<a name="l00124"></a>00124 
<a name="l00126"></a><a class="code" href="structcsImageArea.html">00126</a> <span class="keyword">struct </span><a class="code" href="structcsImageArea.html" title="This structure is used for saving/restoring areas of screen.">csImageArea</a>
<a name="l00127"></a>00127 {
<a name="l00128"></a><a class="code" href="structcsImageArea.html#50f21f6d8b25c086420c38585b5f7861">00128</a>   <span class="keywordtype">int</span> <a class="code" href="structcsImageArea.html#6e335096aa12af0c4b8d6de64dafe246">x</a>, <a class="code" href="structcsImageArea.html#50f21f6d8b25c086420c38585b5f7861">y</a>, <a class="code" href="structcsImageArea.html#fa83b47e733e5a65555b24d4bf1f3828">w</a>, <a class="code" href="structcsImageArea.html#c4de34ee41b332139cbf7a00e9f6d2c9">h</a>;
<a name="l00129"></a><a class="code" href="structcsImageArea.html#f6a44988312637b6cb0ba0b0b53d0012">00129</a>   <span class="keywordtype">char</span> *<a class="code" href="structcsImageArea.html#f6a44988312637b6cb0ba0b0b53d0012">data</a>;
<a name="l00130"></a>00130 
<a name="l00131"></a><a class="code" href="structcsImageArea.html#13d33e7fb9adf636d7d2d43b89d6d995">00131</a>   <span class="keyword">inline</span> <a class="code" href="structcsImageArea.html#13d33e7fb9adf636d7d2d43b89d6d995">csImageArea</a> (<span class="keywordtype">int</span> sx, <span class="keywordtype">int</span> sy, <span class="keywordtype">int</span> sw, <span class="keywordtype">int</span> sh)
<a name="l00132"></a>00132   { <a class="code" href="structcsImageArea.html#6e335096aa12af0c4b8d6de64dafe246">x</a> = sx; <a class="code" href="structcsImageArea.html#50f21f6d8b25c086420c38585b5f7861">y</a> = sy; <a class="code" href="structcsImageArea.html#fa83b47e733e5a65555b24d4bf1f3828">w</a> = sw; <a class="code" href="structcsImageArea.html#c4de34ee41b332139cbf7a00e9f6d2c9">h</a> = sh; <a class="code" href="structcsImageArea.html#f6a44988312637b6cb0ba0b0b53d0012">data</a> = 0; }
<a name="l00133"></a>00133 };
<a name="l00134"></a>00134 
<a name="l00140"></a><a class="code" href="structiOffscreenCanvasCallback.html">00140</a> <span class="keyword">struct </span><a class="code" href="structiOffscreenCanvasCallback.html" title="When you create an offscreen canvas (CreateOffscreenCanvas()) then you can use this...">iOffscreenCanvasCallback</a> : <span class="keyword">public</span> <span class="keyword">virtual</span> <a class="code" href="structiBase.html" title="This is the basic interface: all other interfaces should be derived from this one...">iBase</a>
<a name="l00141"></a>00141 {
<a name="l00142"></a>00142   SCF_INTERFACE (<a class="code" href="structiOffscreenCanvasCallback.html" title="When you create an offscreen canvas (CreateOffscreenCanvas()) then you can use this...">iOffscreenCanvasCallback</a>, 1, 0, 0);
<a name="l00143"></a>00143 
<a name="l00145"></a>00145   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiOffscreenCanvasCallback.html#b41a6394a1072e120f1675f668377af9" title="FinishDraw has been called.">FinishDraw</a> (<a class="code" href="structiGraphics2D.html" title="This is the interface for 2D renderer.">iGraphics2D</a>* canvas) = 0;
<a name="l00147"></a>00147   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiOffscreenCanvasCallback.html#28ab6d56cddb23493da37f2fc7dfa96f" title="Palette entry has been modified.">SetRGB</a> (<a class="code" href="structiGraphics2D.html" title="This is the interface for 2D renderer.">iGraphics2D</a>* canvas, <span class="keywordtype">int</span> idx, <span class="keywordtype">int</span> r, <span class="keywordtype">int</span> g, <span class="keywordtype">int</span> b) = 0;
<a name="l00148"></a>00148 };
<a name="l00149"></a>00149 
<a name="l00173"></a><a class="code" href="structiGraphics2D.html">00173</a> <span class="keyword">struct </span><a class="code" href="structiGraphics2D.html" title="This is the interface for 2D renderer.">iGraphics2D</a> : <span class="keyword">public</span> <span class="keyword">virtual</span> <a class="code" href="structiBase.html" title="This is the basic interface: all other interfaces should be derived from this one...">iBase</a>
<a name="l00174"></a>00174 {
<a name="l00175"></a>00175   SCF_INTERFACE (<a class="code" href="structiGraphics2D.html" title="This is the interface for 2D renderer.">iGraphics2D</a>, 3, 1, 0);
<a name="l00176"></a>00176   
<a name="l00178"></a>00178   <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="structiGraphics2D.html#dbf60a925a17f7b43298d6d2bf1ff649" title="Open the device.">Open</a> () = 0;
<a name="l00179"></a>00179 
<a name="l00181"></a>00181   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiGraphics2D.html#cf24016625b4539853fe23155b836433" title="Close the device.">Close</a> () = 0;
<a name="l00182"></a>00182 
<a name="l00184"></a>00184   <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="structiGraphics2D.html#098d872db308fcaa0e90c67ff26b85de" title="Return the width of the framebuffer.">GetWidth</a> () = 0;
<a name="l00185"></a>00185 
<a name="l00187"></a>00187   <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="structiGraphics2D.html#02ffd3328c7d0389f7e2d4008d3e7831" title="Return the height of the framebuffer.">GetHeight</a> () = 0;
<a name="l00188"></a>00188 
<a name="l00190"></a>00190   <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="structiGraphics2D.html#0c5c7675d25c35faad8664787d68f3f2" title="Get active videopage number (starting from zero).">GetPage</a> () = 0;
<a name="l00191"></a>00191 
<a name="l00193"></a>00193   <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="structiGraphics2D.html#6d875cd16cbcb64a3024b3bef79afe47" title="Enable or disable double buffering; returns success status.">DoubleBuffer</a> (<span class="keywordtype">bool</span> Enable) = 0;
<a name="l00194"></a>00194 
<a name="l00196"></a>00196   <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="structiGraphics2D.html#8fbdea73dbd3bedda5b450f057ecaee8" title="Get the double buffer state.">GetDoubleBufferState</a> () = 0;
<a name="l00197"></a>00197 
<a name="l00199"></a>00199   <span class="keyword">virtual</span> <a class="code" href="structcsPixelFormat.html" title="Structure describing the pixel format.">csPixelFormat</a> <span class="keyword">const</span>* <a class="code" href="structiGraphics2D.html#3c434c0095d5efa50f8acdefe7cdd283" title="Return information about the pixel format.">GetPixelFormat</a> () = 0;
<a name="l00200"></a>00200 
<a name="l00206"></a>00206   <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="structiGraphics2D.html#1c0c628776e00d3a11c6d78d2d432a78" title="Return the number of bytes for every pixel.">GetPixelBytes</a> () = 0;
<a name="l00207"></a>00207 
<a name="l00215"></a>00215   <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="structiGraphics2D.html#3d72e1b805625ce1e86a941931ffb91d" title="Return the number of palette entries that can be modified.">GetPalEntryCount</a> () = 0;
<a name="l00216"></a>00216 
<a name="l00218"></a>00218   <span class="keyword">virtual</span> <a class="code" href="structcsRGBpixel.html" title="An RGB pixel.">csRGBpixel</a> *<a class="code" href="structiGraphics2D.html#db2ede0cb8859bac4da2858ff230a50a" title="Get the palette (if there is one).">GetPalette</a> () = 0;
<a name="l00219"></a>00219 
<a name="l00224"></a>00224   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiGraphics2D.html#902e20c4f1aaaf8f78d6064aa98161b6" title="Set a color index to given R,G,B (0.">SetRGB</a> (<span class="keywordtype">int</span> i, <span class="keywordtype">int</span> r, <span class="keywordtype">int</span> g, <span class="keywordtype">int</span> b) = 0;
<a name="l00233"></a>00233   <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="structiGraphics2D.html#60b21bab24b2e9e20062a610b0f8fc8e" title="Find an RGB (0.">FindRGB</a> (<span class="keywordtype">int</span> r, <span class="keywordtype">int</span> g, <span class="keywordtype">int</span> b, <span class="keywordtype">int</span> a = 255) = 0;
<a name="l00234"></a>00234 
<a name="l00238"></a>00238   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiGraphics2D.html#31b837f87f3108c4e23d5e18d73137d0" title="Retrieve the R,G,B tuple for a given color index.">GetRGB</a> (<span class="keywordtype">int</span> color, <span class="keywordtype">int</span>&amp; r, <span class="keywordtype">int</span>&amp; g, <span class="keywordtype">int</span>&amp; b) = 0;
<a name="l00242"></a>00242   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiGraphics2D.html#31b837f87f3108c4e23d5e18d73137d0" title="Retrieve the R,G,B tuple for a given color index.">GetRGB</a> (<span class="keywordtype">int</span> color, <span class="keywordtype">int</span>&amp; r, <span class="keywordtype">int</span>&amp; g, <span class="keywordtype">int</span>&amp; b, <span class="keywordtype">int</span>&amp; a) = 0;
<a name="l00243"></a>00243   
<a name="l00249"></a>00249   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiGraphics2D.html#0e1cdb21f816bf59fb6f8f89e7487149" title="Set clipping rectangle.">SetClipRect</a> (<span class="keywordtype">int</span> nMinX, <span class="keywordtype">int</span> nMinY, <span class="keywordtype">int</span> nMaxX, <span class="keywordtype">int</span> nMaxY) = 0;
<a name="l00250"></a>00250 
<a name="l00252"></a>00252   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiGraphics2D.html#661e73275c951a9871ba8ac40170bbd3" title="Retrieve clipping rectangle.">GetClipRect</a>(<span class="keywordtype">int</span>&amp; nMinX, <span class="keywordtype">int</span>&amp; nMinY, <span class="keywordtype">int</span>&amp; nMaxX, <span class="keywordtype">int</span>&amp; nMaxY) = 0;
<a name="l00253"></a>00253 
<a name="l00258"></a>00258   <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="structiGraphics2D.html#7901d5c26aaf8fddc078b1d5e9d3ba24" title="This routine should be called before any draw operations.">BeginDraw</a> () = 0;
<a name="l00259"></a>00259 
<a name="l00261"></a>00261   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiGraphics2D.html#58e0448afd981ebe5b402a3151c7bb9e" title="This routine should be called when you finished drawing.">FinishDraw</a> () = 0;
<a name="l00262"></a>00262 
<a name="l00268"></a>00268   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiGraphics2D.html#b3c704775a395a752e80d56c391f7842" title="Flip video pages (or dump backbuffer into framebuffer).">Print</a> (<a class="code" href="classcsRect.html" title="Rectangle class: simple class for manipulating 2D rectangles.">csRect</a> <span class="keyword">const</span>* pArea) = 0;
<a name="l00269"></a>00269 
<a name="l00271"></a>00271   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiGraphics2D.html#e65d69ddf39f387adb9eb4e2ba61c1cc" title="Clear backbuffer.">Clear</a> (<span class="keywordtype">int</span> color) = 0;
<a name="l00272"></a>00272 
<a name="l00274"></a>00274   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiGraphics2D.html#62dd52c9b2bd80e33071687cfbb9cb92" title="Clear all video pages.">ClearAll</a> (<span class="keywordtype">int</span> color) = 0;
<a name="l00275"></a>00275 
<a name="l00277"></a>00277   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiGraphics2D.html#3b86658dbcea0a9cfb7e6b19483a4bc7" title="Draw a line.">DrawLine</a>(<span class="keywordtype">float</span> x1, <span class="keywordtype">float</span> y1, <span class="keywordtype">float</span> x2, <span class="keywordtype">float</span> y2, <span class="keywordtype">int</span> color) = 0;
<a name="l00278"></a>00278 
<a name="l00280"></a>00280   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiGraphics2D.html#d6abb6d4a418ad240d83675d6c3cf6c3" title="Draw a box.">DrawBox</a> (<span class="keywordtype">int</span> x, <span class="keywordtype">int</span> y, <span class="keywordtype">int</span> w, <span class="keywordtype">int</span> h, <span class="keywordtype">int</span> color) = 0;
<a name="l00281"></a>00281 
<a name="l00286"></a>00286   <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="structiGraphics2D.html#f4faa8bec7b86a03464cabbe65723adc" title="Clip a line against given rectangle.">ClipLine</a> (<span class="keywordtype">float</span>&amp; x1, <span class="keywordtype">float</span>&amp; y1, <span class="keywordtype">float</span>&amp; x2, <span class="keywordtype">float</span>&amp; y2,
<a name="l00287"></a>00287     <span class="keywordtype">int</span> xmin, <span class="keywordtype">int</span> ymin, <span class="keywordtype">int</span> xmax, <span class="keywordtype">int</span> ymax) = 0;
<a name="l00288"></a>00288 
<a name="l00290"></a>00290   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiGraphics2D.html#2609b30b3aab7792da8e60a3553316ec" title="Draw a pixel.">DrawPixel</a> (<span class="keywordtype">int</span> x, <span class="keywordtype">int</span> y, <span class="keywordtype">int</span> color) = 0;
<a name="l00291"></a>00291 
<a name="l00293"></a>00293   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiGraphics2D.html#09e7db6102e0327c14a5589255d1da4d" title="Draw an array of pixel coordinates with the given color.">DrawPixels</a>(<a class="code" href="structcsPixelCoord.html" title="Simple 2D pixel coordinate.">csPixelCoord</a> <span class="keyword">const</span>* pixels, <span class="keywordtype">int</span> num_pixels,
<a name="l00294"></a>00294      <span class="keywordtype">int</span> color) = 0;
<a name="l00295"></a>00295 
<a name="l00297"></a>00297   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiGraphics2D.html#dee6b567cb1aa39ded1ae4bc1abb9128" title="Blit a memory block. Format of the image is RGBA in bytes. Row by row.">Blit</a> (<span class="keywordtype">int</span> x, <span class="keywordtype">int</span> y, <span class="keywordtype">int</span> width, <span class="keywordtype">int</span> height,
<a name="l00298"></a>00298     <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <span class="keyword">const</span>* data) = 0;
<a name="l00299"></a>00299 
<a name="l00301"></a>00301   <span class="keyword">virtual</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *<a class="code" href="structiGraphics2D.html#f870653e98aeae7555208ad9e0e793a2" title="Returns the address of the pixel at the specified (x, y) coordinates.">GetPixelAt</a> (<span class="keywordtype">int</span> x, <span class="keywordtype">int</span> y) = 0;
<a name="l00302"></a>00302 
<a name="l00304"></a>00304   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiGraphics2D.html#4b6b04ba42306f59f17743693c800128" title="Query pixel R,G,B at given screen location.">GetPixel</a> (<span class="keywordtype">int</span> x, <span class="keywordtype">int</span> y, <a class="code" href="group__util.html#gdde6aaee8457bee49c2a92621fe22b79" title="unsigned 8-bit integer (0..255)">uint8</a> &amp;oR, <a class="code" href="group__util.html#gdde6aaee8457bee49c2a92621fe22b79" title="unsigned 8-bit integer (0..255)">uint8</a> &amp;oG, <a class="code" href="group__util.html#gdde6aaee8457bee49c2a92621fe22b79" title="unsigned 8-bit integer (0..255)">uint8</a> &amp;oB) = 0;
<a name="l00306"></a>00306   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiGraphics2D.html#4b6b04ba42306f59f17743693c800128" title="Query pixel R,G,B at given screen location.">GetPixel</a> (<span class="keywordtype">int</span> x, <span class="keywordtype">int</span> y, <a class="code" href="group__util.html#gdde6aaee8457bee49c2a92621fe22b79" title="unsigned 8-bit integer (0..255)">uint8</a> &amp;oR, <a class="code" href="group__util.html#gdde6aaee8457bee49c2a92621fe22b79" title="unsigned 8-bit integer (0..255)">uint8</a> &amp;oG, <a class="code" href="group__util.html#gdde6aaee8457bee49c2a92621fe22b79" title="unsigned 8-bit integer (0..255)">uint8</a> &amp;oB,
<a name="l00307"></a>00307         <a class="code" href="group__util.html#gdde6aaee8457bee49c2a92621fe22b79" title="unsigned 8-bit integer (0..255)">uint8</a> &amp;oA) = 0;
<a name="l00308"></a>00308 
<a name="l00314"></a>00314   <span class="keyword">virtual</span> <a class="code" href="structcsImageArea.html" title="This structure is used for saving/restoring areas of screen.">csImageArea</a> *<a class="code" href="structiGraphics2D.html#fdcb1f0264b4a2b3fb4de931bfdb1498" title="Save a subarea of screen and return a handle to saved buffer.">SaveArea</a> (<span class="keywordtype">int</span> x, <span class="keywordtype">int</span> y, <span class="keywordtype">int</span> w, <span class="keywordtype">int</span> h) = 0;
<a name="l00315"></a>00315 
<a name="l00317"></a>00317   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiGraphics2D.html#7eaecf7842b7527bf515f03cb4773959" title="Restore a subarea of screen saved with SaveArea().">RestoreArea</a> (<a class="code" href="structcsImageArea.html" title="This structure is used for saving/restoring areas of screen.">csImageArea</a> *Area, <span class="keywordtype">bool</span> Free) = 0;
<a name="l00318"></a>00318 
<a name="l00320"></a>00320   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiGraphics2D.html#e221be199450186edecc2fa5cd63ebb7" title="Free storage allocated for a subarea of screen.">FreeArea</a> (<a class="code" href="structcsImageArea.html" title="This structure is used for saving/restoring areas of screen.">csImageArea</a> *Area) = 0;
<a name="l00321"></a>00321 
<a name="l00330"></a>00330   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiGraphics2D.html#7d50f77432f14ba009fac56f673c0023" title="Write a text string into the back buffer.">Write</a> (<a class="code" href="structiFont.html" title="A font object.">iFont</a> *font, <span class="keywordtype">int</span> x, <span class="keywordtype">int</span> y, <span class="keywordtype">int</span> fg, <span class="keywordtype">int</span> bg,
<a name="l00331"></a>00331     <span class="keyword">const</span> <span class="keywordtype">char</span> *str, <a class="code" href="group__util.html#g91ad9478d81a7aaf2593e8d9c3d06a14" title="Shortcut for default unsigned int.">uint</a> flags = 0) = 0;
<a name="l00332"></a>00332 
<a name="l00333"></a>00333 
<a name="l00335"></a>00335   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiGraphics2D.html#222a464617b214ac3d58635794e96b9e" title="Enable/disable canvas resizing.">AllowResize</a> (<span class="keywordtype">bool</span> iAllow) = 0;
<a name="l00336"></a>00336 
<a name="l00338"></a>00338   <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="structiGraphics2D.html#22b0cd2c6781aaeb807f7dd3bc2bd9b0" title="Resize the canvas.">Resize</a> (<span class="keywordtype">int</span> w, <span class="keywordtype">int</span> h) = 0;
<a name="l00339"></a>00339 
<a name="l00341"></a>00341   <span class="keyword">virtual</span> <a class="code" href="structiFontServer.html" title="A font server interface.">iFontServer</a> *<a class="code" href="structiGraphics2D.html#dcd4e89ff570605a377946f1ee37ce74" title="Get the active font server (does not do IncRef()).">GetFontServer</a> () = 0;
<a name="l00342"></a>00342 
<a name="l00350"></a>00350   <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="structiGraphics2D.html#cc9fc5776286ea8444a505e478d3c3e5" title="Perform a system specific exension.">PerformExtension</a> (<span class="keywordtype">char</span> <span class="keyword">const</span>* command, ...) = 0;
<a name="l00351"></a>00351 
<a name="l00357"></a>00357   <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="structiGraphics2D.html#151f96b4f7fc9cbc1404101a755f3569" title="Perform a system specific exension.">PerformExtensionV</a> (<span class="keywordtype">char</span> <span class="keyword">const</span>* command, va_list) = 0;
<a name="l00358"></a>00358 
<a name="l00360"></a>00360   <span class="keyword">virtual</span> <a class="code" href="classcsPtr.html" title="A pointer encapsulator.">csPtr&lt;iImage&gt;</a> <a class="code" href="structiGraphics2D.html#e513a9eb40766835c8f286a7c80f8ccb" title="Do a screenshot: return a new iImage object.">ScreenShot</a> () = 0;
<a name="l00361"></a>00361 
<a name="l00366"></a>00366   <span class="keyword">virtual</span> <a class="code" href="structiNativeWindow.html" title="This interface represents a native window.">iNativeWindow</a>* <a class="code" href="structiGraphics2D.html#2dcff33536b46a742cbeb22ee8aea07f" title="Get the native window corresponding with this canvas.">GetNativeWindow</a> () = 0;
<a name="l00367"></a>00367 
<a name="l00369"></a>00369   <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="structiGraphics2D.html#3c2411ae31cabeb4721fa4d8b24a4017" title="Returns &amp;#39;true&amp;#39; if the program is being run full-screen.">GetFullScreen</a> () = 0;
<a name="l00370"></a>00370 
<a name="l00374"></a>00374   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiGraphics2D.html#03febf8d32180894b096d21646797a77" title="Change the fullscreen state of the canvas.">SetFullScreen</a> (<span class="keywordtype">bool</span> b) = 0;
<a name="l00375"></a>00375 
<a name="l00377"></a>00377   <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="structiGraphics2D.html#1a5e95fd5b2ceabb2d60a1446c3e471b" title="Set mouse position (relative to top-left of CS window).">SetMousePosition</a> (<span class="keywordtype">int</span> x, <span class="keywordtype">int</span> y) = 0;
<a name="l00378"></a>00378 
<a name="l00387"></a>00387   <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="structiGraphics2D.html#5737a954061ed0ec3da31315b66adedf" title="Set mouse cursor to one of predefined shape classes (see csmcXXX enum above).">SetMouseCursor</a> (<a class="code" href="group__gfx2d.html#g80b85f64d5f129faf7a2cd4c2825147e" title="Standard mouse cursor IDs.">csMouseCursorID</a> iShape) = 0;
<a name="l00388"></a>00388 
<a name="l00396"></a>00396   <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="structiGraphics2D.html#5737a954061ed0ec3da31315b66adedf" title="Set mouse cursor to one of predefined shape classes (see csmcXXX enum above).">SetMouseCursor</a> (<a class="code" href="structiImage.html" title="The iImage interface is used to work with image objects.">iImage</a> *image, <span class="keyword">const</span> <a class="code" href="structcsRGBcolor.html" title="An RGB color.">csRGBcolor</a>* keycolor = 0, 
<a name="l00397"></a>00397                                <span class="keywordtype">int</span> hotspot_x = 0, <span class="keywordtype">int</span> hotspot_y = 0,
<a name="l00398"></a>00398                                <a class="code" href="structcsRGBcolor.html" title="An RGB color.">csRGBcolor</a> fg = <a class="code" href="structcsRGBcolor.html" title="An RGB color.">csRGBcolor</a>(255,255,255),
<a name="l00399"></a>00399                                <a class="code" href="structcsRGBcolor.html" title="An RGB color.">csRGBcolor</a> bg = <a class="code" href="structcsRGBcolor.html" title="An RGB color.">csRGBcolor</a>(0,0,0)) = 0;
<a name="l00400"></a>00400 
<a name="l00406"></a>00406   <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="structiGraphics2D.html#05f159c380f21217eb09bbfe69b9e516" title="Set gamma value (if supported by canvas).">SetGamma</a> (<span class="keywordtype">float</span> gamma) = 0;
<a name="l00407"></a>00407 
<a name="l00411"></a>00411   <span class="keyword">virtual</span> <span class="keywordtype">float</span> <a class="code" href="structiGraphics2D.html#f6e94f5e9c6a321eadddaff7842ade83" title="Get gamma value.">GetGamma</a> () <span class="keyword">const</span> = 0;
<a name="l00412"></a>00412 
<a name="l00416"></a>00416   <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="structiGraphics2D.html#adcd35bd3fa0371b088252a55eff9ac0" title="Get the name of the canvas.">GetName</a> () <span class="keyword">const</span> = 0;
<a name="l00417"></a>00417 
<a name="l00426"></a>00426   <span class="keyword">virtual</span> <a class="code" href="classcsPtr.html" title="A pointer encapsulator.">csPtr&lt;iGraphics2D&gt;</a> <a class="code" href="structiGraphics2D.html#a3446546f71865b831d3f93f82bc73f9" title="Create an off-screen canvas so you can render on a given memory area.">CreateOffscreenCanvas</a> (
<a name="l00427"></a>00427         <span class="keywordtype">void</span>* memory, <span class="keywordtype">int</span> width, <span class="keywordtype">int</span> height, <span class="keywordtype">int</span> depth,
<a name="l00428"></a>00428         <a class="code" href="structiOffscreenCanvasCallback.html" title="When you create an offscreen canvas (CreateOffscreenCanvas()) then you can use this...">iOffscreenCanvasCallback</a>* ofscb) = 0;
<a name="l00429"></a>00429 
<a name="l00437"></a>00437   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiGraphics2D.html#7d50f77432f14ba009fac56f673c0023" title="Write a text string into the back buffer.">Write</a> (<a class="code" href="structiFont.html" title="A font object.">iFont</a> *font, <span class="keywordtype">int</span> x, <span class="keywordtype">int</span> y, <span class="keywordtype">int</span> fg, <span class="keywordtype">int</span> bg,
<a name="l00438"></a>00438     <span class="keyword">const</span> <span class="keywordtype">wchar_t</span>* str, <a class="code" href="group__util.html#g91ad9478d81a7aaf2593e8d9c3d06a14" title="Shortcut for default unsigned int.">uint</a> flags = 0) = 0;
<a name="l00439"></a>00439 
<a name="l00440"></a>00440 };
<a name="l00441"></a>00441 
<a name="l00444"></a>00444 <span class="preprocessor">#endif // __CS_IVIDEO_GRAPH2D_H__</span>
<a name="l00445"></a>00445 <span class="preprocessor"></span>
</pre></div><hr size="1"><address><small>Generated for Crystal Space 1.2.1 by 
<a href="http://www.doxygen.org/index.html">doxygen</a> 1.5.3 
</small></address> </div></body> </html>