Monday, 9 March 2015

DEFINING A POLYGON

Figure 7.21 shows the x, y coordinates of a polygon region. These values are based on their positions from the upper – left corner of the image, which is coordinate 0,0. the first. Number in the coordinate pair indicates the X value and defines the number of pixels from the extreme left of the image. The second number in the pair indicates the y measurement and defines the number of pixels from the top the image.

NOTE

The 0,0 origin is in the upper = left corner of the image, and positive y is down. 

Getting the coordinates for a polygon.

Defining a circle

Figure 7.22 shows how to get the coordinates for circles. Here you note the coordinates for the centre point of the circle and  the radius, in pixels. The center point of the circle is defined as they x, y coordinate from the upper – corner of the image.

Defining rectangle

Figure 7.23 shows how to obtain coordinates for rectangle regions. Note the x, y coordinates for the upper – left and lower – right corners of the rectangle.

The <map> and <area> tags.

If you’re creating your image map manually and you’ve written down all off the coordinates for your regions and the URLs they’ll point to, you can include this information in the client – side image map tags on a web page. To include a client – side image map inside a \n HTML document, use the<map> tag, which looks like the following:

No comments:

Post a Comment