VML の shadowサブエレメントについて
TAXIが勝手に解釈している部分があります。間違いが必ずあるという認識はしておいてください。
オリジナルは、MSDN - MSDN Library - Web Development - HTML and CSS - Web Multimedia - Vector Markup Language (VML) - VML Reference
にあります。United State (English)です。日本語MSDNにはありません。
shapeエレメントのサブエレメント。主要エレメントにはなりません。v:imageやv:groupにも当てはめるjことはできません。v:ovalやv:rectなどはOKです。
押し出し(Extructionサブエレメント)が有る場合は、影は描画されない。
最低限のshadowサブ工メント有効・・・<v:shadow on="True" />のみをサブエレメントとして入れてみた。
<v:shape strokecolor="red" fillcolor="yellow"
style="border:blue solid 1px; width:100; height:100; rotation:0;
position:absolute; left:100; top:100" coordsize="100,100"
coordorigin="0,0" path="m 0 -57
c -66 -91 -101 20 0 67 c 101 20 66 -91 0 -57 x m
0 -33 c -38 -56 -67 -7 0 44 c 67 -7 38 -56 0 -33 x wr
-2 -2 2 2 -1000 -1000 -1000 -999 x e">
<v:shadow
on="True" />
</v:shape >
ブルーの長方形は、shapeのborder
赤は構文。スクリプトでは、element.Atrribute-"属性値"。HTML+TIMEでは、atrributename="Atrribute"
to="属性値"。
VMLタグでは、<v:
shadow Atrribute="属性値" />
青はW3Cノート VMLより
| Attribute(属性) | Description (説明) | ||||||||||||||
| Color |
Defines the color of a shadow.
影の色を定義します。 主シャドウの色。WEBカラー名・16進数カラーコード・RGB(r,g,b)はOKのようだ。デフォルト値は gray RGB(128,128,128) color="属性値 "
<v:shadow on="True" color="green"/> <v:shadow on="True" color="rgb(255,255,0)"/>
|
||||||||||||||
| Color2 |
Defines the second color of a shadow. See the Type attribute for more information about second colors. 影の第二色を定義します。第2の色に関してより詳細には、タイプ属性を参照してください。 副シャドウ、または浮き彫りシャドウ、彫り込みシャドウのハイライトの色。 WEBカラー名・16進数カラーコード・RGB(r,g,b)はOKのようだ。???type="double"の場合のみ?embossはあまり意味無い様だし・・・。 デフォルト値は gray RGB(203,203,203) color2="属性値" <v:shadow on="True" color="green" color2="red" type="emboss" /> <v:shadow on="True" color="green" color2="blue" type="double" /> <v:shadow on="True" color="green" color2="blue" type="single" /> <v:shadow on="True" color="green" color2="blue" type="perspective" />
|
||||||||||||||
| Matrix |
Specifies the amount of brightness of a scene.
遠近法的に影を変形する定義をします。 "sxx,sxy,syx,syy,px,py" という形式の、遠近法的変形マトリックス。[s=scale, p=perspective] もしオフセットが絶対的単位であれば px,py は emu-1 単位であり、そうでなければ図形サイズの逆数である。
参考:tan45°=1、tan30°=0.577、tan60°=1.732、tan15°=0.2678、tan135°=-1 デフォルト定義されていない(NULL)・・・とあるが・・・skewサブエレメントでは、"1,0,0,1,0,0".がデフォルトとある。skewエレメントとは仕様が違うのかな? matrix="属性値 " ちなみにskewでのMSDN説明は次の通り。 The matrix is a string in the form "sxx, sxy, syx, syy, px, py" where s is scale, p is perspective, and x and y are x and y values. If Offset is in absolute units, then px and py are in emu^-1 units (otherwise they are an inverse fraction of the shape size). The default value is "1,0,0,1,0,0". マトリックスは「sxx、sxy、syx、syy、px、py」という形式の文字列です、sがスケールで、pは遠近法です、また、xとyはx軸方向とy軸方向の値です。 デフォルト値は"1,0,0,0,0,0"です。 で、多分次のようになっていると思われます。 ・sxx・・・横幅の倍率。図形の横サイズを比率で扱う。、デフォルトは1倍。 ・sxy・・・縦の線の傾きのタンジェント。デフォルトは0でtan0°=0。1とすると左に45度傾斜する。マイナス値で逆傾斜。 ・syx・・・横線の傾きのタンジェント。デフォルトは0でtan0°=0。1とすると下に45度傾斜する。マイナス値で逆傾斜。 ・syy・・・縦高さの倍率。図形の縦サイズを比率で扱う。デフォルトは1倍。 ・px,pyの正確なことはわかりませんが、遠近法としての変形をするようです。.<v:shadow on="True" color="green" color2="blue" type="perspective" matrix=",-92680f,,,,-95367431641e-17" /> <v:shadow on="True" color="green" color2="blue" type="perspective" matrix=",-92680f,,,,-95367431641e-17" origin=".5,.5" offset="0,0" />
よくわかんない。 |
||||||||||||||
| Obscured |
Determines whether the shadow is transparent. 影が透明かどうかを定義します。 falseの場合・・・図形に塗りつぶしがなければ、シャドウは透けて見える。但しstroked="t"で線が描画される場合は、線の影が描画される。 trueの場合・・・図形に塗りつぶしがなくても、シャドウは描画される。但しstroked="t"であっても線の影は描画されない。 デフォルトはfalse。obscured="属性値 " <v:shadow on="True" color="green" color2="blue" type="perspective" matrix=",-92680f,,,,-95367431641e-17"
obscured="f"
/> <v:shadow on="True" color="green" color2="blue" type="perspective" matrix=",-92680f,,,,-95367431641e-17"
obscured="f"
/> <v:shadow on="True" color="green" color2="blue" type="perspective" matrix=",-92680f,,,,-95367431641e-17"
obscured="f"
/> <v:shadow on="True" color="green" color2="blue" type="perspective" matrix=",-92680f,,,,-95367431641e-17"
obscured="f"
/> <v:shadow on="True" color="green" color2="blue" type="perspective" matrix=",-92680f,,,,-95367431641e-17"
obscured="t"
/> <v:shadow on="True" color="green" color2="blue" type="perspective" matrix=",-92680f,,,,-95367431641e-17"
obscured="t"
/> <v:shadow on="True" color="green" color2="blue" type="perspective" matrix=",-92680f,,,,-95367431641e-17"
obscured="t"
/> <v:fill src="sakuranboo.gif" type="frame"
/>
<v:fill src="sakuranboo.gif" type="frame"
/>
<v:shadow on="True" color="green"
color2="blue" type="emboss" obscured="f"
offset="50pt,50pt" offset2="50pt,50pt" />
<v:shadow on="True" color="green"
color2="blue" type="emboss" obscured="t"
offset="50pt,50pt" offset2="50px,50px" />
<v:fill src="sakuranboo.gif" type="frame"
/>
|
||||||||||||||
| Offset |
Defines how far the shadow extends past the shape.
影がshapeの位置から離れ、どれくらいの距離伸びるか定義します。 値は絶対的な測定あるいは形の断片的な値のいずれかです。断片的な場合、それらは50%から-50%まで変動します。 図形の位置からのオフセットのx、y量。値は、絶対的測定値か、図形の -0.5 ~ +0.5 の小数値かのいずれかである。※pxは相対的単位であるが、OKである。 デフォルトは 2pt,2pt (offset.x, offset.y) offset="属性値 " <v:shadow on="True" color="green" color2="blue" type="perspective" offset="-0.5,-0.5" /> <v:shadow on="True" color="green" color2="blue" type="perspective" offset="0.5,0.5" /> <v:shadow on="True" color="green" color2="blue" type="double" offset="0.5,0.5" /> <v:shadow on="True" color="green" color2="blue" type="emboss" offset="0.5,0.5" /> <v:shadow on="True" color="green" color2="blue" type="double" offset="100px,100px"
/>
|
||||||||||||||
| Offset2 |
Defines a second offset. See the Type
attribute for more information about second offsets. 第二のオフセットを定義します。第二のオフセットに関してより詳細には、タイプ属性を参照してください。 値は絶対的な測定あるいは形の断片的な値のいずれかです。断片的な場合、それらは50%から-50%まで変動します。 図形の位置からの第2オフセットのx、y量。値は、絶対的測定値か、図形の -0.5 ~ +0.5 の小数値かのいずれかである。???type="double"の場合のみ? デフォルトは 0pt,0pt (offset2.x, offset2.y) offset2="属性値 " <v:shadow on="True" color="green" color2="blue" type="perspective" offset2="-0.5,-0.5" /> <v:shadow on="True" color="green" color2="blue" type="perspective" offset2="0.5,0.5" /> <v:shadow on="True" color="green" color2="blue" type="double" offset2="0.5,0.5" /> <v:shadow on="True" color="green" color2="blue" type="emboss" offset2="0.5,0.5" />
<v:shadow on="True" color="green" color2="blue" type="double" offset2="100px,100px"
/> <v:shadow on="True" color="green" color2="blue" type="double" offset="-50pt,-50pt" offset2="100px,100px" />
|
||||||||||||||
| On |
Determines whether a shadow is displayed.
影が表示されるかどうか決めます。 シャドウの表示をオンまたはオフにする。デフォルトは、true。 on="属性値 " <v:shadow on="True" color="green" color2="blue" type="perspective" matrix=",-92680f,,,,-95367431641e-17" on="t" origin=".5,.5" offset="0,0" /> <v:shadow on="True" color="green" color2="blue" type="perspective" matrix=",-92680f,,,,-95367431641e-17" on="f" origin=".5,.5" offset="0,0" />
|
||||||||||||||
| Opacity |
Determines the transparency of a shadow.
影の透明度を決定します。 シャドウ効果の不透明度。デフォルト価値は1です。0の値は完全に透明な影を作るでしょう。割合少数値、%どちらでもよい。 opacity="属性値 " <v:shadow on="True" color="green" color2="blue" type="perspective" matrix=",-92680f,,,,-95367431641e-17" origin=".5,.5" offset="0,0" opacity="50%" /> <v:shadow on="True" color="green" color2="blue" type="perspective" matrix=",-92680f,,,,-95367431641e-17" origin=".5,.5" offset="0,0" opacity="0.5" /> <v:shadow on="True" color="green" color2="blue" type="perspective" matrix=",-92680f,,,,-95367431641e-17" origin=".5,.5" offset="0,0" opacity="100%" /> <v:shadow on="True" color="green" color2="blue" type="perspective" matrix=",-92680f,,,,-95367431641e-17" origin=".5,.5" offset="0,0" opacity="0.1" />
|
||||||||||||||
| Origin |
Defines the center of the shadow.
影の中心を定義します。 図形の -0.5 ~ +0.5 の小数値の対。50%から-50%に及ぶ形の1ペアの断片的な値。デフォルトは、(0,0)です。割合少数値、%どちらでも良い。 origin="属性値 " <v:shadow on="True" color="green" color2="blue" type="perspective" matrix=",-92680f,,,,-95367431641e-17" origin="20%,20%" offset="0,0" /> <v:shadow on="True" color="green" color2="blue" type="perspective" matrix=",-92680f,,,,-95367431641e-17" origin="0,0" offset="0,0" /> <v:shadow on="True" color="green" color2="blue" type="perspective" matrix=",-92680f,,,,-95367431641e-17" origin="100%,100%" offset="0,0" /> <v:shadow on="True" color="green" color2="blue" type="perspective" matrix=",-92680f,,,,-95367431641e-17" origin="150%,150%" offset="0,0" /> 単位なし <v:shadow on="True" color="green" color2="blue" type="perspective" matrix=",-92680f,,,,-95367431641e-17" origin="3,3" offset="0,0" /> 単位なし <v:shadow on="True" color="green" color2="blue" type="perspective" matrix=",-92680f,,,,-95367431641e-17" origin="-3,-3" offset="0,0" /> ポイント数値+単位は有効か? <v:shadow on="True" color="green" color2="blue" type="perspective" matrix=",-92680f,,,,-95367431641e-17" origin="3pt,3pt" offset="0,0" /> ポイント数値+単位は有効か? <v:shadow on="True" color="green" color2="blue" type="perspective" matrix=",-92680f,,,,-95367431641e-17" origin="-3pt,-3pt" offset="0,0" /> ピクセル数値+単位は有効か? <v:shadow on="True" color="green" color2="blue" type="perspective" matrix=",-92680f,,,,-95367431641e-17" origin="3px,3px" offset="0,0" /> ピクル数値+単位は有効か? <v:shadow on="True" color="green" color2="blue" type="perspective" matrix=",-92680f,,,,-95367431641e-17" origin="-3px,-3px" offset="0,0" /> ミリ数値+単位は有効か? <v:shadow on="True" color="green" color2="blue" type="perspective" matrix=",-92680f,,,,-95367431641e-17" origin="3mm,3mm" offset="0,0" /> ミリ数値+単位は有効か? <v:shadow on="True" color="green" color2="blue" type="perspective" matrix=",-92680f,,,,-95367431641e-17" origin="-3mm,-3mm" offset="0,0" /> センチ数値+単位は有効か? <v:shadow on="True" color="green" color2="blue" type="perspective" matrix=",-92680f,,,,-95367431641e-17" origin="3cm,3cm" offset="0,0" /> センチ数値+単位は有効か? <v:shadow on="True" color="green" color2="blue" type="perspective" matrix=",-92680f,,,,-95367431641e-17" origin="-3cm,-3cm" offset="0,0" /> これはどうなってるの?
|
||||||||||||||
| Type |
Specifies the type of shadow.
影のタイプを指定します。 取りうる値は "single | double | emboss | perspective" である。(W3Cノート)。MSDNでは以下の通り。
type="属性値 " いまひとつわからん。embossいろいろ試したが、浮き彫り風にはならない・・・誰か成功した人いるの? <v:image src="sakuranboo.gif" strokecolor="red" fillcolor="yellow"
style="border:blue solid 1px; position:absolute; rotation:0; filter:alpha(opacity=100);
left:0px; top:0px; width:70px; height:108px;">
<v:image src="sakuranboo.gif" strokecolor="red" fillcolor="yellow"
style="border:blue solid 1px; position:absolute; rotation:0; filter:alpha(opacity=100);
left:0px; top:0px; width:70px; height:108px;">
<v:image src="sakuranboo.gif" strokecolor="red" fillcolor="yellow"
style="border:blue solid 1px; position:absolute; rotation:0; filter:alpha(opacity=100);
left:0px; top:0px; width:70px; height:108px;">
<v:image src="sakuranboo.gif" strokecolor="red" fillcolor="yellow"
style="border:blue solid 1px; position:absolute; rotation:0; filter:alpha(opacity=100);
left:0px; top:0px; width:70px; height:108px;">
<v:image src="sakuranboo.gif" strokecolor="red" fillcolor="yellow"
style="border:blue solid 1px; position:absolute; rotation:0; filter:alpha(opacity=100);
left:0px; top:0px; width:70px; height:108px;">
<v:image src="sakuranboo.gif" strokecolor="red" fillcolor="yellow"
style="border:blue solid 1px; position:absolute; rotation:0; filter:alpha(opacity=100);
left:0px; top:0px; width:70px; height:108px;">
<v:image src="sakuranboo.gif" strokecolor="red" fillcolor="yellow"
style="border:blue solid 1px; position:absolute; rotation:0; filter:alpha(opacity=100);
left:0px; top:0px; width:70px; height:108px;">
その他、pathによる図形(Shape)のfillサブエレメントでGIF/JPEG/WMF画像でも試し、WORDにても試しましたが、エンボスになることはありませんでした。後試してないといえば、imagedataサブエレメントかなぁ?WORDの画像挿入でimagedataになるが、これでもだめなんだが・・・。
|
入力は半角で。全角や入れることのできない値・文字列は、エラーとなる場合があります。
|
type |
singledoubleperspectiveshaperelativedrawingrelativeemboss |
on |
false true |
||
|
obscured |
false true |
offset |
x=
y=
|
offset2 |
x=
y= |
|
color |
|
color2 |
|
opacity |
|
|
origin |
|
rotation |
|
extruction on/off |
false true |
|
matrix |
例) |
||||
|
matrix="sxx,sxy,syx,syy,px,py" |
sxx= sxy= syx= syy= px= py= |
||||
|
shape図形にしか影は描画されない。imagedataも関係なし。 |
fillに画像をタイル状に貼り付けの場合) |
|
|
|
|
<v:group style="width:1; height:1; rotation:0" coordsize="1,1"
coordorigin="0,0" > |
<v:group style="width:1; height:1; rotation:0" coordsize="1,1"
coordorigin="0,0" > |
Copyright TAXI 2008/6/30 敦子(とんこ)画像:ズサンヌ