Class ImageClip

    • Constructor Detail

      • ImageClip

        public ImageClip​(StringInput filename,
                         ExpressionTreeNode x_coor_expr,
                         ExpressionTreeNode y_coor_expr)
        Create an ImageClip expression tree that takes as a parameter the given StringInput, x_expression, and y_expression
        Parameters:
        filename - the filename
        x_coor_expr - the x expression
        y_coor_expr - the y expression
    • Method Detail

      • evaluate

        public RGBColor evaluate​(double x,
                                 double y)
        Evaluates this expression at the given x,y point by evaluating the clamping of the given expressions and applying them to the image
        Specified by:
        evaluate in interface EvaluatableExpression
        Specified by:
        evaluate in class ExpressionTreeNode
        Parameters:
        x - the value of x
        y - the value of y
        Returns:
        the color from evaluating the ImageClip of the expression's parameter