📄 right18-1.htm
字号:
<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>第 18 章</title>
<base target="rbottom">
<style>
<!--
.右标题 { font-size: 10pt; color: #000080; text-indent: 0; margin: 0 }
.右内容 { font-size: 10pt; text-align: left; text-indent: 0; line-height: 100%; margin:
0 }
-->
</style>
</head>
<body>
<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: 4; top: -8"><img border="0" src="1.gif" width="63" height="70"></span></p>
<p style="line-height: 100%; margin-top: 0; margin-bottom: 0"> </p>
<p style="line-height: 100%; text-indent: 0; margin: 0" class="右标题" align="left">
<span style="background-color: #CCFF99">第 18 章</span><span style="background-color: #CCFF99">
</span>><span style="background-color: #CCFF99"> 第 1 节 </span>><span style="background-color: #CCFF99">
18.1 三种图形输出类型</span></p>
<hr color="#008000" size="1">
<p ALIGN="JUSTIFY"><font size="2"><font LANG="ZH-CN">图形设备接口(</font>GDI<font LANG="ZH-CN">)接受</font>Windows<font LANG="ZH-CN">应用程序的绘图请求(表现为</font>GDI<font LANG="ZH-CN">函数调用),并将它们传给相应的设备驱动程序,完成特定于硬件的输出。</font>GDI<font LANG="ZH-CN">负责</font>Windows<font LANG="ZH-CN">的所有图形输出,包括屏幕上输出像素、在打印机上输出硬拷贝以及绘制</font>Windows<font LANG="ZH-CN">用户界面。</font></font></p>
<p ALIGN="JUSTIFY"><font size="2"><font LANG="ZH-CN">应用程序可以使用</font>GDI<font LANG="ZH-CN">创建三种类型的图形输出:矢量图形输出、位图输出和文本输出。</font></font></p>
<p ALIGN="JUSTIFY"><font LANG="ZH-CN" size="2">1. 矢量图形输出</font></p>
<font SIZE="3">
<p ALIGN="JUSTIFY"></font><font LANG="ZH-CN" size="2">矢量图形输出,指的是创建线条和填充图形,包括点、直线、曲线、多边形、扇形和矩形的绘制。</font></p>
<p ALIGN="JUSTIFY"><font LANG="ZH-CN" size="2">2. 位图输出</font></p>
<font SIZE="3">
<p ALIGN="JUSTIFY"></font><font LANG="ZH-CN" size="2">位图输出又称为光栅输出,光栅图形的输出是指光栅图形函数对以位图形式存储的数据进行操作,它包括各种位图和图标的输出。在屏幕上表现为对若干行和列的像素的操作,在打印机上则是若干行和列的点阵的输出。</font></p>
<font SIZE="3">
<p ALIGN="JUSTIFY"></font><font size="2"><font LANG="ZH-CN">光栅图形输出的优点是速度很快,它是直接从内存到显存的拷贝操作。缺点是需要额外的内存空间。</font>Windows<font LANG="ZH-CN">在绘制界面时使用了大量的光栅输出。</font></font></p>
<p ALIGN="JUSTIFY"><font LANG="ZH-CN" size="2">3. 文本输出</font></p>
<font SIZE="3">
<p ALIGN="JUSTIFY"></font><font size="2">Windows<font LANG="ZH-CN">是按图形方式输出文本的,在输出文本时,以逻辑坐标为单位计算文本的输出位置。</font></font></p>
<font SIZE="3">
<p ALIGN="JUSTIFY"></font><font size="2"><font LANG="ZH-CN">按图形方式输出文本给文本输出带来很大的灵活性。用户可以通过调用各种</font>GDI<font LANG="ZH-CN">函数,制造出各种文本输出效果,包括加粗、斜体、设置颜色等。</font></font></p>
<p ALIGN="JUSTIFY"><font size="2">Windows<font LANG="ZH-CN">还提供了一种</font>TrueType<font LANG="ZH-CN">(写真字体)。</font>TrueType<font LANG="ZH-CN">字体用一组直线和曲线命令及一些参数来描述字体的轮廓。</font>Windows<font LANG="ZH-CN">可以通过参数来调整直线的长度和曲线的形状,从而实现对字体的自由缩放。</font></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: 35; top: 594"><a href="right17-4.htm" target="_self"><img border="0" src="rightd1.gif" width="113" height="70"></a></span>
<span style="position: absolute; left: 503; top: 600"><a href="right18-2.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 + -