Source for file Mark.class.php
Documentation is available at Mark.class.php 
 * This work is hereby released into the Public Domain.  
 * To view a copy of the public domain dedication,  
 * visit http://creativecommons.org/licenses/publicdomain/ or send a letter to  
 * Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA.  
require_once dirname(__FILE__ ). "/../Graph.class.php";  
define("MARK_INVERTED_TRIANGLE", 4);  
 * @package linea21.externals  
    const INVERTED_TRIANGLE =  4;  
     * Move position from this vector  
     * @param int $x Add this interval to X coord  
     * @param int $y Add this interval to Y coord  
    public function move($x, $y) {  
        $this->move =  $this->move->move($x, $y);  
     * @param bool $hide TRUE to hide marks, FALSE otherwise  
    public function hide($hide =  TRUE) {  
        $this->hide = (bool) $hide;  
    public function show($show =  TRUE) {  
        $this->hide = (bool) !$show;  
     * @param int $size Size in pixels  
        $this->size = (int) $size;  
     * @param int $type New mark type  
     * @param int $size Mark size (can be NULL)  
    public function setType($type, $size =  NULL) {  
        $this->type = (int) $type;  
     * Fill the mark with a color or a gradient  
     * @param mixed $fill A color or a gradient  
     * Only for awMark::IMAGE type.  
    public function setImage(awImage $image) {  
     * @param awDriver $driver   
     * @param awPoint $point Mark center  
    public function draw(awDriver $driver, awPoint $point) {  
        // Check if we can print marks  
        if($this->type !==  NULL) {  
            $realPoint =  $this->move->move($point->x, $point->y);  
                case awMark::INVERTED_TRIANGLE :   
                    $this->draw($driver, $point);  
                    $this->draw($driver, $point);  
                    $this->draw($driver, $point);  
        list ($x, $y) =  $point->getLocation(); 
        $x1 = (int) ($x -  $this->size /  2);  
        $y1 = (int) ($y -  $this->size /  2);  
        $size =  $this->border->visible() ?  1 :  0;  
        $this->driver->filledRectangle(  
                new awPoint($x1 +  $size, $y1 +  $size),  
                new awPoint($x2 -  $size, $y2 -  $size)  
    protected function drawTriangle(awPoint $point, $inverted =  FALSE) {  
        list ($x, $y) =  $point->getLocation(); 
        // Set default style and thickness  
        $triangle->setThickness(1);  
            // Bottom of the triangle  
            $triangle->append(new awPoint($x, $y +  $size /  sqrt(3)));  
            $triangle->append(new awPoint($x -  $size /  2, $y -  $size /  (2 *  sqrt(3))));  
            $triangle->append(new awPoint($x +  $size /  2, $y -  $size /  (2 *  sqrt(3))));  
            $triangle->append(new awPoint($x, $y -  $size /  sqrt(3)));  
            $triangle->append(new awPoint($x -  $size /  2, $y +  $size /  (2 *  sqrt(3))));  
            $triangle->append(new awPoint($x +  $size /  2, $y +  $size /  (2 *  sqrt(3))));  
        $this->driver->filledPolygon($this->fill, $triangle);  
        if($this->border->visible()) {              
        list ($x, $y) =  $point->getLocation(); 
        // Set default style and thickness  
        $rhombus->setThickness(1);  
        $rhombus->append(new awPoint($x, $y -  $this->size /  2));  
        $rhombus->append(new awPoint($x +  $this->size /  2, $y));  
        $rhombus->append(new awPoint($x, $y +  $this->size /  2));  
        $rhombus->append(new awPoint($x -  $this->size /  2, $y));  
        $this->driver->filledPolygon($this->fill, $rhombus);  
        if($this->border->visible()) {              
    protected function drawCross(awPoint $point, $upright =  FALSE) {  
        list ($x, $y) =  $point->getLocation(); 
            $y11 = (int) ($y -  $this->size /  2);  
            $y12 = (int) ($y +  $this->size /  2);  
            $x11 = (int) ($x -  $this->size /  2);  
            $y11 = (int) ($y +  $this->size /  2);  
            $x12 = (int) ($x +  $this->size /  2);  
            $y12 = (int) ($y -  $this->size /  2);  
            $y21 = (int) ($y -  $this->size /  2);  
            $y22 = (int) ($y +  $this->size /  2);  
        $x21 = (int) ($x -  $this->size /  2);  
        $x22 = (int) ($x +  $this->size /  2);  
    protected function drawImage(awPoint $point) {  
            $width =  $this->image->width;  
            $height =  $this->image->height;  
            list ($x, $y) =  $point->getLocation(); 
            $x1 = (int) ($x -  $width /  2);  
            $y1 = (int) ($y -  $width /  2);  
 
 
        
       |