Class XHTMLWebappImageMapSupport
- java.lang.Object
-
- ro.sync.ecss.extensions.xhtml.imagemap.XHTMLWebappImageMapSupport
-
- All Implemented Interfaces:
WebappImageMapSupport
@API(type=INTERNAL, src=PUBLIC) public class XHTMLWebappImageMapSupport extends java.lang.Object implements WebappImageMapSupport
Image map support for XHTML.
-
-
Constructor Summary
Constructors Constructor Description XHTMLWebappImageMapSupport(AuthorElement map)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<WebappAreaView>
getAreas(int fontSize)
java.util.Optional<Rectangle>
getImageSize(int fontSize)
The image size, as specified by XML attributes.
-
-
-
Constructor Detail
-
XHTMLWebappImageMapSupport
public XHTMLWebappImageMapSupport(AuthorElement map) throws ImageMapFormatException
- Parameters:
map
- The- Throws:
ImageMapFormatException
- If the image map does not have the correct format.
-
-
Method Detail
-
getAreas
public java.util.List<WebappAreaView> getAreas(int fontSize)
- Specified by:
getAreas
in interfaceWebappImageMapSupport
- Parameters:
fontSize
- The font size of the image.- Returns:
- The list of area views in the order that needs to be stacked vertically.
- See Also:
WebappImageMapSupport.getAreas(int)
-
getImageSize
public java.util.Optional<Rectangle> getImageSize(int fontSize)
Description copied from interface:WebappImageMapSupport
The image size, as specified by XML attributes. If the image size is not specified by XML attributes, the editor will determine it based on the natural size of the image file.- Specified by:
getImageSize
in interfaceWebappImageMapSupport
- Parameters:
fontSize
- The font size of the image map.- Returns:
- A rectangle centered in origin with width and height equal to those of the image, or empty.
- See Also:
WebappImageMapSupport.getImageSize(int)
-
-