Location: PHPKode > projects > TVEz - Media Library > tvez-0.2.1/html/shared/Graph/Axis.php
<?php

# -----------------------------------------------------------------------------
#
# The Axis class
#
# -----------------------------------------------------------------------------
#
# Copyright (C) 2004 Christian Eheim
#
# This file is part of TVEz (tvez.sourceforge.net).
#
# TVEz is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# TVEz is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with TVEz; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
#
# -----------------------------------------------------------------------------
#
# Created on 02/01/2004 by Christian Eheim (hide@address.com)
#
# LAST MODIFIED:
# $Date: 2004/02/03 00:02:17 $
# $Revision: 1.2 $
# $Author: eheim $
#
# -----------------------------------------------------------------------------

class Axis {

	var $_image;
	var $_title;
	var $_pos;
	var $_color;
	var $_font;
	var $_show;

	var $_labelStep;
	var $_labelPos;
	var $_labelFont;
	var $_labelUp;

	var $_tickSteps;
	var $_showTicks;
	var $_showGrid;

	var $_minValue;
	var $_maxValue;
	var $_longest;

	# Stat and end positions
	var $_xMin;
	var $_xMax;
	var $_yMin;
	var $_yMax;
	var $_xTitle;
	var $_yTitle;

	function Axis(&$image,$title,$pos) {
		$this->_image	= &$image;
		$this->_title	= new Text($title, 2);
		$this->_pos		= $pos;
		$this->_color	= "#000000";
		$this->_show	= true;
		$this->_tickSteps	= null;
		$this->_labels		= array();
		$this->_showTicks	= true;
		$this->_showLabels	= true;
		$this->_labelUp		= false;
		$this->_labelFont	= 1;
		$this->_minValue	= "unset";
		$this->_maxValue	= "unset";
		$this->_longest		= "unset";
	}
	function set_show($bool=true) {
		$this->_show = $bool;
	}
	function set_title($title) {
		$this->_title->set($title);
	}
	function set_font($font) {
		$this->_title->set_font($font);
	}
	function set_position($pos) {
		$this->_pos		= $pos;
	}
	function set_margin($margin) {
		$this->_title->set_margin($margin);
	}
	function set_color($color) {
		$this->_color	= $color;
		$this->_title->set_color($color);
	}
	function set_min_value($value) {
		$this->_minValue = $value;
	}
	function get_min_value() {
		return $this->_minValue;
	}
	function set_max_value($value) {
		$this->_maxValue = $value;
	}
	function get_max_value() {
		return $this->_maxValue;
	}
	function set_label_up($bool) {
		$this->_labelUp = $bool;
	}
	function set_num_ticks($num) {
		$this->_tickSteps = $num;
	}
	function get_num_ticks() {
		return $this->_tickSteps;
	}
	function set_longest($lab) {
		$this->_longest = $lab;
	}
	function set_show_grid($bool) {
		$this->_showGrid = $bool;
	}
	function set_label_font($font) {
		$this->_labelFont = $font;
	}
	function set_labels($labels) {
		$this->_labels = $labels;
	}
}

?>
Return current item: TVEz - Media Library