Home
Categories
Dictionary
Download
Project Details
Changes Log
What Links Here
How To
Syntax
FAQ
License

areaRef element



It is possible to add internal wiki links on portions of images using the "areaRef" element inside an "img" element. The attributes of the "areaRef" elements which specify each area are:
  • "type": the type of the active area ("rect", "circle", or "poly")
  • "coords": the coordinates of the active area. The coordinates are separated by "," (commas)
  • "id": the id of the inter-wiki reference, specified exactly as for the ref element
  • "desc": the optional alternate text for the inter-wiki reference, specified exactly as for the ref element
  • "package": the optional package for the inter-wiki reference, specified exactly as for the ref element

Overview

  • image files specify image definitions, with both their id and associated URL
  • img elements refer to these image definitions by their id
  • "arearef" elements refer to these image definitions by their id. The "id" of these elements allow to link to the element referred to by this id

arearef

coords attribute

The "coords" attribute specifies coordinates of the active area. The number of coordinates depends on the type of the area:
  • "rect": In that case, it specifies the coordinates of the rectangle specifying the active area. The coordinates are separated by "," (commas) and specify the left, top, right, bottom corner of the rectangle. Note that the Y coordinates are defined from the top (such as 0 will be the top)
  • "circle": In that case, it specifies the coordinates of the center of the circle, and its radius
  • "poly": In that case, it specifies the coordinates of the points of the polygon defining the area

The coords attribute reference coordinates relative to the size of the original image. The generator will take care of resizing the coordinates values if the img element has a with or height attribute, including for relative values.

Image map converter

Main Article: Image map converter

The ImageMapConverter.jar jar File, which is distributed with the core binaries, allows to generate the characteristics of an areaRef element.

Example

For example, the following image has two links:
   <img id="image1" width="200" >
     <areaRef id="img element#Linking on images" coords="0,0,200,100" />
     <areaRef id="syntax#img" coords="0,100,200,200" />
   </img>
Result:
image1 img element Syntax

See also


Categories: syntax

docJGenerator Copyright (c) 2016-2023 Herve Girod. All rights reserved.