()
| 1056 | } |
| 1057 | |
| 1058 | void setPixel() { |
| 1059 | interp.getLeftParen(); |
| 1060 | int a1 = (int)interp.getExpression(); |
| 1061 | interp.getComma(); |
| 1062 | double a2 = interp.getExpression(); |
| 1063 | interp.getToken(); |
| 1064 | ImageProcessor ip = getProcessor(); |
| 1065 | if (interp.token==',') { |
| 1066 | double a3 = interp.getExpression(); |
| 1067 | interp.getRightParen(); |
| 1068 | if (ip instanceof FloatProcessor) |
| 1069 | ip.putPixelValue(a1, (int)a2, a3); |
| 1070 | else |
| 1071 | ip.putPixel(a1, (int)a2, (int)a3); |
| 1072 | } else { |
| 1073 | if (interp.token!=')') interp.error("')' expected"); |
| 1074 | if (ip instanceof ColorProcessor) |
| 1075 | ip.set(a1, (int)a2); |
| 1076 | else |
| 1077 | ip.setf(a1, (float)a2); |
| 1078 | } |
| 1079 | updateNeeded = true; |
| 1080 | } |
| 1081 | |
| 1082 | double getPixel() { |
| 1083 | interp.getLeftParen(); |
no test coverage detected