Click here to Skip to main content
15,896,730 members
Articles / Web Development / ASP.NET

ImageMap.NET

Rate me:
Please Sign up or sign in to vote.
4.54/5 (21 votes)
3 Jul 20024 min read 318.9K   6.7K   102  
An ImageMap control for ASP.NET.
using System;
using System.Collections;
using System.Drawing;

namespace YDreams.FluidMapping.WebControls
{
	/// <copyright>Copyright (c) 2002 YDreams S.A.</copyright>
	/// <license>
	/// You can freely use this code as long as you don't remove the copyrigth 
	/// notice, don't remove this license notice and you don't change the namespace.
	/// Any bug fixes should be sent to antao.almada@ydreams.com
	/// </license>

	/// <summary>
	/// Represents a collection of Points.
	/// </summary>
	public class PointCollection
		: CollectionBase
	{

		/// <summary>
		/// Gets or sets the Point at the specified index.
		/// </summary>
		public Point this[int index]
		{
			get
			{
				return (Point)this.InnerList[index];
			}
			set
			{
				this.InnerList[index] = value;
			}
		}

		/// <summary>
		/// Adds an item to the PointCollection.
		/// </summary>
		/// <param name="point">The Point to add to the PointCollection.</param>
		/// <returns>The position into which the new element was inserted.</returns>
		public int Add(Point point)
		{
			return this.List.Add(point);
		}

		/// <summary>
		/// Inserts an item to the PointCollection.
		/// </summary>
		/// <param name="index">The zero-based index at which point should be inserted.</param>
		/// <param name="point">The Point to insert into the PointCollection.</param>
		public void Insert(int index, Point point)
		{
			this.List.Insert(index, point);
		}

		/// <summary>
		/// Removes the first occurrence of a Point object from the PointCollection.
		/// </summary>
		/// <param name="point"></param>
		public void Remove(Point point)
		{
			this.List.Remove(point);
		}

		/// <summary>
		/// Determines whether the PointCollection contains a specific Point.
		/// </summary>
		/// <param name="point">The Point to locate in the PointCollection.</param>
		/// <returns>true if the Point is found in the PointCollection; otherwise, false.</returns>
		public bool Contains(Point point)
		{
			return this.List.Contains(point);
		}

		/// <summary>
		/// Determines the index of a specific item in the PointCollection.
		/// </summary>
		/// <param name="point">The Point to locate in the PointCollection.</param>
		/// <returns>The index of point if found in the list; otherwise, -1.</returns>
		public int IndexOf(Point point)
		{
			return this.List.IndexOf(point);
		}
	}
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Software Developer (Senior) Farfetch
Portugal Portugal
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions