Spiral Filter


Spiral Filter

Spiral transition filter는 가로(GrisSizeX), 세로(GridSizeY)에 지정하는 개수 만큼의 나선형 소용돌이(spiral)를 만들어 줍니다.

Spiral filter
Property 설 명
GridSizeX 정수값. Default 16. 소용돌이의 가로 개수.
GridSizeY 정수값. Default 16. 소용돌이의 세로 개수.
Duration Transition이 지속되는 시간의 초 단위. 예) Duration='1.0000' 이면 1초 지속.
html syntax <ELEMENT STYLE =
"filter:progid:DXImageTransform.Microsoft.Spiral(sProperties)">
scripting object.style.filter =
"progid:DXImageTransform.Microsoft.Spiral(sProperties)"
적용 대상 All block level elements.
Note  




Spiral transition 예제


Source code
<html>
<head>
<title>Spiral transition filter</title>
<script type="text/javascript">
<!--
var bState = 0;
function fnToggle(obj, obj1, obj2) {
obj.filters[0].Apply();
Xsize = document.spiralFilter.gridX.options[document.spiralFilter.gridX.selectedIndex].value;
Ysize = document.spiralFilter.gridY.options[document.spiralFilter.gridY.selectedIndex].value;
obj.filters.item("DXImageTransform.Microsoft.Spiral").GridSizeX = Xsize;
obj.filters.item("DXImageTransform.Microsoft.Spiral").GridSizeY = Ysize;

if (bState == 0) {
bState = 1;
obj.style.backgroundColor="royalblue"
obj.style.color = "#FFFFFF"
obj2.style.visibility="visible";
obj1.style.visibility="hidden";
}

else {
bState = 0;
obj.style.backgroundColor="#ffffcc"
obj.style.color = "#000000"
obj2.style.visibility="hidden";
obj1.style.visibility="visible";
}

obj.filters[0].Play();
}
// -->
</script>
<style type="text/css">
<!--
.container{
width:200px;
height:200px;
position:relative;
top:50px;
left:50px;
background-color:#ffffcc;
border:1px solid tomato;
font:bold 18px verdana;
padding:10px;
filter: progid:DXImageTransform.Microsoft.Spiral(Duration=2);
}
-->
</style>
</head>
<body>

<form id="spiralFilter" name="spiralFilter">
GridSizeX :
<select id="gridX" name="gridX">
<option value="4">4</option>
<option value="8" selected="selected">8</option>
<option value="16">16</option>
<option value="32">32</option>
<option value="64">64</option>
</select>
GridSizeY :
<select id="gridY" name="gridY">
<option value="4">4</option>
<option value="8" selected="selected">8</option>
<option value="16">16</option>
<option value="32">32</option>
<option value="64">64</option>
</select>
</form>

<button type="button" onclick="fnToggle(topContainer, img_1, img_2)">
Play Spiral Filter</button>

<div class="container" id="topContainer">

<img id="img_1" style="position:absolute" src="images/twins.gif" width="136" height="136"
alt="mc2_dice (6K)" />

<img id="img_2" style="visibility:hidden;position:absolute" src="images/mc2_dice.gif"
width="136" height="136" alt="twins (7K)" />

<span style="position:absolute;bottom:10px;">Spiral Transition</span>

</div>

</body>
</html>


코드 실행 하기





이 문서의 저작권은 www.cadvance.org 에 있습니다.

Top
Back
New
검색