======[PHP] Text Box Class====== =====Benötigte Module===== * [[FontClass]] =====Mögliche Anwendung===== * [[FontClassSignatur]] =====Code===== initialized = true; $this->recalc(); } catch (Exception $e){ throw $e; } } /** * Neuberechnung des images und der entsprechenden massen * @return $box => array(xSize, ySize) */ public function recalc(){ try{ if($this->initialized == false) return NULL; $box = parent::getImage($this->image); $this->xSize = $box['xSize']; $this->ySize = $box['ySize']; return $box; } catch (Exception $e){ throw $e; } } /** * Das TestImage in das Zielimage kopieren * @param $destImage */ public function copyIntoImage(&$destImage){ try{ imagecopy($destImage, $this->image, $this->dstX, $this->dstY, $this->srcX, $this->srcY , $this->xSize ,$this->ySize); } catch (Exception $e){ throw $e; } } /** * Magic Function __set for all properties * @access public * @param String name * @param String value */ public function __set($name, $value){ try{ parent::__set($name, $value); //nach dem Ändern von Eigenschaften neu berechnen $this->recalc(); } catch (Exception $e){ throw $e; } } /** * destruct */ public function __destruct(){ imagedestroy($this->image); } } ?>