mirror of
https://gitlab.com/2009scape/rt4-client.git
synced 2025-12-18 12:30:21 -07:00
Refactored some buffering classes
This commit is contained in:
parent
38800991cb
commit
e79d5ddee8
29 changed files with 391 additions and 391 deletions
|
|
@ -16,34 +16,34 @@ import org.openrs2.deob.annotation.Pc;
|
|||
public final class BufferedImageFrameBuffer extends FrameBuffer {
|
||||
|
||||
@OriginalMember(owner = "client!ti", name = "p", descriptor = "Ljava/awt/Component;")
|
||||
private Component aComponent1;
|
||||
private Component component;
|
||||
|
||||
@OriginalMember(owner = "client!ti", name = "a", descriptor = "(IILjava/awt/Graphics;I)V")
|
||||
@Override
|
||||
public final void method4186(@OriginalArg(2) Graphics arg0) {
|
||||
arg0.drawImage(this.anImage4, 0, 0, this.aComponent1);
|
||||
public final void draw(@OriginalArg(2) Graphics graphics) {
|
||||
graphics.drawImage(this.image, 0, 0, this.component);
|
||||
}
|
||||
|
||||
@OriginalMember(owner = "client!ti", name = "a", descriptor = "(IZILjava/awt/Component;)V")
|
||||
@Override
|
||||
public final void method4192(@OriginalArg(0) int arg0, @OriginalArg(2) int arg1, @OriginalArg(3) Component arg2) {
|
||||
this.anIntArray472 = new int[arg1 * arg0 + 1];
|
||||
this.anInt5339 = arg0;
|
||||
this.anInt5341 = arg1;
|
||||
@Pc(22) DataBufferInt local22 = new DataBufferInt(this.anIntArray472, this.anIntArray472.length);
|
||||
@Pc(30) DirectColorModel local30 = new DirectColorModel(32, 16711680, 65280, 255);
|
||||
@Pc(40) WritableRaster local40 = Raster.createWritableRaster(local30.createCompatibleSampleModel(this.anInt5341, this.anInt5339), local22, null);
|
||||
this.anImage4 = new BufferedImage(local30, local40, false, new Hashtable());
|
||||
this.aComponent1 = arg2;
|
||||
this.method4189();
|
||||
public final void init(@OriginalArg(0) int height, @OriginalArg(2) int width, @OriginalArg(3) Component component) {
|
||||
this.pixels = new int[width * height + 1];
|
||||
this.height = height;
|
||||
this.width = width;
|
||||
@Pc(22) DataBufferInt buffer = new DataBufferInt(this.pixels, this.pixels.length);
|
||||
@Pc(30) DirectColorModel model = new DirectColorModel(32, 16711680, 65280, 255);
|
||||
@Pc(40) WritableRaster raster = Raster.createWritableRaster(model.createCompatibleSampleModel(this.width, this.height), buffer, null);
|
||||
this.image = new BufferedImage(model, raster, false, new Hashtable());
|
||||
this.component = component;
|
||||
this.makeTarget();
|
||||
}
|
||||
|
||||
@OriginalMember(owner = "client!ti", name = "a", descriptor = "(IIIILjava/awt/Graphics;I)V")
|
||||
@Override
|
||||
public final void method4191(@OriginalArg(0) int arg0, @OriginalArg(1) int arg1, @OriginalArg(3) int arg2, @OriginalArg(4) Graphics arg3, @OriginalArg(5) int arg4) {
|
||||
@Pc(2) Shape local2 = arg3.getClip();
|
||||
arg3.clipRect(arg1, arg4, arg0, arg2);
|
||||
arg3.drawImage(this.anImage4, 0, 0, this.aComponent1);
|
||||
arg3.setClip(local2);
|
||||
public final void method4191(@OriginalArg(0) int width, @OriginalArg(1) int x, @OriginalArg(3) int height, @OriginalArg(4) Graphics graphics, @OriginalArg(5) int y) {
|
||||
@Pc(2) Shape clip = graphics.getClip();
|
||||
graphics.clipRect(x, y, width, height);
|
||||
graphics.drawImage(this.image, 0, 0, this.component);
|
||||
graphics.setClip(clip);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue