Package icyllis.arc3d.sketch.j2d
Class Raster
java.lang.Object
icyllis.arc3d.sketch.j2d.Raster
- All Implemented Interfaces:
AutoCloseable
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intGrayscale, one channel, 16-bit per channel.static final intGrayscale, one channel, 8-bit per channel.static final intRGB, three channels; red is 5 bits, green is 6 bits, blue is 5 bits.static final intRGB, three channels, 8-bit per channel.static final intprotected final @Nullable BufferedImageprotected PixelRefprotected Pixmap -
Constructor Summary
ConstructorsConstructorDescriptionRaster(@Nullable BufferedImage bufImg, @NonNull ImageInfo info, @Nullable Object data, int baseOffset, int rowBytes) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()static @NonNull RastercreateRaster(int width, int height, int format) int@Nullable ColorSpaceintintint@NonNull ImageInfogetInfo()Peek the current pixmap.intgetWidth()
-
Field Details
-
FORMAT_UNKNOWN
public static final int FORMAT_UNKNOWN- See Also:
-
FORMAT_GRAY_8
public static final int FORMAT_GRAY_8Grayscale, one channel, 8-bit per channel.- See Also:
-
FORMAT_GRAY_16
public static final int FORMAT_GRAY_16Grayscale, one channel, 16-bit per channel.Represented as a short on Java heap (native order).
- See Also:
-
FORMAT_RGB_565
public static final int FORMAT_RGB_565RGB, three channels; red is 5 bits, green is 6 bits, blue is 5 bits.Represented as a short on Java heap (native order).
To GPU: RGB_565 (R5G6B5), R is in most-significant bits.
- See Also:
-
FORMAT_RGB_888
public static final int FORMAT_RGB_888RGB, three channels, 8-bit per channel.Represented as three bytes on Java heap.
To GPU: BGR_888 (B8G8R8), B is in the lowest address.
- See Also:
-
mBufImg
-
mPixmap
-
mPixelRef
-
-
Constructor Details
-
Raster
public Raster(@Nullable BufferedImage bufImg, @NonNull ImageInfo info, @Nullable Object data, int baseOffset, int rowBytes)
-
-
Method Details
-
createRaster
-
getFormat
public int getFormat() -
getInfo
-
getWidth
public int getWidth() -
getHeight
public int getHeight() -
getColorType
public int getColorType() -
getAlphaType
public int getAlphaType() -
getColorSpace
-
getPixmap
Peek the current pixmap. -
getPixelRef
-
close
public void close()- Specified by:
closein interfaceAutoCloseable
-