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 enum
static enum
(package private) static class
-
Field Summary
Modifier and TypeFieldDescriptionprivate final NativeImage.Format
private final int
private static final org.slf4j.Logger
private static final Set
<StandardOpenOption> private long
private final long
private final boolean
private final 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_) void
applyToAllPixels
(IntUnaryOperator p_285490_) byte[]
void
blendPixel
(int p_166412_, int p_166413_, int p_166414_) private void
void
close()
void
copyFrom
(NativeImage p_85055_) boolean
copyFromFont
(org.lwjgl.util.freetype.FT_Face p_334818_, int p_85070_) 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
copyRect
(NativeImage p_261644_, int p_262056_, int p_261490_, int p_261959_, int p_262110_, int p_261522_, int p_261505_, boolean p_261480_, boolean p_261622_) 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()
byte
getBlueOrLuminance
(int p_166419_, int p_166420_) 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_) int[]
byte
getRedOrLuminance
(int p_166409_, int p_166410_) int
getWidth()
private boolean
isOutsideBounds
(int p_166423_, int p_166424_) int[]
Deprecated.mappedCopy
(IntUnaryOperator p_267084_) static NativeImage
read
(byte[] p_273041_) 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
(Path p_85067_)
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
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
- 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_) -
mappedCopy
-
applyToAllPixels
-
getPixelsRGBA
public int[] getPixelsRGBA() -
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
-
copyFromFont
public boolean copyFromFont(org.lwjgl.util.freetype.FT_Face p_334818_, int p_85070_) -
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_) -
copyRect
public void copyRect(NativeImage p_261644_, int p_262056_, int p_261490_, int p_261959_, int p_262110_, int p_261522_, int p_261505_, boolean p_261480_, boolean p_261622_) -
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()
-