|
[VML考察1]
[VML考察2] [VML fill] [VML stroke] [VMLのshadowサブエレメント] [VML extructionの属性] [VMLのskewサブエレメント] [画像を回転] [VML作成] |
VMLのパス描画である線の表示方法に関するサブエレメント<v:stoke>について <v stroke>サブエレメントは<v:shape><v:shapetype><v:background>など主要エレメントによる図形に詳細なパス線描画を決定する。サブエレメントは主要エレメントの開始タグと終了タグの間に挟む。 <v:group style="width:100; POSITION:ABSOLUTE; height:100;
top:0; left:0; rotation:0;" coordsize="100,100" coordorigin="0,0"> |
||||||||||||||||||||||
|
<v:stroke>サブエレメントの属性を見ていきます。id属性はHTMLエレメントのID属性に同じです。一意的エレメント識別子として使われます。 ※ここで使用させていただいている画像はゆみこさん「ひなたぼっこ」からお借りしています。 on weight color opacity linestyle miterlimit joinstyle endcap dashstyle filltype src imagesize startarrow endarrow startarrowwidth endarrowwidth startarrowlength endarrowlength color2 imagealignshape on・・・線の描画をするかどうか。true/falseまたはt/f。主要エレメントのstroked属性を変更する。 <!--左四角形--> weight・・・線の幅。主要エレメントのstrokeweight属性を変更する。 <!--左四角形--> <!--2番目楕円--> <!--3番目シェイプ--> <!--右シェイプ-->・・・これはnsコマンド有・・・nfコマンドは左右されない。 color・・・線の色。主要エレメントのstrokecolor属性を変更する。 <!--左四角形--> <!--2番目楕円--> <!--3番目シェイプ--> <--右シェイプ-->・・・これはnsコマンド有・・・nfコマンドは左右されない。 opacity・・・線の描画不透明度。%または小数値。初期値は1.0 <!--左四角形--> <!--2番目楕円--> <!--3番目シェイプ--> <--右シェイプ-->・・・これはnsコマンド有・・・nfコマンドは左右されない。 opacity="0.5" (strokecolor="black") color2="red" linestyle・・・W3Cノートではstyleとなっているようで、MSDNではlinestyle。線のスタイル。とるべき値はSingle(default),ThinThin,ThinThick,ThickThin,ThickBetweenThinの5つ。 linestyle="single"一本線 linestyle="thinthin"細い線-細い線 linestyle="thinthick"外側=細い線-内側=太い線 linestyle="thickthin"外側=太い線-内側=細い線 linestyle="ThickBetweenThin"細い線の間に太い線 miterlimit・・・平易に書き直しております。連結点の鋭利な突き出しに制限を加える。初期値は線の太さの8倍であり、線の太さ(weight)の倍数で表す。突き出しの厚みがこれ以上になる場合は制限がかかりjoinstyle="bevel"のようになる。miterlimitのサイズになるということではない。厚みとは連結点の内側コーナーと外側コーナーの距離。角の刈り込みがされない最大制限値を線の太さの倍数で表記する。 joinstyle="miter"でしか意味を成さない。
赤い線は同じ図形を重ねてシェイプのパスがわかるようにしています。 <v:stroke color="blue" opacity="0.5" miterlimit="1.0"
joinstyle="miter" linestyle="single"
weight="20pt" /> <v:stroke color="blue" opacity="0.5" miterlimit="2.0"
joinstyle="miter" linestyle="single"
weight="20pt" /> <v:stroke color="blue" opacity="0.5" miterlimit="3.0"
joinstyle="miter" linestyle="single"
weight="20pt" /> <v:stroke color="blue" opacity="0.5" miterlimit="8.0"
joinstyle="miter" linestyle="single"
weight="20pt" /> <v:stroke color="blue" opacity="0.5" miterlimit="4.5."
joinstyle="miter" linestyle="single"
weight="20pt" /> <v:stroke color="blue" opacity="0.5" miterlimit="1.0"
joinstyle="round" linestyle="single"
weight="20pt" /> <v:stroke color="blue" opacity="0.5" miterlimit="1.0"
joinstyle="bevel" linestyle="single"
weight="20pt" /> <v:stroke color="blue" opacity="0.5" miterlimit="1.0"
joinstyle="miter" linestyle="thinthin"
weight="20pt" /> <v:stroke color="blue" opacity="0.5" miterlimit="1.0"
joinstyle="miter" linestyle="thinthick"
weight="20pt" /> <v:stroke color="blue" opacity="0.5" miterlimit="1.0"
joinstyle="miter" linestyle="thickbetweenthin"
weight="20pt" /> joinstyle・・・連結点形状。round(Default)-丸め込み、bevel斜め刈り取り、miter(鋭利)。miterは司教冠と約され、鎗のように鋭利に突き出ています。bevelの訳は斜面。 <v:stroke color="blue" joinstyle="miter" linestyle="thickbetweenthin" weight="20pt" /> <v:stroke color="blue" joinstyle="round" linestyle="thickbetweenthin" weight="20pt" /> <v:stroke color="blue" joinstyle="bevel" linestyle="thickbetweenthin" weight="20pt" /> endcap・・・ストロークの終了のキャップ・スタイルを定義します。round-丸め、flat(default)-平坦、square(四角)。 <v:stroke color="blue" endcap="flat" linestyle="single" weight="20pt" /> <v:stroke color="blue" endcap="round" linestyle="single" weight="20pt" /> <v:stroke color="blue" endcap="square" linestyle="single" weight="20pt" /> dashstyle・・・linestyleとは違い、破線の描画スタイルを設定する。予め決められたパターンと、ユーザーが定義してパターンを指定するものがある。可能な限りオペレーションシステムが始めから用意しているものを使用することが望ましい。 MSDN翻訳文を参考に 持っている定義は、Solid(default)、ShortDash、ShortDot、ShortDashDot、ShortDashDotDot、Dot、Dash、LongDash、DashDot、LongDashDot、LongDashDotDot ユーザー定義例 dashstyle
アトリビュートは、ユーザが、カスタム定義された破線パターンを指定できるようにする。これは、一連の数を使ってなされる。破線スタイルは、ダッシュの長さ(運筆のなかの描画される部分)と、ダッシュ間のスペースの長さとを用いて定義される。長さは線の幅に対する相対指定である。"1"
という長さは線の幅に等しい。
以下の表は、典型的な値とその意図される効果の解説とを列挙したものである。"0"
は点を表わすものであり、この点は四つ折り対称的であるべきである(丸いエンドキャップならば円であるべきである)。直線のエンドキャップが
strokeweightは上から1px 2pt 5pt 10mmです。 <v:stroke color="blue" endcap="square" linestyle="single" dashstyle="shortdash" />
<v:stroke color="blue" endcap="square" linestyle="single" dashstyle="shortdot" />
<v:stroke color="blue" endcap="square" linestyle="single" dashstyle="shortdashdot" />
<v:stroke color="blue" endcap="square" linestyle="single" dashstyle="shortdashdotdot" />
<v:stroke color="blue" endcap="square" linestyle="single" dashstyle="dot" />
<v:stroke color="blue" endcap="square" linestyle="single" dashstyle="dash" />
<v:stroke color="blue" endcap="square" linestyle="single" dashstyle="longdash" />
<v:stroke color="blue" endcap="square" linestyle="single" dashstyle="dashdot" />
<v:stroke color="blue" endcap="square" linestyle="single" dashstyle="longdashdot" />
<v:stroke color="blue" endcap="square" linestyle="single" dashstyle="longdashdotdot" />
<v:stroke color="blue" endcap="square" linestyle="single" dashstyle="8 2 1 2 1 2" />
<v:stroke color="blue" endcap="round" linestyle="thinthin" dashstyle="longdashdot" />
<v:stroke color="blue"
endcap="square" linestyle="single"
dashstyle="dashdotshortdash" /> filltype・・・線の塗りつぶし方法。デフォルトはsolidで、この場合、srcで画像指定されていても画像で塗りつぶしされず、colorで指定された色で塗りつぶされる。 左から"solid" "tile" "pattern"
"frame"で示す。使用画像 src・・・ストローク塗りつぶしの参照画像をURLで指定する。src="http://〜〜〜" src="../vml/aya1.gif" 使用画像 左からsrc="aya1.gif" src="check_15.jpg" src="cat1.gif" src="koara.gif" 左から"solid" "tile" "pattern" "frame"で示す。 filltype="frame"の場合は、内接するサイズに調整される。 imagesize・・・画像塗りつぶしサイズを横・縦比率で指定する。。初期値はimagesize="auto"。図形サイズの比率で示す。比率は%か小数で表す。画像サイズの比率ではない。VML W3Cノートには「ブラシを形成する画像のサイズ。デフォルトは画像のサイズである。」とあるが、filltype="frame"ではそうはならない。 赤い線は同じ図形を重ねてパスがわかるようにしています(<v:rect>。画像塗りつぶし開始位置にも注目。 左から、
左から、
左から、
<v:shape style="width:150; height:100; left:30; top:20;
position:absolute; rotation:0;" coordsize="100,100"
coordorigin="0,0" filled="f" strokecolor="black"
strokeweight="1" path="m 0 0 l 400 0"> 図形の縦サイズが0なのでtype="frame"では表示されない。---線の幅ではない。 <v:shape style="width:150; height:100; left:30; top:20;
position:absolute; rotation:0;" coordsize="100,100"
coordorigin="0,0" filled="f" strokecolor="black"
strokeweight="1" path="m 0 0 l 400 100"> 斜線のために図形のサイズが決定され、そのサイズに対する比率で表示される。 <v:shape style="width:150; height:100; left:30; top:20;
position:absolute; rotation:0;" coordsize="100,100"
coordorigin="0,0" filled="f" strokecolor="black"
strokeweight="1" path="m 0 0 l 400 100"> 上のをtype="tile"にしたもの。
<v:shape style="width:150; height:100; left:30; top:20;
position:absolute; rotation:0;" coordsize="100,100"
coordorigin="0,0" filled="f" strokecolor="black"
strokeweight="1" path="m 0 0 l 400 100"> 上のをimagesize="auto""にしたもの。
<v:shape style="width:150; height:100; left:30; top:20;
position:absolute; rotation:0;" coordsize="100,100"
coordorigin="0,0" filled="f" strokecolor="black"
strokeweight="1" path="m 0 0 l 400 100"> linestyle="thickbetweenthin"にしてみた。
startarrow・・・開始点の矢印タイプ endarrow・・・終了点の矢印タイプ。どちらも同じ属性値を持つ。 デフォルトはstartarrow="none" endarrow="none"。その他に classic open block diamond oval chevron doublechevronがある。 classic open block diamond oval chevron---不明(検索してもstartarrow="chevron"は見つからなかった) doublechevron---不明(検索してもstartarrow="doublechevron"は見つからなかった) none 矢印の描かれ方(赤い線は1pxの同じstrokeライン)
画像で塗りつぶし filltype="tile" (filltype="frame"では縦幅なしの図形なので塗りつぶされない)
startarrowwidth・・・開始点矢印の幅 endarrowwidth・・・終了点矢印の幅。どちらも同じ属性値を持つ。
medium wide narrow classic open block diamond oval startarrowlength・・・開始点矢印の長さ endarrowlength・・・終了点矢印の長さ。どちらの同じ属性値を持つ。
medium short long classic open block diamond oval color2・・・filltype="pattern"の場合にのみ、第二カラー(副色)として使用される。 src="aya1.gif" filltype="pattern" color="red" color2="blue
src="aya1.gif" filltype="pattern" color="green" color2="yellow"
imagealignshape・・・これまた不明。"true" であれば画像を図形に揃え、"false"であれば画像をウィンドウに揃える。 |
|||||||||||||||||||||||
|
|
|||||||||||||||||||||||