Package ro.sync.ecss.imagemap
Class ImageMapUtil
java.lang.Object
ro.sync.ecss.imagemap.ImageMapUtil
Image Map Utilities.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic intconvertLUToPixels(AuthorAccess authorAccess, String lu, int refWidth, int fontOfTheNodeSize) Convert lexical units sizes to pixels.static intgetFontOfNodeSize(AuthorAccess authorAccess, AuthorNode authorNode) Get the size of the node's font.static voidsetLexicalUnitEvaluatorForTests(ro.sync.ecss.css.LexicalUnitEvaluator lexicalUnitEvaluatorForTests) Not API ! Used only for tests !
-
Constructor Details
-
ImageMapUtil
public ImageMapUtil()
-
-
Method Details
-
setLexicalUnitEvaluatorForTests
public static void setLexicalUnitEvaluatorForTests(ro.sync.ecss.css.LexicalUnitEvaluator lexicalUnitEvaluatorForTests) Not API ! Used only for tests !- Parameters:
lexicalUnitEvaluatorForTests- A lexical unit evaluator to be used for computing imposed sizes or scales.
-
convertLUToPixels
public static int convertLUToPixels(AuthorAccess authorAccess, String lu, int refWidth, int fontOfTheNodeSize) Convert lexical units sizes to pixels.- Parameters:
authorAccess- The author access.lu- The lexical unit.refWidth- The reference width (the original width of the item).fontOfTheNodeSize- The size of the containing font.- Returns:
- The computed imposed size.
-
getFontOfNodeSize
Get the size of the node's font.- Parameters:
authorAccess- The author access.authorNode- The author node.- Returns:
- The size of the node's font.
-