1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2<html> 3 4<head> 5<META http-equiv="Content-Type" content="text/html; charset=windows-1252"> 6<META name="GENERATOR" content="Microsoft FrontPage 5.0"> 7<META http-equiv="Content-Style-Type" content="text/css"> 8<LINK rel="stylesheet" type="text/css" href="../../CSS/revolution.css"> 9<title>GXAdjustForOverscan</title> 10</head> 11 12<body> 13 14<h1 align="left">GXAdjustForOverscan</h1> 15 16<h2>Syntax</h2> 17<dl><dd><pre class="construction"> 18#include <revolution/gx.h> 19 20void GXAdjustForOverscan( 21 const <A href="../Structures/GXRenderModeObj.html">GXRenderModeObj</A>* rmin, 22 <A href="../Structures/GXRenderModeObj.html">GXRenderModeObj</A>* rmout, 23 u16 hor, 24 u16 ver ); 25</pre></dd></dl> 26 27<h2>Arguments</h2> 28<TABLE class="arguments" border="1" > 29 <tr> 30<TH>rmin</TH> 31<TD>A pointer to the copy source <A href="../Structures/GXRenderModeObj.html"><CODE>GXRenderModeObj</CODE></A>.</TD> 32 </tr> 33 <tr> 34<TH>rmout</TH> 35<TD>A pointer to the <A href="../Structures/GXRenderModeObj.html"><CODE>GXRenderModeObj</CODE></A> that will contain the adjusted version. This needs to be allocated in advance, but it does not need to be initialized. This may be the same object as <SPAN class="argument">rmin</SPAN>.</TD> 36 </tr> 37 <tr> 38<TH>hor</TH> 39<TD>The number of pixels to be deleted from each side of the screen.</TD> 40 </tr> 41 <tr> 42<TH>ver</TH> 43<TD>The number of pixels to be deleted from the top and bottom of the screen (each).</TD> 44 </tr> 45</TABLE> 46 47<h2>Return Values</h2> 48<p>None.</p> 49 50<H2>Description</H2> 51<P>This function takes a given <A href="RenderMode.html">render mode</A> and returns a version that is reduced in size to account for overscan. The number of pixels specified by <SPAN class="argument">hor</SPAN> is subtracted from each side of the screen, and the number of pixels specified by <SPAN class="argument">ver</SPAN> is subtracted from both the top and the bottom of the screen. The active screen area is centered within what the <A href="RenderMode.html">render mode</A> specified before the adjustment.</P> 52<P>The following algorithm is used to adjust the EFB and XFB heights:</P> 53<P> 54<CODE> output EFB height = input EFB height - </CODE><SPAN class="argument">ver</SPAN><CODE> * 2 * input EFB height / input XFB height</CODE> 55</P> 56<P> 57<CODE> if (input xFBmode == VI_XFBMODE_SF && input viTVmode is not progressive scan)</CODE><BR> <CODE> output XFB height = input XFB height - </CODE><SPAN class="argument">ver</SPAN><BR> <CODE> else</CODE><BR> <CODE> ouptut XFB height = input XFB height - </CODE><SPAN class="argument">ver</SPAN><CODE> * 2</CODE> 58</P> 59<P>Due to the wide possibilities of how a render mode may be configured, this function may not work in all cases. For instance, if you use Y-scaling to create a size difference between the EFB and XFB, this function may not do the right thing. In such cases, you should configure the desired render mode manually (or else call the <CODE>GXAdjustForOverscan</CODE> function and then adjust the results).</P> 60 61<h2>See Also</h2> 62<P class="reference"> 63<A href="../Framebuffer/RenderMode.html">Render Modes</A> 64</P> 65 66<H2>Revision History</H2> 67<P> 682006/03/01 Initial version.<br> 69</P> 70 71<hr><p>CONFIDENTIAL</p></body> 72</html>