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 13<H2>Syntax</H2> 14<dl><dd><pre class="construction"> 15#include <revolution/gx.h> 16 17void GXSetScissorBoxOffset( 18 s32 xoffset, 19 s32 yoffset ); 20</pre></dd></dl> 21 22<H2>Arguments</H2> 23<TABLE class="arguments" border="1" > 24 <TBODY> 25 <TR> 26<TH>xoffset</TH> 27<TD>Number of pixels to shift the scissor box to the left. Must be an even number.</TD> 28 </TR> 29 <TR> 30<TH>yoffset</TH> 31<TD>Number of pixels to shift the scissor box up. Must be an even number.</TD> 32 </TR> 33 </TBODY> 34</TABLE> 35 36<H2>Return Values</H2> 37<P>None.</P> 38 39<H2>Description</H2> 40<P>The scissor box may be repositioned within the EFB memory space using this command. The offsets are subtracted from the screen coordinates to determine the actual EFB coordinates where the pixels are stored. 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> 41<P>The intended use for this command is to make it easy to do two-pass anti-aliased rendering. To draw the top half of the screen, the scissor box is set to the top and the offset is set to zero. 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. For sample code, refer to <A href="../sampledemos/Framebuffer/frb-aa-full.html"><CODE>frb-aa-full</CODE></A>.</P> 42<P>Another use for the offset is to displace how an image is rendered with respect to the dither matrix. Since the dither matrix is 4x4, a <SPAN class="argument">yoffset</SPAN> of 2 shifts the image down by two lines with respect to the matrix. This can be useful for field-rendering mode. (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> 43<P>The <A href="../Management/GXInit.html"><CODE>GXInit</CODE></A> function initializes the scissor box offset to zero. Since the GP works on 2x2 regions of pixels, only even offsets are allowed.</P> 44 45<H2>See Also</H2> 46<P class="reference"> 47<A href="GXSetScissor.html">GXSetScissor</A> 48</P> 49 50<H2>Revision History</H2> 51<P> 522006/03/01 Initial version.<br> 53</P> 54 55<hr><p>CONFIDENTIAL</p></body> 56</HTML>