Package com.mojang.blaze3d.platform
Class NativeImage
java.lang.Object
com.mojang.blaze3d.platform.NativeImage
- All Implemented Interfaces:
AutoCloseable
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static class
(package private) static class
-
Field Summary
Modifier and TypeFieldDescriptionprivate NativeImage.Format
private int
private static org.apache.logging.log4j.Logger
private static int
private static int
private static int
private static int
private static Set<StandardOpenOption>
private long
private long
private boolean
private int
-
Constructor Summary
ModifierConstructorDescriptionNativeImage(int p_84968_, int p_84969_, boolean p_84970_)
NativeImage(NativeImage.Format p_84972_, int p_84973_, int p_84974_, boolean p_84975_)
private
NativeImage(NativeImage.Format p_84977_, int p_84978_, int p_84979_, boolean p_84980_, long p_84981_)
-
Method Summary
Modifier and TypeMethodDescriptionprivate void
_upload(int p_85091_, int p_85092_, int p_85093_, int p_85094_, int p_85095_, int p_85096_, int p_85097_, boolean p_85098_, boolean p_85099_, boolean p_85100_, boolean p_85101_)
byte[]
void
blendPixel(int p_166412_, int p_166413_, int p_166414_)
private void
void
close()
static int
combine(int p_84993_, int p_84994_, int p_84995_, int p_84996_)
void
copyFrom(NativeImage p_85055_)
void
copyFromFont(org.lwjgl.stb.STBTTFontinfo p_85069_, int p_85070_, int p_85071_, int p_85072_, float p_85073_, float p_85074_, float p_85075_, float p_85076_, int p_85077_, int p_85078_)
void
copyRect(int p_85026_, int p_85027_, int p_85028_, int p_85029_, int p_85030_, int p_85031_, boolean p_85032_, boolean p_85033_)
void
downloadDepthBuffer(float p_166401_)
void
downloadTexture(int p_85046_, boolean p_85047_)
void
void
fillRect(int p_84998_, int p_84999_, int p_85000_, int p_85001_, int p_85002_)
void
flipY()
format()
static NativeImage
fromBase64(String p_85061_)
static int
getA(int p_84984_)
static int
getB(int p_85120_)
byte
getBlueOrLuminance(int p_166419_, int p_166420_)
static int
getG(int p_85104_)
byte
getGreenOrLuminance(int p_166416_, int p_166417_)
int
byte
getLuminanceOrAlpha(int p_85088_, int p_85089_)
int
getPixelRGBA(int p_84986_, int p_84987_)
static int
getR(int p_85086_)
byte
getRedOrLuminance(int p_166409_, int p_166410_)
int
getWidth()
private boolean
isOutsideBounds(int p_166423_, int p_166424_)
int[]
Deprecated.static NativeImage
read(NativeImage.Format p_85049_, InputStream p_85050_)
static NativeImage
read(NativeImage.Format p_85052_, ByteBuffer p_85053_)
static NativeImage
read(InputStream p_85059_)
static NativeImage
read(ByteBuffer p_85063_)
void
resizeSubRectTo(int p_85035_, int p_85036_, int p_85037_, int p_85038_, NativeImage p_85039_)
private static void
setFilter(boolean p_85082_, boolean p_85083_)
void
setPixelLuminance(int p_166403_, int p_166404_, byte p_166405_)
void
setPixelRGBA(int p_84989_, int p_84990_, int p_84991_)
toString()
void
untrack()
void
upload(int p_85041_, int p_85042_, int p_85043_, boolean p_85044_)
void
upload(int p_85004_, int p_85005_, int p_85006_, int p_85007_, int p_85008_, int p_85009_, int p_85010_, boolean p_85011_, boolean p_85012_)
void
upload(int p_85014_, int p_85015_, int p_85016_, int p_85017_, int p_85018_, int p_85019_, int p_85020_, boolean p_85021_, boolean p_85022_, boolean p_85023_, boolean p_85024_)
private boolean
writeToChannel(WritableByteChannel p_85065_)
void
writeToFile(File p_85057_)
void
writeToFile(String p_166407_)
void
writeToFile(Path p_85067_)
-
Field Details
-
LOGGER
private static final org.apache.logging.log4j.Logger LOGGER -
OFFSET_A
private static final int OFFSET_A- See Also:
- Constant Field Values
-
OFFSET_B
private static final int OFFSET_B- See Also:
- Constant Field Values
-
OFFSET_G
private static final int OFFSET_G- See Also:
- Constant Field Values
-
OFFSET_R
private static final int OFFSET_R- See Also:
- Constant Field Values
-
OPEN_OPTIONS
-
format
-
width
private final int width -
height
private final int height -
useStbFree
private final boolean useStbFree -
pixels
private long pixels -
size
private final long size
-
-
Constructor Details
-
NativeImage
public NativeImage(int p_84968_, int p_84969_, boolean p_84970_) -
NativeImage
-
NativeImage
private NativeImage(NativeImage.Format p_84977_, int p_84978_, int p_84979_, boolean p_84980_, long p_84981_)
-
-
Method Details
-
toString
-
isOutsideBounds
private boolean isOutsideBounds(int p_166423_, int p_166424_) -
read
- Throws:
IOException
-
read
public static NativeImage read(@Nullable NativeImage.Format p_85049_, InputStream p_85050_) throws IOException- Throws:
IOException
-
read
- Throws:
IOException
-
read
public static NativeImage read(@Nullable NativeImage.Format p_85052_, ByteBuffer p_85053_) throws IOException- Throws:
IOException
-
setFilter
private static void setFilter(boolean p_85082_, boolean p_85083_) -
checkAllocated
private void checkAllocated() -
close
public void close()- Specified by:
close
in interfaceAutoCloseable
-
getWidth
public int getWidth() -
getHeight
public int getHeight() -
format
-
getPixelRGBA
public int getPixelRGBA(int p_84986_, int p_84987_) -
setPixelRGBA
public void setPixelRGBA(int p_84989_, int p_84990_, int p_84991_) -
setPixelLuminance
public void setPixelLuminance(int p_166403_, int p_166404_, byte p_166405_) -
getRedOrLuminance
public byte getRedOrLuminance(int p_166409_, int p_166410_) -
getGreenOrLuminance
public byte getGreenOrLuminance(int p_166416_, int p_166417_) -
getBlueOrLuminance
public byte getBlueOrLuminance(int p_166419_, int p_166420_) -
getLuminanceOrAlpha
public byte getLuminanceOrAlpha(int p_85088_, int p_85089_) -
blendPixel
public void blendPixel(int p_166412_, int p_166413_, int p_166414_) -
makePixelArray
Deprecated. -
upload
public void upload(int p_85041_, int p_85042_, int p_85043_, boolean p_85044_) -
upload
public void upload(int p_85004_, int p_85005_, int p_85006_, int p_85007_, int p_85008_, int p_85009_, int p_85010_, boolean p_85011_, boolean p_85012_) -
upload
public void upload(int p_85014_, int p_85015_, int p_85016_, int p_85017_, int p_85018_, int p_85019_, int p_85020_, boolean p_85021_, boolean p_85022_, boolean p_85023_, boolean p_85024_) -
_upload
private void _upload(int p_85091_, int p_85092_, int p_85093_, int p_85094_, int p_85095_, int p_85096_, int p_85097_, boolean p_85098_, boolean p_85099_, boolean p_85100_, boolean p_85101_) -
downloadTexture
public void downloadTexture(int p_85046_, boolean p_85047_) -
downloadDepthBuffer
public void downloadDepthBuffer(float p_166401_) -
drawPixels
public void drawPixels() -
writeToFile
- Throws:
IOException
-
writeToFile
- Throws:
IOException
-
copyFromFont
public void copyFromFont(org.lwjgl.stb.STBTTFontinfo p_85069_, int p_85070_, int p_85071_, int p_85072_, float p_85073_, float p_85074_, float p_85075_, float p_85076_, int p_85077_, int p_85078_) -
writeToFile
- Throws:
IOException
-
asByteArray
- Throws:
IOException
-
writeToChannel
- Throws:
IOException
-
copyFrom
-
fillRect
public void fillRect(int p_84998_, int p_84999_, int p_85000_, int p_85001_, int p_85002_) -
copyRect
public void copyRect(int p_85026_, int p_85027_, int p_85028_, int p_85029_, int p_85030_, int p_85031_, boolean p_85032_, boolean p_85033_) -
flipY
public void flipY() -
resizeSubRectTo
public void resizeSubRectTo(int p_85035_, int p_85036_, int p_85037_, int p_85038_, NativeImage p_85039_) -
untrack
public void untrack() -
fromBase64
- Throws:
IOException
-
getA
public static int getA(int p_84984_) -
getR
public static int getR(int p_85086_) -
getG
public static int getG(int p_85104_) -
getB
public static int getB(int p_85120_) -
combine
public static int combine(int p_84993_, int p_84994_, int p_84995_, int p_84996_)
-