こんにちは、私はこのエラーを受け取り続けています: エラー: メソッド BlendRectWithWhite(int, int, int, int, int) は、型 BlendablePic に対して未定義です
これが両方のコーディングです。他のフォーラムの投稿を見て、何をすべきかについて混乱しています。ありがとう!
import java.awt.Color;
public class IHateCompScience
{
public static void main(String[] args)
{
FileChooser.pickMediaPath();
BlendablePic pRef = new BlendablePic(FileChooser.pickAFile());
pRef.BlendRectWithWhite(0, 0, 300, 300, 2);
pRef.explore();
}}
public class BlendablePic extends Picture{
public BlendablePic(String filename){
super(filename);
}
public void blendRectWithWhite(int xMin, int yMin, int xMax, int yMax, double a)
{
int x;
x = xMin;
while (x<= xMax)
{
int y;
y = yMin;
while(y <= yMax)
{
Pixel refPix = this.getPixel(x,y);
refPix.setRed((int)Math.round(refPix.getRed() * (1.0 +a)+255*a));
refPix.setGreen((int)Math.round(refPix.getGreen() * (1.0 +a)+255*a));
refPix.setBlue((int)Math.round(refPix.getBlue() * (1.0 +a)+255*a));
y= y+1;
}
x = x+1;
}}