📄 right18-3.htm
字号:
</o:p>
</span></font></p>
</td>
</tr>
<tr>
<td width="192" valign="top" style="width:143.85pt;border-top:none;border-left:
none;border-bottom:solid windowtext .5pt;border-right:solid windowtext .5pt;
mso-border-top-alt:solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt">
<p class="MsoNormal"><span lang="EN-US" style="mso-bidi-font-size: 10.0pt"><font size="2">MM_LOENGLISH<o:p>
</o:p>
</font></span></p>
</td>
<td width="383" valign="top" style="width:287.55pt;border:none;border-bottom:
solid windowtext .5pt;mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:
solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt">
<p class="MsoNormal"><font size="2"><span style="mso-bidi-font-size: 10.0pt; font-family: 宋体; mso-ascii-font-family: Times New Roman; mso-hansi-font-family: Times New Roman">一个逻辑单位被映射成</span><span lang="EN-US" style="mso-bidi-font-size: 10.0pt">0.01</span><span style="mso-bidi-font-size: 10.0pt; font-family: 宋体; mso-ascii-font-family: Times New Roman; mso-hansi-font-family: Times New Roman">英寸,正</span><span lang="EN-US" style="mso-bidi-font-size: 10.0pt">X</span><span style="mso-bidi-font-size: 10.0pt; font-family: 宋体; mso-ascii-font-family: Times New Roman; mso-hansi-font-family: Times New Roman">向右,正</span><span lang="EN-US" style="mso-bidi-font-size: 10.0pt">Y</span><span style="mso-bidi-font-size: 10.0pt; font-family: 宋体; mso-ascii-font-family: Times New Roman; mso-hansi-font-family: Times New Roman">向上</span><span lang="EN-US" style="mso-bidi-font-size: 10.0pt"><o:p>
</o:p>
</span></font></p>
</td>
</tr>
<tr>
<td width="192" valign="top" style="width:143.85pt;border-top:none;border-left:
none;border-bottom:solid windowtext .5pt;border-right:solid windowtext .5pt;
mso-border-top-alt:solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt">
<p class="MsoNormal"><span lang="EN-US" style="mso-bidi-font-size: 10.0pt"><font size="2">MM_LOMETRIC<o:p>
</o:p>
</font></span></p>
</td>
<td width="383" valign="top" style="width:287.55pt;border:none;border-bottom:
solid windowtext .5pt;mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:
solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt">
<p class="MsoNormal"><font size="2"><span style="mso-bidi-font-size: 10.0pt; font-family: 宋体; mso-ascii-font-family: Times New Roman; mso-hansi-font-family: Times New Roman">一个逻辑单位被映射成</span><span lang="EN-US" style="mso-bidi-font-size: 10.0pt">0.1</span><span style="mso-bidi-font-size: 10.0pt; font-family: 宋体; mso-ascii-font-family: Times New Roman; mso-hansi-font-family: Times New Roman">毫米,正</span><span lang="EN-US" style="mso-bidi-font-size: 10.0pt">X</span><span style="mso-bidi-font-size: 10.0pt; font-family: 宋体; mso-ascii-font-family: Times New Roman; mso-hansi-font-family: Times New Roman">向右,正</span><span lang="EN-US" style="mso-bidi-font-size: 10.0pt">Y</span><span style="mso-bidi-font-size: 10.0pt; font-family: 宋体; mso-ascii-font-family: Times New Roman; mso-hansi-font-family: Times New Roman">向上</span><span lang="EN-US" style="mso-bidi-font-size: 10.0pt"><o:p>
</o:p>
</span></font></p>
</td>
</tr>
<tr>
<td width="192" valign="top" style="width:143.85pt;border-top:none;border-left:
none;border-bottom:solid windowtext .5pt;border-right:solid windowtext .5pt;
mso-border-top-alt:solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt">
<p class="MsoNormal"><span lang="EN-US" style="mso-bidi-font-size: 10.0pt"><font size="2">MM_TEXT<o:p>
</o:p>
</font></span></p>
</td>
<td width="383" valign="top" style="width:287.55pt;border:none;border-bottom:
solid windowtext .5pt;mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:
solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt">
<p class="MsoNormal"><font size="2"><span style="mso-bidi-font-size: 10.0pt; font-family: 宋体; mso-ascii-font-family: Times New Roman; mso-hansi-font-family: Times New Roman">一个逻辑单位被映射成一个设备像素,正</span><span lang="EN-US" style="mso-bidi-font-size: 10.0pt">X</span><span style="mso-bidi-font-size: 10.0pt; font-family: 宋体; mso-ascii-font-family: Times New Roman; mso-hansi-font-family: Times New Roman">向右,正</span><span lang="EN-US" style="mso-bidi-font-size: 10.0pt">Y</span><span style="mso-bidi-font-size: 10.0pt; font-family: 宋体; mso-ascii-font-family: Times New Roman; mso-hansi-font-family: Times New Roman">向下</span><span lang="EN-US" style="mso-bidi-font-size: 10.0pt"><o:p>
</o:p>
</span></font></p>
</td>
</tr>
<tr>
<td width="192" valign="top" style="width:143.85pt;border-top:none;border-left:
none;border-bottom:solid windowtext .5pt;border-right:solid windowtext .5pt;
mso-border-top-alt:solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt">
<p class="MsoNormal"><span lang="EN-US" style="mso-bidi-font-size: 10.0pt"><font size="2">MM_TWIPS
<o:p>
</o:p>
</font></span></p>
</td>
<td width="383" valign="top" style="width:287.55pt;border:none;border-bottom:
solid windowtext .5pt;mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:
solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt">
<p class="MsoNormal"><font size="2"><span style="mso-bidi-font-size: 10.0pt; font-family: 宋体; mso-ascii-font-family: Times New Roman; mso-hansi-font-family: Times New Roman">一个逻辑单位被映射成打印机点的二十分之一,正</span><span lang="EN-US" style="mso-bidi-font-size: 10.0pt">X</span><span style="mso-bidi-font-size: 10.0pt; font-family: 宋体; mso-ascii-font-family: Times New Roman; mso-hansi-font-family: Times New Roman">向右,正</span><span lang="EN-US" style="mso-bidi-font-size: 10.0pt">Y</span><span style="mso-bidi-font-size: 10.0pt; font-family: 宋体; mso-ascii-font-family: Times New Roman; mso-hansi-font-family: Times New Roman">向上</span><span lang="EN-US" style="mso-bidi-font-size: 10.0pt"><o:p>
</o:p>
</span></font></p>
</td>
</tr>
</table>
<p ALIGN="JUSTIFY"><font lang="ZH-CN" size="2">窗口是对应逻辑坐标系上程序员设定的一个区域,视口是对应于实际输出设备上程序员设定的一个区域。下面给出逻辑单位到设备单位的变换公式:</font></p>
<blockquote>
<blockquote>
<p ALIGN="JUSTIFY"><font size="2" color="#008000">X<font LANG="ZH-CN">比例因子</font> =
X<font LANG="ZH-CN">视口范围</font>/X<font LANG="ZH-CN">窗口范围</font></font></p>
<p ALIGN="JUSTIFY"><font size="2" color="#008000">Y<font LANG="ZH-CN">比例因子</font> =
Y<font LANG="ZH-CN">视口范围</font>/Y<font LANG="ZH-CN">窗口范围</font></font></p>
<p ALIGN="JUSTIFY"><font size="2" color="#008000"><font LANG="ZH-CN">设备</font>X = <font LANG="ZH-CN">逻辑</font>X
*X<font LANG="ZH-CN">比例因子</font> + X<font LANG="ZH-CN">坐标原点偏移</font></font></p>
<p ALIGN="JUSTIFY"><font size="2" color="#008000"><font LANG="ZH-CN">设备</font>Y = <font LANG="ZH-CN">逻辑</font>Y
*Y<font LANG="ZH-CN">比例因子</font> + Y<font LANG="ZH-CN">坐标原点偏移</font></font></p>
</blockquote>
</blockquote>
<font SIZE="3">
<p ALIGN="JUSTIFY"></font><font LANG="ZH-CN">在逻辑坐标和设备坐标之间进行转换要利用</font><font size="2">CDC<font LANG="ZH-CN">的</font><font color="#008000">LPtoDP(
)</font><font LANG="ZH-CN">和</font><font color="#008000">DPtoLP( )</font><font LANG="ZH-CN">。</font></font></p>
<font SIZE="3">
<p ALIGN="JUSTIFY" style="line-height: 100%; margin-top: 0; margin-bottom: 0"></font><font LANG="ZH-CN" size="2">下面我们列出进行坐标映射工作的时候所要遵循的一些规则:</font></p>
<font SIZE="3">
<p ALIGN="JUSTIFY" style="line-height: 100%; margin-top: 0; margin-bottom: 0"></font><font size="2"><font LANG="ZH-CN">① 可以认为</font>CDC<font LANG="ZH-CN">的所有成员函数都以逻辑坐标作为参数,但和</font>CRect<font LANG="ZH-CN">有关的函数例外。</font></font></p>
<font SIZE="3">
<p ALIGN="JUSTIFY" style="line-height: 100%; margin-top: 0; margin-bottom: 0"></font><font size="2"><font LANG="ZH-CN">② 可以认为</font>CWnd<font LANG="ZH-CN">的成员函数都以设备坐标作为参数。</font></font></p>
<font SIZE="3">
<p ALIGN="JUSTIFY" style="line-height: 100%; margin-top: 0; margin-bottom: 0"></font><font LANG="ZH-CN" size="2">③
以逻辑坐标的形式来保存数据,否则用户对窗口进行滚动操作的时候,这个数据就不再有效了。</font></p>
<p style="line-height: 100%; text-indent: 0; margin: 0" class="右标题" align="left"> </p>
<hr size="1" color="#008000">
<p style="line-height: 100%; margin-top: 0; margin-bottom: 0"> </p>
<p style="line-height: 100%; margin-top: 0; margin-bottom: 0"> <span style="position: absolute; left: 33; top: 646"><a href="right18-2.htm" target="_self"><img border="0" src="rightd1.gif" width="113" height="70"></a></span>
<span style="position: absolute; left: 503; top: 649"><a href="right18-4.htm" target="_self"><img border="0" src="rightd2.gif" width="124" height="63"></a></span></p>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -