# ChartLineStyle.class.php

Go to the documentation of this file.

    00001 <?php
    00002 /***************************************************************************
    00003  *   Copyright (C) 2009 by Denis M. Gabaidulin                             *
    00004  *                                                                         *
    00005  *   This program is free software; you can redistribute it and/or modify  *
    00006  *   it under the terms of the GNU Lesser General Public License as        *
    00007  *   published by the Free Software Foundation; either version 3 of the    *
    00008  *   License, or (at your option) any later version.                       *
    00009  *                                                                         *
    00010  ***************************************************************************/
    00011
    00015     final class ChartLineStyle
    00016     {
    00017         private $thickness          = 1;
    00018         private $lineSegmentLength  = 1;
    00019         private $blankSegmentLength = 0;
    00020
    00024         public static function create()
    00025         {
    00026             return new self;
    00027         }
    00028
    00032         public function setThickness($size)
    00033         {
    00034             $this->thickness = $size;
    00035
    00036             return $this;
    00037         }
    00038
    00039         public function getThickness()
    00040         {
    00041             return $this->thickness;
    00042         }
    00043
    00047         public function setLineSegmentLength($length)
    00048         {
    00049             $this->lineSegmentLength = $length;
    00050
    00051             return $this;
    00052         }
    00053
    00054         public function getLineSegmentLength()
    00055         {
    00056             return $this->lineSegmentLength;
    00057         }
    00058
    00062         public function setBlankSegmentLength($length)
    00063         {
    00064             $this->blankSegmentLength = $length;
    00065
    00066             return $this;
    00067         }
    00068
    00069         public function getBlankSegmentLength()
    00070         {
    00071             return $this->blankSegmentLength;
    00072         }
    00073
    00074         public function toString()
    00075         {
    00076             return
    00077                 $this->thickness
    00078                 .','.$this->lineSegmentLength
    00079                 .','.$this->blankSegmentLength;
    00080         }
    00081     }
    00082 ?>