Class ImageClip
- java.lang.Object
-
- picasso.parser.language.ExpressionTreeNode
-
- picasso.parser.language.expressions.MultiFunction
-
- picasso.parser.language.expressions.ImageClip
-
- All Implemented Interfaces:
EvaluatableExpression
public class ImageClip extends MultiFunction
Represents the ImageClip function in the Picasso language.
-
-
Field Summary
-
Fields inherited from class picasso.parser.language.ExpressionTreeNode
gelementsToValue
-
-
Constructor Summary
Constructors Constructor Description 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
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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-
Methods inherited from class picasso.parser.language.expressions.MultiFunction
equals, getStringInput, getXExpr, getYExpr, toString
-
-
-
-
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 filenamex_coor_expr
- the x expressiony_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 interfaceEvaluatableExpression
- Specified by:
evaluate
in classExpressionTreeNode
- Parameters:
x
- the value of xy
- the value of y- Returns:
- the color from evaluating the ImageClip of the expression's parameter
-
-