1<?php 2 3require_once dirname(__FILE__).'/Color.php'; 4 5class ScaleStyle { 6 /** 7 * @todo The color, lineWidth and lineDotSize variables could all 8 * be combined into a single LineStyle class 9 */ 10 public function __construct($scaleMode, Color $color, $drawTicks = true, $lineWidth = 1, $lineDotSize = 0) { 11 $this->scaleMode = $scaleMode; 12 $this->color = $color; 13 $this->drawTicks = $drawTicks; 14 $this->lineWidth = $lineWidth; 15 $this->lineDotSize = $lineDotSize; 16 } 17 18 static public function DefaultStyle() { 19 return new ScaleStyle(SCALE_NORMAL, 20 new Color(150, 150, 150)); 21 } 22 23 public function getScaleMode() { 24 return $this->scaleMode; 25 } 26 27 public function getColor() { 28 return $this->color; 29 } 30 31 public function getDrawTicks() { 32 return $this->drawTicks; 33 } 34 35 public function getLineWidth() { 36 return $this->lineWidth; 37 } 38 39 public function getLineDotSize() { 40 return $this->lineDotSize; 41 } 42 43 private $scaleMode; 44 45 private $color; 46 47 private $drawTicks; 48 49 private $lineWidth; 50 51 private $lineDotSize; 52}