📄 合成样式.mht
字号:
text-indent:-18.0pt;}
@list l4
{mso-list-id:1572740189;
mso-list-type:hybrid;
mso-list-template-ids:-1860253016 1727042568 67698691 1727042568 67698689 =
67698691 67698693 67698689 67698691 67698693;}
@list l4:level1
{mso-level-number-format:bullet;
mso-level-text:\25CF;
mso-level-tab-stop:42.0pt;
mso-level-number-position:left;
margin-left:42.0pt;
text-indent:-24.0pt;
font-family:PMingLiU;
mso-hansi-font-family:Wingdings;
mso-ansi-font-weight:normal;
mso-ansi-font-style:normal;}
@list l4:level2
{mso-level-number-format:bullet;
mso-level-text:\F06E;
mso-level-tab-stop:66.0pt;
mso-level-number-position:left;
margin-left:66.0pt;
text-indent:-24.0pt;
font-family:Wingdings;}
@list l4:level3
{mso-level-number-format:bullet;
mso-level-text:\25CF;
mso-level-tab-stop:90.0pt;
mso-level-number-position:left;
margin-left:90.0pt;
text-indent:-24.0pt;
font-family:PMingLiU;
mso-hansi-font-family:Wingdings;
mso-ansi-font-weight:normal;
mso-ansi-font-style:normal;}
@list l4:level4
{mso-level-tab-stop:144.0pt;
mso-level-number-position:left;
text-indent:-18.0pt;}
@list l4:level5
{mso-level-tab-stop:180.0pt;
mso-level-number-position:left;
text-indent:-18.0pt;}
@list l4:level6
{mso-level-tab-stop:216.0pt;
mso-level-number-position:left;
text-indent:-18.0pt;}
@list l4:level7
{mso-level-tab-stop:252.0pt;
mso-level-number-position:left;
text-indent:-18.0pt;}
@list l4:level8
{mso-level-tab-stop:288.0pt;
mso-level-number-position:left;
text-indent:-18.0pt;}
@list l4:level9
{mso-level-tab-stop:324.0pt;
mso-level-number-position:left;
text-indent:-18.0pt;}
@list l5
{mso-list-id:1796943776;
mso-list-type:hybrid;
mso-list-template-ids:-1196291262 67698703 67698713 67698715 67698703 6769=
8713 67698715 67698703 67698713 67698715;}
@list l5:level1
{mso-level-tab-stop:24.0pt;
mso-level-number-position:left;
margin-left:24.0pt;
text-indent:-24.0pt;}
@list l5:level2
{mso-level-tab-stop:72.0pt;
mso-level-number-position:left;
text-indent:-18.0pt;}
@list l5:level3
{mso-level-tab-stop:108.0pt;
mso-level-number-position:left;
text-indent:-18.0pt;}
@list l5:level4
{mso-level-tab-stop:144.0pt;
mso-level-number-position:left;
text-indent:-18.0pt;}
@list l5:level5
{mso-level-tab-stop:180.0pt;
mso-level-number-position:left;
text-indent:-18.0pt;}
@list l5:level6
{mso-level-tab-stop:216.0pt;
mso-level-number-position:left;
text-indent:-18.0pt;}
@list l5:level7
{mso-level-tab-stop:252.0pt;
mso-level-number-position:left;
text-indent:-18.0pt;}
@list l5:level8
{mso-level-tab-stop:288.0pt;
mso-level-number-position:left;
text-indent:-18.0pt;}
@list l5:level9
{mso-level-tab-stop:324.0pt;
mso-level-number-position:left;
text-indent:-18.0pt;}
ol
{margin-bottom:0cm;}
ul
{margin-bottom:0cm;}
-->
</style>
<!--[if gte mso 10]>
<style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:\666E\901A\8868\683C;
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-parent:"";
mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
mso-para-margin:0cm;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:"Times New Roman";}
table.a0
{mso-style-name:\8868\683C\5167\6587;
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-parent:"";
mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
mso-para-margin:0cm;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.0pt;
font-family:"Times New Roman";}
</style>
<![endif]--><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext=3D"edit" spidmax=3D"3074"/>
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext=3D"edit">
<o:idmap v:ext=3D"edit" data=3D"1"/>
</o:shapelayout></xml><![endif]-->
</head>
<body lang=3DZH-CN link=3Dblue vlink=3Dpurple style=3D'tab-interval:24.0pt;=
text-justify-trim:
punctuation'>
<div class=3DSection1 style=3D'layout-grid:18.0pt'>
<h1><span style=3D'font-family:SimSun;mso-ascii-font-family:Arial;mso-hansi=
-font-family:
Arial'>合成样式</span><span lang=3DEN-US>(Composite=
)</span><span
lang=3DEN-US style=3D'mso-fareast-language:ZH-TW'><o:p></o:p></span></h1>
<p class=3DMsoNormal><span lang=3DEN-US style=3D'mso-fareast-language:ZH-TW=
'><!--[if gte vml 1]><v:shapetype
id=3D"_x0000_t75" coordsize=3D"21600,21600" o:spt=3D"75" o:preferrelative=
=3D"t"
path=3D"m@4@5l@4@11@9@11@9@5xe" filled=3D"f" stroked=3D"f">
<v:stroke joinstyle=3D"miter"/>
<v:formulas>
<v:f eqn=3D"if lineDrawn pixelLineWidth 0"/>
<v:f eqn=3D"sum @0 1 0"/>
<v:f eqn=3D"sum 0 0 @1"/>
<v:f eqn=3D"prod @2 1 2"/>
<v:f eqn=3D"prod @3 21600 pixelWidth"/>
<v:f eqn=3D"prod @3 21600 pixelHeight"/>
<v:f eqn=3D"sum @0 0 1"/>
<v:f eqn=3D"prod @6 1 2"/>
<v:f eqn=3D"prod @7 21600 pixelWidth"/>
<v:f eqn=3D"sum @8 21600 0"/>
<v:f eqn=3D"prod @7 21600 pixelHeight"/>
<v:f eqn=3D"sum @10 21600 0"/>
</v:formulas>
<v:path o:extrusionok=3D"f" gradientshapeok=3D"t" o:connecttype=3D"rect"/>
<o:lock v:ext=3D"edit" aspectratio=3D"t"/>
</v:shapetype><v:shape id=3D"_x0000_i1025" type=3D"#_x0000_t75" style=3D'wi=
dth:373.5pt;
height:16.5pt'>
<v:imagedata src=3D"file2607.files/image001.gif" o:title=3D"BD21303_"/>
</v:shape><![endif]--><![if !vml]><img width=3D498 height=3D22
src=3D"file2607.files/image001.gif" v:shapes=3D"_x0000_i1025"><![endif]><o:=
p></o:p></span></p>
<h3><span style=3D'font-family:SimSun;mso-ascii-font-family:Arial;mso-hansi=
-font-family:
Arial'>目的</span><span lang=3DEN-US>(Intent)</span></h3>
<p class=3DMsoNormal style=3D'text-indent:24.0pt;mso-char-indent-count:2.0'=
><span
style=3D'font-family:SimSun;mso-ascii-font-family:"Times New Roman";mso-han=
si-font-family:
"Times New Roman"'>合成多个对象成=
树状结构以表现个别=
9982;整体</span><span
lang=3DEN-US style=3D'mso-fareast-font-family:SimSun'>(part-whole)</span><s=
pan
style=3D'font-family:SimSun;mso-ascii-font-family:"Times New Roman";mso-han=
si-font-family:
"Times New Roman"'>的层级架构。合=
成样式让使用端以一=
3268;的方式处理个别及ࡧ=
2;成对象。</span></p>
<h3><span style=3D'font-family:SimSun;mso-ascii-font-family:Arial;mso-hansi=
-font-family:
Arial'>动机</span><span lang=3DEN-US>(Motivation)</span><span
lang=3DEN-US style=3D'mso-fareast-language:ZH-TW'><o:p></o:p></span></h3>
<p class=3DMsoNormal style=3D'text-indent:27.0pt;mso-char-indent-count:2.25=
'><span
style=3D'font-family:SimSun;mso-ascii-font-family:"Times New Roman";mso-han=
si-font-family:
"Times New Roman"'>图形处理系统如=
绘图编辑</span><span
lang=3DEN-US style=3D'mso-fareast-font-family:SimSun'>(drawing Editors)</sp=
an><span
style=3D'font-family:SimSun;mso-ascii-font-family:"Times New Roman";mso-han=
si-font-family:
"Times New Roman"'>及图表抓取</span><span
lang=3DEN-US style=3D'mso-fareast-font-family:SimSun'>(schematic capture)</=
span><span
style=3D'font-family:SimSun;mso-ascii-font-family:"Times New Roman";mso-han=
si-font-family:
"Times New Roman"'>系统让使用端从=
简单的图形组合建立=
1512;成图形甚至再组合ࡧ=
2;成图形成更复杂的图&=
#24418;。简单的实作可定=
041;原始</span><span
lang=3DEN-US style=3D'mso-fareast-font-family:SimSun'>(primitive)</span><sp=
an
style=3D'font-family:SimSun;mso-ascii-font-family:"Times New Roman";mso-han=
si-font-family:
"Times New Roman"'>的类别如文字及=
线段加上其它原始类=
1035;的组合类别。</span></p>
<p class=3DMsoNormal style=3D'text-indent:27.0pt;mso-char-indent-count:2.25=
'><span
style=3D'font-family:SimSun;mso-ascii-font-family:"Times New Roman";mso-han=
si-font-family:
"Times New Roman"'>此种方式的问题=
是:在写作程序时必=
9035;以不同方式处理这మ=
1;原始对象及组合对象&=
#65292;因为必须区分这些=
545;象使得系统更复杂。=
;合成样式将描述如何&#=
20351;用递回合成</span><span
lang=3DEN-US style=3D'mso-fareast-font-family:SimSun'>(recursive compositio=
n)</span><span
style=3D'font-family:SimSun;mso-ascii-font-family:"Times New Roman";mso-han=
si-font-family:
"Times New Roman"'>让使用端无须做=
这些区分。</span><span
lang=3DEN-US style=3D'mso-fareast-language:ZH-TW'><o:p></o:p></span></p>
<p class=3DMsoNormal align=3Dcenter style=3D'text-align:center;text-indent:=
27.0pt;
mso-char-indent-count:2.25'><span lang=3DEN-US style=3D'mso-fareast-languag=
e:ZH-TW'><!--[if gte vml 1]><v:shape
id=3D"_x0000_i1026" type=3D"#_x0000_t75" style=3D'width:414pt;height:188.2=
5pt;
mso-position-horizontal:center' o:bordertopcolor=3D"black" o:borderleftcol=
or=3D"black"
o:borderbottomcolor=3D"black" o:borderrightcolor=3D"black" o:allowoverlap=
=3D"f">
<v:imagedata src=3D"file2607.files/image002.emz" o:title=3D""/>
<w:bordertop type=3D"single" width=3D"10"/>
<w:borderleft type=3D"single" width=3D"10"/>
<w:borderbottom type=3D"single" width=3D"10"/>
<w:borderright type=3D"single" width=3D"10"/>
</v:shape><![endif]--><![if !vml]><img width=3D554 height=3D253
src=3D"file2607.files/image003.gif" v:shapes=3D"_x0000_i1026"><![endif]><o:=
p></o:p></span></p>
<p class=3DMsoNormal style=3D'text-indent:27.0pt;mso-char-indent-count:2.25=
'><span
style=3D'font-family:SimSun;mso-ascii-font-family:"Times New Roman";mso-han=
si-font-family:
"Times New Roman"'>合成样式的关键=
是一个表示原始及承=
6733;</span><span
lang=3DEN-US style=3D'mso-fareast-font-family:SimSun'>(containers)</span><s=
pan
style=3D'font-family:SimSun;mso-ascii-font-family:"Times New Roman";mso-han=
si-font-family:
"Times New Roman"'>的抽象类别。以=
图形系统来说这个类=
1035;是</span><span
lang=3DEN-US style=3D'mso-fareast-font-family:SimSun'>TGraphic</span><span
style=3D'font-family:SimSun;mso-ascii-font-family:"Times New Roman";mso-han=
si-font-family:
"Times New Roman"'>,</span><span lang=3DEN-US style=3D'mso-fareast-f=
ont-family:
SimSun'>TGraphic</span><span style=3D'font-family:SimSun;mso-ascii-font-fam=
ily:
"Times New Roman";mso-hansi-font-family:"Times New Roman"'>类别=
宣告的操作如</span><span
lang=3DEN-US style=3D'mso-fareast-font-family:SimSun'>Draw()</span><span
style=3D'font-family:SimSun;mso-ascii-font-family:"Times New Roman";mso-han=
si-font-family:
"Times New Roman"'>是针对图形对象=
,除此之外有一些是=
1512;成对象所共享的如ढ=
4;取及管理其子代对象&=
#30340;操作。上图中的次=
867;别如</span><span
lang=3DEN-US style=3D'mso-fareast-font-family:SimSun'>TLine</span><span
style=3D'font-family:SimSun;mso-ascii-font-family:"Times New Roman";mso-han=
si-font-family:
"Times New Roman"'>、</span><span lang=3DEN-US style=3D'mso-fareast-f=
ont-family:
SimSun'>TRectangle</span><span style=3D'font-family:SimSun;mso-ascii-font-f=
amily:
"Times New Roman";mso-hansi-font-family:"Times New Roman"'>及</span><=
span
lang=3DEN-US style=3D'mso-fareast-font-family:SimSun'>TText</span><span
style=3D'font-family:SimSun;mso-ascii-font-family:"Times New Roman";mso-han=
si-font-family:
"Times New Roman"'>定义原始图形对=
象,这些次类别实作</s=
pan><span
lang=3DEN-US style=3D'mso-fareast-font-family:SimSun'>Draw()</span><span
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -