Login   Register  
PHP Classes
elePHPant
Icontem

File: editBitmap.class.php.test.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Uku-Kaarel Jo~esaar  >  Edit Bitmap  >  editBitmap.class.php.test.php  >  Download  
File: editBitmap.class.php.test.php
Role: Example script
Content type: text/plain
Description: demo and test
Class: Edit Bitmap
Manipulate bit sets stored in strings
Author: By
Last change:
Date: 2006-10-22 10:36
Size: 1,641 bytes
 

Contents

Class file image Download
<?php
{
include 
'./editBitmap.class.php';

// This is container string
$bm=chr(0).chr(0).chr(0);

$bo=new bitmape;
$bo->load($bm);

}
?>


<html dir="ltr">

<head>
<meta http-equiv="Content-Type"
content="text/html; charset=windows-1257">
<title>editBitmap.class.php.test.php</title>
</head>

<body bgcolor="#FFFFFF" text="#000000" link="#0000FF"
vlink="#0000FF" alink="#FF0000" topmargin="5" leftmargin="5">

<h1>editBitmap.class.php.test.php</h1>

<table border="0">
    <tr>
        <td>
<?php
{
$bo->set(0,1);
$bo->set(1,1);
$bo->set(7,1);
$bo->toggle(8);
$bo->toggle(15); $bo->toggle(15);
$bo->set(16,1);

//%%%%%%%%%%%%%%%%%%%%%%%%%%%%

echo "\n<b>get()</b>: qualified value and output <br />\n";
echo 
' 1= '$bo->get(0) ."<br />\n";
echo 
' 1= '$bo->get(1) ."<br />\n";
echo 
' 1= '$bo->get(7) ."<br />\n";

echo 
' 0= '$bo->get(8) ."<br />\n";
echo 
' 0= '$bo->get(15) ."<br />\n";
echo 
' 1= '$bo->get(16) ."<br />\n";

//%%%%%%%%%%%%%%%%%%%%%%%%%%%%

echo "\n<b>compare()</b>: comparable value, and output <br />\n";
echo 
' 1 vs 1= ' . (int) $bo->compare(0,1) ."<br />\n";
echo 
' 0 vs 1= ' . (int) $bo->compare(0,0) ."<br />\n";
echo 
' 1 vs 0= ' . (int) $bo->compare(2,1) ."<br />\n";
echo 
' 0 vs 0= ' . (int) $bo->compare(2,0) ."<br />\n";

echo 
"\n<br /><b>print_()</b>: Visual output<br />\n";
echo 
$bo->print_(true);
$bo->unload();
}
?>
        </td>
    </tr>
    <tr>
        <td bgcolor="#FFFF00"><h2>Source</h2></td>
    </tr>
    <tr>
        <td><?php echo  highlight_file(__FILE__,TRUE); ?></td>
    </tr>
</table>

<p>&nbsp;</p>
</body>
</html>