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="IBM WebSphere Studio Homepage Builder Version 7.0.0.0 for Windows">
7<META http-equiv="Content-Style-Type" content="text/css">
8<title>G2_SetBG3Affine</title>
9<LINK rel="stylesheet" href="../../css/nitro.css" type="text/css">
10</head>
11
12<body>
13
14<h1 align="left">G2_SetBG3Affine <img src="../../image/NTR.gif"align="middle"><img src="../../image/TWL.gif" align="middle"></H1>
15<H2>Syntax</H2>
16
17<dl>
18  <dd>
19  <PRE><CODE>#include &lt;nitro/gx/g2.h&gt;
20
21void G2_SetBG3Affine(
22    const MtxFx22 * mtx,
23    int centerX,
24    int centerY,
25    int x1,
26    int y1
27);</CODE></PRE>
28  </dd>
29</dl><h2>Arguments</h2>
30
31<table border="1" width="100%">
32
33    <tr>
34<td width="13%"><SPAN class="argument">mtx</SPAN></td>
35<td width="87%">Pointer to the conversion matrix</td>
36  </tr>
37    <TR>
38<TD><SPAN class="argument">centerX</SPAN></TD>
39<TD>X-component of the coordinates of the center of rotation</TD>
40    </TR>
41    <TR>
42<TD><SPAN class="argument">centerY</SPAN></TD>
43<TD>Y-component of the coordinates of the center of rotation</TD>
44    </TR>
45    <TR>
46<TD><SPAN class="argument">x1</SPAN></TD>
47<TD>X-component of coordinate before rotation (horizontal offset)</TD>
48    </TR>
49    <TR>
50<TD><SPAN class="argument">y1</SPAN></TD>
51<TD>Y-component of coordinate before rotation (vertical offset)</TD>
52    </TR>
53  </table>
54<h2>Return Values</h2>
55<p>None.</p>
56<H2>Description</H2>
57<P>Sets the BG3 affine transformation.</P>
58<P>Use the formula below to find the rotation and scaling centered on the points on the screen (center x and center y).</P>
59<P><IMG width="297" height="48" src="bg_affine_formula_1.gif" v:shapes="_x0000_i1025"></P>
60<P>Translation specifies in pixels the offset (x1, y1) of the BG screen with the display screen.</P>
61<BLOCKQUOTE style="background-color:#ffffcc">
62<CODE>
63<PRE>
64<B>Example:</B>
65Rotate/scale BG3 screen centered on a point (center x, center y) using the conversion matrix mtx and
66translate dx to the x-axis direction and dy to the y-axis direction.
67<dl>
68G2_SetBG3Affine(
69    mtx,
70    centerX, centerY,
71    dx, dy );
72</CODE></dl><PRE></BLOCKQUOTE>
73<h2>See Also</h2>
74<P><A href="G2_SetBG2Affine.html"><CODE>G2_SetBG2Affine</CODE></A></P>
75<H2>Revision History</H2>
76<P>2009/07/10 Revised explanation of affine conversion and added an example.<BR>
772004/01/19 Initial version.</P>
78<hr><p>CONFIDENTIAL</p></body>
79</html>
80