0% found this document useful (0 votes)
6 views

Structured Graphics Programs

Uploaded by

minhajtimes2
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views

Structured Graphics Programs

Uploaded by

minhajtimes2
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

<html>

<head>

<title>Structured Graphics - Shapes</title>

</head>

<body>

<object id = "shapes" style = "background-color: #CCCCFF; width: 500; height: 400"

classid = "CLSID:369303C2-D7AC-11d0-89D5-00A0C90833E6">

<param name = "Line0001"; value = "SetLineColor( 0, 0, 0 )" />

<param name = "Line0002"; value = "SetLineStyle( 1, 1 )" />

<param name = "Line0003"; value = "SetFillColor( 0, 255, 255 )" />

<param name = "Line0004"; value = "SetFillStyle( 1 )" />

<param name = "Line0005"; value = "Oval( 0, -175, 25, 50, 45 )" />

<param name = "Line0006"; value = "Arc( -200, -125, 100, 100, 45, 135, 0 )" />

<param name = "Line0007"; value = "Pie( 100, -100, 150, 150, 90, 120, 0 )" />

<param name = "Line0008"; value = "Polygon(5, 0, 0, 10, 20, 0, -30,-10, -10, -10, 25)" />

<param name = "Line0009"; value = "Rect( -185, 0, 60, 30, 25 )" />

<param name = "Line0010"; value = "RoundRect( 200, 100, 35, 60, 10, 10, 25 )" />

<param name = "Line0011"; value = "SetFont( 'Arial', 65, 400, 0, 0, 0 )" />

<param name = "Line0012"; value = "Text( 'Shapes', -200, 200 , -35 )" />

<param name = "Line0013"; value = "SetLineStyle( 2,1 )" />

<param name = "Line0014"; value = "PolyLine( 5, 100, 0, 120, 175, -150, -50,-75, -75, 75, -75)"
/>

</object> </body> </html>


<html>

<head>

<title>Structured Graphics -
Translate</title>

<script type = "text/javascript">

var x = 15;

var y = 15;

var upDown = -1;

var leftRight = 1;

function start()

window.setInterval( "run()", 50 );

function run()

if ( y == -100 || y == 50 )

upDown *= -1;

if ( x == -150 || x == 100 )

leftRight *= -1;

ball.Translate( leftRight * 5, upDown * 5, 0 );

y += upDown * 5;

x += leftRight * 5;

</script>

</head>

<body onload = "start()">

<object id = "ball" style = "background-color: ffffff; width: 300; height: 200; border-style:
groove; position: absolute;" classid = "CLSID:369303C2-D7AC-11d0-89D5-00A0C90833E6">

<param name = "Line0001"; value = "SetLineStyle( 0 )" />

<param name = "Line0002"; value = "SetTextureFill( 0, 0, 'ball.gif', 0 )" />

<param name = "Line0003"; value = "Oval( 15, 15, 50, 50 )" />

</object> </body> </html>


<html>

<head>

<title>Structured Graphics - Gradients</title>

<script type = "text/javascript">

var speed = 5;

var counter = 180;

function start() {

window.setInterval( "run()", 100 );

function run() {

counter += speed;

if ( ( counter % 360 ) > 180 )

speed *= ( 5 / 4 );

if ( ( counter % 360 ) < 180 )

speed /= ( 5 / 4 );

pies. Rotate( 0, 0, speed );

</script> </head>

<body onload = "start()">

<object id = "pies" style = "background-color:blue; width: 300; height: 200;" classid =


"CLSID:369303C2-D7AC-11d0-89D5-00A0C90833E6">

<param name = "Line0001"; value = "SetFillColor( 255, 0, 0, 0, 0, 0 )" />

<param name = "Line0002"; value = "SetFillStyle( 13 )" />

<param name = "Line0003"; value = "Pie( -75, -75, 150, 150, 90, 120, 300 )" />

<param name = "Line0004"; value = "SetFillStyle( 9 )" />

<param name = "Line0005"; value = "Pie( -75, -75, 150, 150, 90, 120, 180 )" />

<param name = "Line0006"; value = "SetFillStyle( 11 )" />

<param name = "Line0007"; value = "Pie( -75, -75, 150, 150, 90, 120, 60 )" />

</object> </body> </html>


<html>

<head>

<title>Structured Graphics - Shapes</title>

<script for = "ball" event = "onclick" type ="text/javascript">

ball.SourceURL = "newoval.txt";

</script>

<script type = "text/javascript">

var x = 20;

var y = 20;

var upDown = -1;

var leftRight = 1;

function start() {

window.setInterval( "run()", 50 );

function run() {

if ( y == -100 || y == 50 )

upDown *= -1;

if ( x == -150 || x == 100 )

leftRight *= -1;

ball.Translate( leftRight * 5, upDown * 5, 0 );

y += upDown * 5;

x += leftRight *5;

</script>

</head>

<body onload = "start()">

<object id = "ball" style = "width: 300; height: 200; border-style: groove; position: absolute;
top: 10; left: 10;" classid = "clsid:369303C2-D7AC-11d0-89D5-00A0C90833E6">

<param name = "Line0001" value = "SetLineStyle(0)" />

<param name = "Line0002"; value = "SetTextureFill( 0, 0, 'ball.gif', 0 )" />

<param name = "Line0003"; value = "Oval( 20, 20, 50, 50 )" />
<param name = "MouseEventsEnabled" value = "1" />

</object>

</body>

</html>

<html>

<head>

<title>Structured Graphics - Scaling</title>

<script type = "text/javascript">

var speedX = 0;

var speedY = 0;

var speedZ = 0;

var scale = 1;

function start() {

window.setInterval( "run()", 100 );

function run() {

drawing.Rotate( speedX, speedY, speedZ );

drawing.Scale( scale, scale, scale );


}

function rotate( axis ) {

axis = ( axis ? 0 : 5 );

</script>

</head>

<body onload = "start()">

<div style = "position: absolute; top: 25; left: 220">

<input type = "button" value = "Rotate-X" onclick = "speedX = ( speedX ? 0 : 5 )" /><br />

<input type = "button" value = "Rotate-Y" onclick = "speedY = ( speedY ? 0 : 5 )" /><br />

<input type = "button" value = "Rotate-Z" onclick = "speedZ = ( speedZ ? 0 : 5 )" /><br />

<br />

<input type = "button" value = "Scale Up" onclick = "scale = ( scale * 10 / 9 )" /><br />

<input type = "button" value = "Scale Down" onclick = "scale = ( scale * 9 / 10 )" />

</div>

<object id = "drawing" style = " position: absolute; z-index: 2; width: 200; height: 300;"
classid = "CLSID:369303C2-D7AC-11d0-89D5-00A0C90833E6">

<param name = "Line0001" value = "SetFillColor( 0,0,0 )" />

<param name = "Line0002" value = "SetFillStyle( 0 )" />

<param name = "Line0003" value = "SetLineStyle( 1, 3 )" />

<param name = "Line0004" value = "Oval( -25, -100, 50, 50, 0 )" />

<param name = "Line0005" value = "PolyLine(2, 0, -50, 0, 50 )" />

<param name = "Line0006" value = "PolyLine( 3, -30, -25, 0, -15, 30, -25 )" />

<param name = "Line0007" value = "PolyLine( 3, -15, 90, 0, 50, 15, 90 )" />

<param name = "Line0008" value = "SetFillColor ( 255, 0, 0 )" />

<param name = "Line0009" value = "Oval( -15, -85, 7, 7, 0 )" />

<param name = "Line0010" value = "Oval( 5, -85, 7, 7, 0 )" />

<param name = "Line0011" value = "SetLineStyle( 1, 2 )" />

<param name = "Line0012" value = "SetLineColor( 255, 0, 0 )" />

<param name = "Line0013" value = "SetFont( 'Courier', 25, 200, 0, 0, 0 )" />

<param name = "Line0014" value = "Text( 'Hello', -35, -115 , 0 )" />
</object>

<object id = "background" style = " position:absolute; z-index: 1; width: 200; height: 300;

background-color: none" classid ="CLSID:369303C2-D7AC-11d0-89D5-00A0C90833E6">

<param name = "Line0001" value = "SetFillColor( 38, 250, 38 )" />

<param name = "Line0002" value = "Oval( -75, -125, 150, 250, 0 )" />

</object>

</body>

</html>

You might also like