コード例 #1
0
 /**
  * Set a predefined model for the legend
  *
  * @param int $model
  */
 public function setModel($model)
 {
     $this->setBackgroundColor(new awColor(255, 255, 255, 15));
     $this->setPadding(8, 8, 8, 8);
     $this->setTextFont(new awFont2());
     $this->shadow->setSize(3);
     switch ($model) {
         case awLegend::MODEL_RIGHT:
             $this->setColumns(1);
             $this->setAlign(awLegend::RIGHT, awLegend::MIDDLE);
             $this->setPosition(0.96, 0.5);
             break;
         case awLegend::MODEL_BOTTOM:
             $this->setRows(1);
             $this->setAlign(awLegend::CENTER, awLegend::TOP);
             $this->setPosition(0.5, 0.92);
             break;
         default:
             $this->setPosition(0.5, 0.5);
             break;
     }
 }
コード例 #2
0
ファイル: Legend.class.php プロジェクト: remyyounes/dolibarr
	/**
	 * Set a predefined model for the legend
	 *
	 * @param int $model
	 */
	 function setModel($model) {
		
		$this->setBackgroundColor(new awColor(255, 255, 255, 15));
		$this->setPadding(8, 8, 8, 8);
		$this->setTextFont(new awFont2);
		$this->shadow->setSize(3);
	
		switch($model) {
		
			case LEGEND_MODEL_RIGHT :
			
				$this->setColumns(1);
				$this->setAlign(LEGEND_RIGHT, LEGEND_MIDDLE);
				$this->setPosition(0.96, 0.50);
			
				break;
		
			case LEGEND_MODEL_BOTTOM :
			
				$this->setRows(1);
				$this->setAlign(LEGEND_CENTER, LEGEND_TOP);
				$this->setPosition(0.50, 0.92);
			
				break;
				
			default :
			
				$this->setPosition(0.5, 0.5);
				
				break;
		
		}
	
	}