Skip to content

Commit

Permalink
Add PixmapEmu(Gdx2DPixmapEmu) constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
xpenatan committed Jan 20, 2025
1 parent bfca256 commit 2667eb0
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.files.FileHandle;
import com.badlogic.gdx.graphics.g2d.Gdx2DPixmap;
import com.badlogic.gdx.graphics.g2d.Gdx2DPixmapEmu;
import com.badlogic.gdx.utils.BufferUtils;
import com.badlogic.gdx.utils.Disposable;
Expand Down Expand Up @@ -125,6 +126,10 @@ public PixmapEmu(int width, int height, FormatEmu format) {
fill();
}

public PixmapEmu (Gdx2DPixmapEmu pixmap) {
nativePixmap = pixmap;
}

private ByteBuffer getNewBuffer() {
if(nativePixmap != null) {
Uint8ArrayWrapper nativePixels = nativePixmap.getPixels(true);
Expand Down

0 comments on commit 2667eb0

Please sign in to comment.