Class ImageMapUtil


  • @API(type=NOT_EXTENDABLE,
         src=PRIVATE)
    public class ImageMapUtil
    extends java.lang.Object
    Image Map Utilities.
    • Constructor Summary

      Constructors 
      Constructor Description
      ImageMapUtil()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static int convertLUToPixels​(AuthorAccess authorAccess, java.lang.String lu, int refWidth, int fontOfTheNodeSize)
      Convert lexical units sizes to pixels.
      static int getFontOfNodeSize​(AuthorAccess authorAccess, AuthorNode authorNode)
      Get the size of the node's font.
      static void setLexicalUnitEvaluatorForTests​(ro.sync.ecss.css.LexicalUnitEvaluator lexicalUnitEvaluatorForTests)
      Not API ! Used only for tests !
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ImageMapUtil

        public ImageMapUtil()
    • Method Detail

      • 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,
                                            java.lang.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

        public static int getFontOfNodeSize​(AuthorAccess authorAccess,
                                            AuthorNode authorNode)
        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.