Login   Register  
PHP Classes
elePHPant
Icontem

File: example2.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Alex Lau  >  CRoundCorner  >  example2.php  >  Download  
File: example2.php
Role: Example script
Content type: text/plain
Description: example of using command line to generate
Class: CRoundCorner
Generate rounded corner images
Author: By
Last change:
Date: 6 years ago
Size: 542 bytes
 

Contents

Class file image Download
<?php
/*
command line usage:
php example2.php corner color radius output
e.g.
php example2.php tl 0000FF 10 a.png
php example2.php bl 00FF00 20 b.png
*/
include("roundcorner.php");

switch (
$argv[1]){
    case 
"tl":
        
$corner CRoundCorner::CORNER_TL;
    break;
    case 
"tr":
        
$corner CRoundCorner::CORNER_TR;
    break;
    case 
"bl":
        
$corner CRoundCorner::CORNER_BL;
    break;
    case 
"BR":
        
$corner CRoundCorner::CORNER_BR;
    break;
}
$test = new CRoundCorner($corner$argv[2], CRoundCorner::TRANSPARENT$argv[3]);
$test->drawFile($argv[4]);
?>