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
17<h2>C Specification</h2>
18
19<dl>
20  <dd><PRE><CODE>#include &lt;revolution/gx.h&gt;</CODE></PRE>
21  </dd>
22  <dd><pre><CODE>void GXAdjustForOverscan(
23    const <A href="../Structures/GXRenderModeObj.html">GXRenderModeObj</A>*<em>  rmin</em>,
24    <A href="../Structures/GXRenderModeObj.html">GXRenderModeObj</A>*<em>        rmout</em>,
25    u16                     <em>hor</em>,
26    u16                     <em>ver</em> );</CODE></pre>
27  </dd>
28</dl>
29
30<h2>Arguments</h2>
31<TABLE border="1" cellpadding="3" cellspacing="0.1">
32  <tr>
33<TD width="120" bgcolor="#ffffe8"><em><strong><CODE>rmin</CODE></strong></em></TD>
34<TD width="520">A pointer to the copy source <A href="../Structures/GXRenderModeObj.html"><CODE>GXRenderModeObj</CODE></A>.</TD>
35    </tr>
36  <tr>
37<TD width="120" bgcolor="#ffffe8"><em><strong><CODE>rmout</CODE></strong></em></TD>
38<TD width="520">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 <STRONG><EM><CODE>rmin</CODE></EM></STRONG>.</TD>
39    </tr>
40  <tr>
41<TD width="120" bgcolor="#ffffe8"><em><strong><CODE>hor</CODE></strong></em></TD>
42      <TD width="520">
43The number of pixels to be deleted from each side of the screen.</TD>
44    </tr>
45  <tr>
46<TD width="120" bgcolor="#ffffe8"><em><strong><CODE>ver</font></strong></em></TD>
47<TD width="520">The number of pixels to be deleted from the top and bottom of the screen (each).</TD>
48    </tr>
49</TABLE>
50<h2>Return Values</h2>
51
52<p>None.</p>
53<H2>Description</H2>
54<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.&nbsp;The number of pixels specified by <em><strong><CODE>hor</code></strong></em> is subtracted
55from each side of the screen, and the number of pixels specified by <em><strong><CODE>ver</code></strong></em> is subtracted from both the top and the bottom of the screen.&nbsp;The active screen area is centered within what the <a href="RenderMode.html">render mode</a> specified before the adjustment.</P><P>The following algorithm is used to adjust the EFB and XFB heights:</P>
56<P><CODE>&nbsp;&nbsp;&nbsp; output EFB height = input EFB height - <code><em><strong>ver</strong></em></code> * 2 * input EFB height / input XFB height</CODE></P>
57<P><CODE>&nbsp;&nbsp;&nbsp; if (input xFBmode == VI_XFBMODE_SF &amp;&amp; input viTVmode is not progressive scan)<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; output XFB height = input XFB height - <code><em><strong>ver</strong></em></code><br> &nbsp;&nbsp;&nbsp; else<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ouptut XFB height = input XFB height - <code><em><strong>ver</strong></em></code> * 2</CODE></P>
58<P>Due to the wide possibilities of how a render mode may be configured, this function may not work in all cases.&nbsp;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 <code>GXAdjustForOverscan</code> and then fix up the results).</P>
59
60
61
62
63<h2>See Also</h2>
64<P><A href="../Framebuffer/RenderMode.html">Render Modes</A></P>
65<H2>Revision History</H2>
66<P>2006/03/01 Initial version.</P><hr>
67<P>CONFIDENTIAL</p>
68</BODY>
69</HTML>