Пример #1
0
 /**
  * Init the drawing of the component
  */
 public function init(awDriver $driver)
 {
     // Set component background
     $background = $this->getBackground();
     if ($background !== NULL) {
         $p1 = new awPoint(0, 0);
         $p2 = new awPoint($this->w - 1, $this->h - 1);
         if ($background instanceof awImage) {
             $driver->copyImage($background, $p1, $p2);
         } else {
             $driver->filledRectangle($background, new awLine($p1, $p2));
         }
     }
 }