Documentation API of the 'jhplot.shapes.HShape' Java class
HShape
jhplot.shapes

Class HShape

    • Constructor Detail

      • HShape

        public HShape(double X1,              double Y1,              double X2,              double Y2,              Stroke stroke,              Color color)
        Build a primitive
        Parameters:
        X1 - X start position
        Y1 - Y start position
        X2 - X end position
        Y2 - Y end position
        stroke - Stroke type for line
        color - Color
      • HShape

        public HShape()
        Build a default primitive
      • HShape

        public HShape(double X1,              double Y1,              double X2,              double Y2)
        Build a primitive using the default color and stroke
        Parameters:
        X1 - X start position
        Y1 - Y start position
        X2 - X end position
        Y2 - Y end position
      • HShape

        public HShape(double[] XX,              double[] YY,              Stroke strock,              Color color)
        Build a primitive using polyline. Not yet done
        Parameters:
        XX -
        YY -
        strock -
        color -
    • Method Detail

      • getPosition

        public double[] getPosition()
        Get position of a primitive
        Returns:
        double[] positions
      • setRotation

        public void setRotation(double theta)
        Rotate the shape or text. The rotation angle is defined in radians.
        Parameters:
        theta - rotaion angle for the object (in rad).
      • getRotation

        public double getRotation()
        Get rotation angle theta.
        Returns:
        get rotation angle theta (rad).
      • getScaledPosition

        public double[] getScaledPosition(double Xscale,                                  double Yscale)
        Scale the positions
        Parameters:
        Xscale -
        Yscale -
        Returns:
        Scale
      • setColor

        public void setColor(Color c)
        Sets the color to a specific value
        Parameters:
        c - color used to draw the label
      • getColor

        public Color getColor()
        Get a color of the primitive
        Returns:
        Color
      • getStroke

        public Stroke getStroke()
        Get the Stroke to a specific value
        Returns:
        the Stroke used to draw
      • setStroke

        public void setStroke(Stroke stroke)
        Set the Stroke to a specific value
      • setFill

        public void setFill(boolean fill)
        Fill a primitive
        Parameters:
        fill - true if it is filled
      • getFill

        public boolean getFill()
        Is this primitive filled?
        Returns:
        true if it filled
      • contains

        public boolean contains(double Xm,                        double Ym)
      • getTransparency

        public Float getTransparency()
        Get the transparency level
        Returns:
        the transparency level (0-1)
      • setTransparency

        public void setTransparency(double trans)
        Get the transparency level
        Parameters:
        trans - the transparency level (0-1)
      • getPositionCoordinate

        public int getPositionCoordinate()
        Is the position set?
        Returns:
        0 if location is not defined 1 if the position is defined in the NDC system 2 if the location is defined in the user coordinates
      • setPositionCoordinate

        public void setPositionCoordinate(int usePosition)
        How to set the position of this object?
        Parameters:
        0 - if location is not defined 1 if the position is defined in the NDC system 2 if the location is defined in the USER coordinates
      • setPosCoord

        public void setPosCoord(String howToSet)
        Set the style of the coodinate position
        Parameters:
        howToSet - set it to "NDC" for normilized coordinates (in the range 0-1). This is a data independent position. Set it to "USER" for the user coordinates
      • setDashed

        public void setDashed(double thikness)
        Set dashed line
        Parameters:
        thikness -
      • setDotted

        public void setDotted(double thikness)
        Set dotted line
        Parameters:
        thikness -
      • getSettings

        public void getSettings(jplot.XMLWrite xw)
        Returns the settings of the primitive in a XML instance.
        Parameters:
        xw - instance of the class containing the settings.
      • updateSettings

        public void updateSettings(jplot.XMLRead xr)
        Update the current primitive with the settings. These settings are formatted in XML and stored in an XMLRead instance.
        Parameters:
        xr - instance of the reader class, containing the settings.
      • setWhoAm

        public void setWhoAm(int whoAm)
        Set primitive type
        Parameters:
        whoAm - Primitive types
      • getWhoAm

        public int getWhoAm()
        Primitive type
        Returns:
        Primitive types

SCaVis 2.2 © jWork.ORG

Warning: You see this message because an access to the SCaVis documentation for third-party Java classes is denied. Guests can only view jhplot Java API. To enable the description of all Java classes of SCaVis, please request the full SCaVis membership.

If you are already a full member, please login to the SCaVis member area before visiting this documentation.