[ Index ] |
|
Code source de phpMyVisites 2.3 |
1 <?php 2 /* 3 * This work is hereby released into the Public Domain. 4 * To view a copy of the public domain dedication, 5 * visit http://creativecommons.org/licenses/publicdomain/ or send a letter to 6 * Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA. 7 * 8 */ 9 10 11 12 /** 13 * Create your gradients 14 * 15 * @package Artichow 16 */ 17 abstract class awGradient { 18 19 /** 20 * From color 21 * 22 * @var Color 23 */ 24 public $from; 25 26 /** 27 * To color 28 * 29 * @var Color 30 */ 31 public $to; 32 33 /** 34 * Build the gradient 35 * 36 * @param awColor $from From color 37 * @param awColor $to To color 38 */ 39 public function __construct($from, $to) { 40 41 $this->from = $from; 42 $this->to = $to; 43 44 } 45 46 /** 47 * Free memory used by the colors of the gradient 48 */ 49 public function free() { 50 51 $this->from->free(); 52 $this->to->free(); 53 54 } 55 56 public function __destruct( ){ 57 58 $this->free(); 59 60 } 61 62 } 63 64 registerClass('Gradient', TRUE); 65 66 67 /** 68 * Create a linear gradient 69 * 70 * @package Artichow 71 */ 72 class awLinearGradient extends awGradient { 73 74 /** 75 * Gradient angle 76 * 77 * @var int 78 */ 79 public $angle; 80 81 /** 82 * Build the linear gradient 83 * 84 * @param awColor $from From color 85 * @param awColor $to To color 86 * @param int $angle Gradient angle 87 */ 88 public function __construct($from, $to, $angle) { 89 90 parent::__construct( 91 $from, $to 92 ); 93 94 $this->angle = $angle; 95 96 } 97 98 } 99 100 registerClass('LinearGradient'); 101 102 103 /** 104 * Create a bilinear gradient 105 * 106 * @package Artichow 107 */ 108 class awBilinearGradient extends awLinearGradient { 109 110 /** 111 * Gradient center 112 * 113 * @var int Center between 0 and 1 114 */ 115 public $center; 116 117 /** 118 * Build the bilinear gradient 119 * 120 * @param awColor $from From color 121 * @param awColor $to To color 122 * @param int $angle Gradient angle 123 * @param int $center Gradient center 124 */ 125 public function __construct($from, $to, $angle, $center = 0.5) { 126 127 parent::__construct( 128 $from, $to, $angle 129 ); 130 131 $this->center = $center; 132 133 } 134 135 } 136 137 registerClass('BilinearGradient'); 138 139 /** 140 * Create a radial gradient 141 * 142 * @package Artichow 143 */ 144 class awRadialGradient extends awGradient { 145 146 } 147 148 registerClass('RadialGradient'); 149 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Mon Nov 26 14:10:01 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |