mirror of
https://github.com/openmv/openmv.git
synced 2025-11-04 14:49:50 +08:00
60 lines
19 KiB
HTML
60 lines
19 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
|
|
|
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Basic Types</title><link rel="stylesheet" type="text/css" href="../../styles/main.css"><script language=JavaScript src="../../javascript/main.js"></script><script language=JavaScript src="../../javascript/prettify.js"></script><script language=JavaScript src="../../javascript/searchdata.js"></script></head><body class="ContentPage" onLoad="NDOnLoad();prettyPrint();"><script language=JavaScript><!--
|
|
if (browserType) {document.write("<div class=" + browserType + ">");if (browserVer) {document.write("<div class=" + browserVer + ">"); }}// --></script>
|
|
|
|
<!-- Generated by Natural Docs, version 1.52 -->
|
|
<!-- http://www.naturaldocs.org -->
|
|
|
|
<!-- saved from url=(0026)http://www.naturaldocs.org -->
|
|
|
|
|
|
|
|
|
|
<div id=Content><div class="CSection"><div class=CTopic id=MainTopic><h1 class=CTitle><a name="Basic_Types"></a>Basic Types</h1><div class=CBody><p>Note that several types represent fixedpoint numbers. The C compiler cannot directly create these from constants. Therefore if you want to pass an integer value of 42 to a function that expects an argument of e.g. type <a href="#d2_point" class=LType id=link1 onMouseOver="ShowTip(event, 'tt1', 'link1')" onMouseOut="HideTip('tt1')">d2_point</a> you would have to write :</p><blockquote><pre>function( 42 << 4 ); // conversion from integer to fixedpoint</pre></blockquote><p>see also <a href="dave_math-h.html#D2_FIX4(x)" class=LFunction id=link2 onMouseOver="ShowTip(event, 'tt2', 'link2')" onMouseOut="HideTip('tt2')">D2_FIX4(x)</a></p><!--START_ND_SUMMARY--><div class=Summary><div class=STitle>Summary</div><div class=SBorder><table border=0 cellspacing=0 cellpadding=0 class=STable><tr class="SMain"><td class=SEntry><a href="#Basic_Types" >Basic Types</a></td><td class=SDescription>Note that several types represent fixedpoint numbers. </td></tr><tr class="SGroup SIndent1"><td class=SEntry><a href="#Types" >Types</a></td><td class=SDescription></td></tr><tr class="SType SIndent2 SMarked"><td class=SEntry><a href="#d2_device" >d2_device</a></td><td class=SDescription>void</td></tr><tr class="SType SIndent2"><td class=SEntry><a href="#d2_context" >d2_context</a></td><td class=SDescription>void</td></tr><tr class="SType SIndent2 SMarked"><td class=SEntry><a href="#d2_renderbuffer" >d2_renderbuffer</a></td><td class=SDescription>void</td></tr><tr class="SType SIndent2"><td class=SEntry><a href="#d2_color" >d2_color</a></td><td class=SDescription>unsigned long</td></tr><tr class="SType SIndent2 SMarked"><td class=SEntry><a href="#d2_alpha" >d2_alpha</a></td><td class=SDescription>unsigned char</td></tr><tr class="SType SIndent2"><td class=SEntry><a href="#d2_width" >d2_width</a></td><td class=SDescription>short (<b>fixedpoint</b>)</td></tr><tr class="SType SIndent2 SMarked"><td class=SEntry><a href="#d2_point" >d2_point</a></td><td class=SDescription>short (<b>fixedpoint</b>)</td></tr><tr class="SType SIndent2"><td class=SEntry><a href="#d2_border" >d2_border</a></td><td class=SDescription>short</td></tr><tr class="SType SIndent2 SMarked"><td class=SEntry><a href="#d2_pattern" >d2_pattern</a></td><td class=SDescription>unsigned long</td></tr><tr class="SType SIndent2"><td class=SEntry><a href="#d2_blitpos" >d2_blitpos</a></td><td class=SDescription>unsigned short</td></tr></table></div></div><!--END_ND_SUMMARY--></div></div></div>
|
|
|
|
<div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="Types"></a>Types</h3></div></div>
|
|
|
|
<div class="CType"><div class=CTopic><h3 class=CTitle><a name="d2_device"></a>d2_device</h3><div class=CBody><p>void</p><p>Abstract type. The application uses pointers of this type to hold the address of a device structure without knowing its internal layout.</p><p>see for example : <a href="../code/dave_driver-c.html#d2_opendevice" class=LFunction id=link3 onMouseOver="ShowTip(event, 'tt3', 'link3')" onMouseOut="HideTip('tt3')">d2_opendevice</a></p></div></div></div>
|
|
|
|
<div class="CType"><div class=CTopic><h3 class=CTitle><a name="d2_context"></a>d2_context</h3><div class=CBody><p>void</p><p>Abstract type. The application uses pointers of this type to hold the address of a context structure without knowing its internal layout.</p><p>see for example : <a href="../code/dave_context-c.html#d2_newcontext" class=LFunction id=link4 onMouseOver="ShowTip(event, 'tt4', 'link4')" onMouseOut="HideTip('tt4')">d2_newcontext</a></p></div></div></div>
|
|
|
|
<div class="CType"><div class=CTopic><h3 class=CTitle><a name="d2_renderbuffer"></a>d2_renderbuffer</h3><div class=CBody><p>void</p><p>Abstract type. The application uses pointers of this type to hold the address of a renderbuffer structure without knowing its internal layout.</p><p>see for example : <a href="../code/dave_rbuffer-c.html#d2_newrenderbuffer" class=LFunction id=link5 onMouseOver="ShowTip(event, 'tt5', 'link5')" onMouseOut="HideTip('tt5')">d2_newrenderbuffer</a></p></div></div></div>
|
|
|
|
<div class="CType"><div class=CTopic><h3 class=CTitle><a name="d2_color"></a>d2_color</h3><div class=CBody><p>unsigned long</p><p>32bit RGB value. Upper 8bits are ignored but should be set to zero. All colors are passed to the driver in this format regardless of the framebuffer format.</p><p>see for example : <a href="../code/dave_context-c.html#d2_setcolor" class=LFunction id=link6 onMouseOver="ShowTip(event, 'tt6', 'link6')" onMouseOut="HideTip('tt6')">d2_setcolor</a></p></div></div></div>
|
|
|
|
<div class="CType"><div class=CTopic><h3 class=CTitle><a name="d2_alpha"></a>d2_alpha</h3><div class=CBody><p>unsigned char</p><p>Alpha information is passed as 8bit values. 255 representing fully opaque and 0 totally transparent colors.</p><p>see for example : <a href="../code/dave_context-c.html#d2_setalpha" class=LFunction id=link7 onMouseOver="ShowTip(event, 'tt7', 'link7')" onMouseOut="HideTip('tt7')">d2_setalpha</a></p></div></div></div>
|
|
|
|
<div class="CType"><div class=CTopic><h3 class=CTitle><a name="d2_width"></a>d2_width</h3><div class=CBody><p>short (<b>fixedpoint</b>)</p><p>Width is defined as an unsigned 10:4 fixedpoint number (4 bits fraction). So the maximum width is 1023 and the smallest nonzero width is 1/16.</p></div></div></div>
|
|
|
|
<div class="CType"><div class=CTopic><h3 class=CTitle><a name="d2_point"></a>d2_point</h3><div class=CBody><p>short (<b>fixedpoint</b>)</p><p>Point defines a vertex component (e.g. the x coordinate of an endpoint) pixel position and is specified as a signed 1:11:4 fixedpoint number (1bit sign, 11 bits integer, 4 bits fraction). So the integer range is 2047 to -2048 and the smallest positive value is 1/16.</p><p>Points are stored as 16bit quantities because they represent direct screen coordinates and therefor do not become larger than 2047 even for HDTV resolutions.</p><p>see for example : <a href="../code/dave_render-c.html#d2_renderline" class=LFunction id=link8 onMouseOver="ShowTip(event, 'tt8', 'link8')" onMouseOut="HideTip('tt8')">d2_renderline</a></p></div></div></div>
|
|
|
|
<div class="CType"><div class=CTopic><h3 class=CTitle><a name="d2_border"></a>d2_border</h3><div class=CBody><p>short</p><p>The border type is used only when setting clip borders. In contrast to points, borders do not contain any fractional information (no subpixel clipping) and are simple 11bit signed integers.</p><p>see for example : <a href="../code/dave_viewport-c.html#d2_cliprect" class=LFunction id=link9 onMouseOver="ShowTip(event, 'tt9', 'link9')" onMouseOut="HideTip('tt9')">d2_cliprect</a></p></div></div></div>
|
|
|
|
<div class="CType"><div class=CTopic><h3 class=CTitle><a name="d2_pattern"></a>d2_pattern</h3><div class=CBody><p>unsigned long</p><p>Patterns are Nbit bitmasks (N is 32 at most so they are passed as longs)</p><p>see for example : <a href="../code/dave_context-c.html#d2_setpattern" class=LFunction id=link10 onMouseOver="ShowTip(event, 'tt10', 'link10')" onMouseOut="HideTip('tt10')">d2_setpattern</a></p></div></div></div>
|
|
|
|
<div class="CType"><div class=CTopic><h3 class=CTitle><a name="d2_blitpos"></a>d2_blitpos</h3><div class=CBody><p>unsigned short</p><p>Blitpos defines an integer position in the source bitmap of a blit rendering operation. The allowed range is 0 to 1023.</p></div></div></div>
|
|
|
|
</div><!--Content-->
|
|
|
|
|
|
<div id=Footer>© 2016 by TES Electronic Solutions · <a href="http://www.naturaldocs.org">Generated by Natural Docs</a></div><!--Footer-->
|
|
|
|
|
|
<div id=Menu><div class=MEntry><div class=MFile><a href="../doc/overview-txt.html">Driver Overview</a></div></div><div class=MEntry><div class=MFile><a href="../doc/limitations-txt.html">Limitations</a></div></div><div class=MEntry><div class=MFile id=MSelected>Basic Types</div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent1')">API</a><div class=MGroupContent id=MGroupContent1><div class=MEntry><div class=MFile><a href="../code/dave_driver-c.html">Basic Functions</a></div></div><div class=MEntry><div class=MFile><a href="../code/dave_viewport-c.html">Viewport Functions</a></div></div><div class=MEntry><div class=MFile><a href="../code/dave_context-c.html">Context Functions</a></div></div><div class=MEntry><div class=MFile><a href="../code/dave_texture-c.html">Texture Functions</a></div></div><div class=MEntry><div class=MFile><a href="../code/dave_render-c.html">Rendering Functions</a></div></div><div class=MEntry><div class=MFile><a href="../code/dave_blit-c.html">Blit Functions</a></div></div><div class=MEntry><div class=MFile><a href="../code/dave_rbuffer-c.html">Render Buffers</a></div></div><div class=MEntry><div class=MFile><a href="../code/dave_perfcount-c.html">Profiling</a></div></div><div class=MEntry><div class=MFile><a href="../code/dave_utility-c.html">Utility Functions</a></div></div><div class=MEntry><div class=MFile><a href="../code/dave_64bitoperation-c.html">Functions for 64bit operations</a></div></div><div class=MEntry><div class=MFile><a href="../code/dave_dlist-c.html">Dlist Functions</a></div></div><div class=MEntry><div class=MFile><a href="dave_math-h.html">Math Functions</a></div></div><div class=MEntry><div class=MFile><a href="dave_errorcodes-h.html">Errorcodes</a></div></div></div></div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent2')">Index</a><div class=MGroupContent id=MGroupContent2><div class=MEntry><div class=MIndex><a href="../../index/General.html">Everything</a></div></div><div class=MEntry><div class=MIndex><a href="../../index/Functions.html">Functions</a></div></div><div class=MEntry><div class=MIndex><a href="../../index/Types.html">Types</a></div></div></div></div></div><script type="text/javascript"><!--
|
|
var searchPanel = new SearchPanel("searchPanel", "HTML", "../../search");
|
|
--></script><div id=MSearchPanel class=MSearchPanelInactive><input type=text id=MSearchField value=Search onFocus="searchPanel.OnSearchFieldFocus(true)" onBlur="searchPanel.OnSearchFieldFocus(false)" onKeyUp="searchPanel.OnSearchFieldChange()"><select id=MSearchType onFocus="searchPanel.OnSearchTypeFocus(true)" onBlur="searchPanel.OnSearchTypeFocus(false)" onChange="searchPanel.OnSearchTypeChange()"><option id=MSearchEverything selected value="General">Everything</option><option value="Functions">Functions</option><option value="Types">Types</option></select></div></div><!--Menu-->
|
|
|
|
|
|
|
|
<!--START_ND_TOOLTIPS-->
|
|
<div class=CToolTip id="tt1"><div class=CType>short (<b>fixedpoint</b>)</div></div><div class=CToolTip id="tt2"><div class=CFunction>Integer to n:4 fixedpoint conversion</div></div><div class=CToolTip id="tt3"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>d2_device * d2_opendevice(</td><td class="PType prettyprint " nowrap>d2_u32 </td><td class="PParameter prettyprint " nowrap>flags</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Create a new device handle.</div></div><div class=CToolTip id="tt4"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>d2_context * d2_newcontext(</td><td class="PType prettyprint " nowrap>d2_device </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>handle</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Create new context (used to store render settings).</div></div><div class=CToolTip id="tt5"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>d2_renderbuffer * d2_newrenderbuffer(</td><td class="PType prettyprint " nowrap>d2_device </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>handle,</td></tr><tr><td></td><td class="PType prettyprint " nowrap>d2_u32 </td><td class="PParameterPrefix prettyprint " nowrap></td><td class="PParameter prettyprint " nowrap>initialsize,</td></tr><tr><td></td><td class="PType prettyprint " nowrap>d2_u32 </td><td class="PParameterPrefix prettyprint " nowrap></td><td class="PParameter prettyprint " nowrap>stepsize</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Create a new renderbuffer.</div></div><div class=CToolTip id="tt6"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>d2_s32 d2_setcolor(</td><td class="PType prettyprint " nowrap>d2_device </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>handle,</td></tr><tr><td></td><td class="PType prettyprint " nowrap>d2_s32 </td><td class="PParameterPrefix prettyprint " nowrap></td><td class="PParameter prettyprint " nowrap>index,</td></tr><tr><td></td><td class="PType prettyprint " nowrap>d2_color </td><td class="PParameterPrefix prettyprint " nowrap></td><td class="PParameter prettyprint " nowrap>color</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Set color registers.</div></div><div class=CToolTip id="tt7"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>d2_s32 d2_setalpha(</td><td class="PType prettyprint " nowrap>d2_device </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>handle,</td></tr><tr><td></td><td class="PType prettyprint " nowrap>d2_alpha </td><td class="PParameterPrefix prettyprint " nowrap></td><td class="PParameter prettyprint " nowrap>alpha</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>set constant alpha value</div></div><div class=CToolTip id="tt8"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>d2_s32 d2_renderline(</td><td class="PType prettyprint " nowrap>d2_device </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>handle,</td></tr><tr><td></td><td class="PType prettyprint " nowrap>d2_point </td><td class="PParameterPrefix prettyprint " nowrap></td><td class="PParameter prettyprint " nowrap>x1,</td></tr><tr><td></td><td class="PType prettyprint " nowrap>d2_point </td><td class="PParameterPrefix prettyprint " nowrap></td><td class="PParameter prettyprint " nowrap>y1,</td></tr><tr><td></td><td class="PType prettyprint " nowrap>d2_point </td><td class="PParameterPrefix prettyprint " nowrap></td><td class="PParameter prettyprint " nowrap>x2,</td></tr><tr><td></td><td class="PType prettyprint " nowrap>d2_point </td><td class="PParameterPrefix prettyprint " nowrap></td><td class="PParameter prettyprint " nowrap>y2,</td></tr><tr><td></td><td class="PType prettyprint " nowrap>d2_width </td><td class="PParameterPrefix prettyprint " nowrap></td><td class="PParameter prettyprint " nowrap>w,</td></tr><tr><td></td><td class="PType prettyprint " nowrap>d2_u32 </td><td class="PParameterPrefix prettyprint " nowrap></td><td class="PParameter prettyprint " nowrap>flags</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Render a wide line.</div></div><div class=CToolTip id="tt9"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>d2_s32 d2_cliprect(</td><td class="PType prettyprint " nowrap>d2_device </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>handle,</td></tr><tr><td></td><td class="PType prettyprint " nowrap>d2_border </td><td class="PParameterPrefix prettyprint " nowrap></td><td class="PParameter prettyprint " nowrap>xmin,</td></tr><tr><td></td><td class="PType prettyprint " nowrap>d2_border </td><td class="PParameterPrefix prettyprint " nowrap></td><td class="PParameter prettyprint " nowrap>ymin,</td></tr><tr><td></td><td class="PType prettyprint " nowrap>d2_border </td><td class="PParameterPrefix prettyprint " nowrap></td><td class="PParameter prettyprint " nowrap>xmax,</td></tr><tr><td></td><td class="PType prettyprint " nowrap>d2_border </td><td class="PParameterPrefix prettyprint " nowrap></td><td class="PParameter prettyprint " nowrap>ymax</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Specify the clipping rectangle.</div></div><div class=CToolTip id="tt10"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>d2_s32 d2_setpattern(</td><td class="PType prettyprint " nowrap>d2_device </td><td class="PParameterPrefix prettyprint " nowrap>*</td><td class="PParameter prettyprint " nowrap>handle,</td></tr><tr><td></td><td class="PType prettyprint " nowrap>d2_pattern </td><td class="PParameterPrefix prettyprint " nowrap></td><td class="PParameter prettyprint " nowrap>pattern</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Specify pattern bitmask.</div></div><!--END_ND_TOOLTIPS-->
|
|
|
|
|
|
|
|
|
|
<div id=MSearchResultsWindow><iframe src="" frameborder=0 name=MSearchResults id=MSearchResults></iframe><a href="javascript:searchPanel.CloseResultsWindow()" id=MSearchResultsWindowClose>Close</a></div>
|
|
|
|
|
|
<script language=JavaScript><!--
|
|
if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html> |