Class PstricksUtilities

    • Constructor Detail

      • PstricksUtilities

        public PstricksUtilities()
    • Method Detail

      • getPsTricksColorName

        public static java.lang.String getPsTricksColorName​(java.awt.Color c)
        Returns PsTricks's colour name from the given Color object; a null String if none matches (in which case the caller might define a new colour by using a \\newrgbcolor or a \\newgray command...)
      • getPsTricksColor

        public static java.awt.Color getPsTricksColor​(java.lang.String name)
        Returns a Color object corresponding to the given PsTricks's colour name ; a null Color if none matches (in which case the caller might look up a table of user-defined colours to see if one matches)
      • toPstricksString

        public static java.lang.String toPstricksString​(Arrow arrow,
                                                        boolean rightArrow)
        Returns a String representing the given Arrow in the PsTricks syntax, e.g. ">" or "(" (or "" for NONE)
        Parameters:
        rightArrow - if TRUE, returns the String representation of this Arrow if it's a right-arrow ; otherwise, returns the left-arrow string.
      • createPstricksStringFromArrows

        public static java.lang.StringBuffer createPstricksStringFromArrows​(Element obj)
        Returns:
        PsTricks's arrow string for the given Element (e.g. "{<->}") with parenthesis included.
      • createArrowsFromPstricksString

        public static Arrow[] createArrowsFromPstricksString​(java.lang.String str)
        Returns:
        an array containing two Arrows corresponding to the given PsTricks string (e.g. "-" or "<-" or ">>->" ...), left arrow first.
      • main

        public static void main​(java.lang.String[] arg)
        Test