summaryrefslogtreecommitdiff
path: root/framework/Web/UI/WebControls/TPolygonHotSpot.php
blob: 0c22bc7195567091503a11f31bcec22d56be77ba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<?php
/**
 * TImageMap and related class file.
 *
 * @author Qiang Xue <qiang.xue@gmail.com>
 * @link http://www.pradosoft.com/
 * @copyright Copyright &copy; 2005-2014 PradoSoft
 * @license http://www.pradosoft.com/license/
 * @package System.Web.UI.WebControls
 */

/**
 * Class TPolygonHotSpot.
 *
 * TPolygonHotSpot defines a polygon hot spot region in a {@link
 * TImageMap} control.
 *
 * @author Qiang Xue <qiang.xue@gmail.com>
 * @package System.Web.UI.WebControls
 * @since 3.0
 */
class TPolygonHotSpot extends THotSpot
{
	/**
	 * @return string shape of this hotspot.
	 */
	public function getShape()
	{
		return 'poly';
	}

	/**
	 * @return string coordinates of the vertices defining the polygon.
	 * Coordinates are concatenated together with comma ','. Each pair
	 * represents (x,y) of a vertex.
	 */
	public function getCoordinates()
	{
		return $this->getViewState('Coordinates','');
	}

	/**
	 * @param string coordinates of the vertices defining the polygon.
	 * Coordinates are concatenated together with comma ','. Each pair
	 * represents (x,y) of a vertex.
	 */
	public function setCoordinates($value)
	{
		$this->setViewState('Coordinates',$value,'');
	}
}