I want to allow the creation of multiples raster effects, so I have to create an object instance of a Raster Effect class, what I did. But it doesn't work.
How can I achieve that please?
what I did is creating a raster effect class :
And after I tried to instanciate it in the main class :
But it asks for a Line argument, thing you don't use in your sample.
Also, the compiler says "java.lang.NoSuchMethodError: raster.mode7" that means the method probably doesn't exist. But I created this method.
What can I do to fix that please? Thanks for the answer.
How can I achieve that please?
what I did is creating a raster effect class :
Code:
public class RasterEffects {
private final Layer layer;
public RasterEffects(String rasterMode, Layer layer) {
this.rasterMode = rasterMode.toLowerCase();
this.layer = layer;
}
public void setRaster()
{
Global.tln.SetRasterCallback(this, this.rasterMode);
}
public String getRasterMode() {
return rasterMode.toLowerCase();
}
public void setRasterMode(String rasterMode) {
this.rasterMode = rasterMode.toLowerCase();
}
private String rasterMode;
public void createRaster()
{
Global.tln.SetRasterCallback(this, "mode7");
}
public void mode7(int line)
{
if(line == 24)
{
Global.tln.DisableLayer(layer.getLayerID());
}
}
}
And after I tried to instanciate it in the main class :
Code:
...
RasterEffects raster = new RasterEffects("mode7");
raster.setRaster();
...
while(Global.tln.ProcessWindow())
{
...
raster.mode7();
}
But it asks for a Line argument, thing you don't use in your sample.
Also, the compiler says "java.lang.NoSuchMethodError: raster.mode7" that means the method probably doesn't exist. But I created this method.
What can I do to fix that please? Thanks for the answer.