1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<HTML>
3<HEAD>
4<META http-equiv="Content-Type" content="text/html; charset=windows-1252">
5<META name="GENERATOR" content="Microsoft FrontPage 5.0">
6<META http-equiv="Content-Style-Type" content="text/css">
7<LINK rel="stylesheet" type="text/css" href="../../CSS/revolution.css">
8<TITLE>GXSetScissorBoxOffset</TITLE>
9</HEAD>
10<BODY>
11<H1 align="left">GXSetScissorBoxOffset</H1>
12<H2>C Specification</H2>
13<DL>
14  <DD>
15  <PRE><CODE>#include &lt;revolution/gx.h&gt;</CODE></PRE>
16  <DD>
17  <PRE><CODE>void GXSetScissorBoxOffset(
18    s32 xoffset,
19    s32 yoffset );</CODE></PRE>
20</DL>
21<H2>Arguments</H2>
22<TABLE border="1" cellpadding="3" cellspacing="0.1">
23  <TBODY>
24    <TR>
25<TD width="120" bgcolor="#ffffe8"><EM><STRONG><CODE>xoffset</FONT></STRONG></EM></TD>
26<TD width="520">Number of pixels to shift the scissor box to the left. Must be an even number.</TD>
27    </TR>
28    <TR>
29<TD width="120" bgcolor="#ffffe8"><EM><STRONG><CODE>yoffset</FONT></STRONG></EM></TD>
30<TD width="520">Number of pixels to shift the scissor box up. Must be an even number.</TD>
31    </TR>
32  </TBODY>
33</TABLE>
34<H2>Return Values</H2>
35<P>None.</P>
36<H2>Description</H2>
37<P>The scissor box may be repositioned within the EFB memory space using this command.&nbsp;The offsets are subtracted from the screen coordinates to determine the actual EFB coordinates where the pixels are stored.&nbsp;Thus with positive offsets, the scissor box may be shifted left and/or up; and with negative offsets, the scissor box may be shifted right and/or down.</P>
38<P>The intended use for this command is to make it easy to do two-pass anti-aliased rendering.&nbsp;To draw the top half of the screen, the scissor box is set to the top and the offset is set to zero.&nbsp;To draw the bottom half, the scissor box is set to the bottom, and the offset is set to shift the scissor box back up to the top.&nbsp;For example code, refer to <a href="../sampledemos/Framebuffer/frb-aa-full.html"><code>frb-aa-full</code></a>.</P>
39<P>Another use for the offset is to displace how an image is rendered with respect to the dither matrix.&nbsp;Since the dither matrix is 4x4, a <code><strong><em>yoffset</em></strong></code> of &ndash;2 shifts the image down by two lines with respect to the matrix.&nbsp;This can be useful for field-rendering mode.&nbsp;(Achieving an offset of an odd number of lines is possible, but more difficult than just changing the scissor box: you must render and copy two additional lines, then skip one by adjusting the argument of <a href="../../vi/VISetNextFrameBuffer.html"><code>VISetNextFrameBuffer</code></a>.)</P>
40<P><a href="../Management/GXInit.html"><code>GXInit</code></a> initializes the scissor box offset to zero.&nbsp;Since the GP works on 2x2 regions of pixels, only even offsets are allowed.</P>
41<H2>See Also</H2>
42<P><A href="GXSetScissor.html"><CODE>GXSetScissor</CODE></A></P>
43<H2>Revision History</H2>
44<P>2006/03/01 Initial version.</P>
45<hr>
46<P>CONFIDENTIAL</p>
47</BODY>
48</HTML>
49