MCPcopy Create free account
hub / github.com/HumbleUI/Skija / IHasImageInfo

Interface IHasImageInfo

shared/java/IHasImageInfo.java:7–99  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5import io.github.humbleui.skija.impl.*;
6
7public interface IHasImageInfo {
8 ImageInfo getImageInfo();
9
10 /**
11 * Returns pixel count in each row. Should be equal or less than
12 * getRowBytes() / getImageInfo().getBytesPerPixel().
13 *
14 * May be less than getPixelRef().getWidth(). Will not exceed getPixelRef().getWidth() less
15 *
16 * @return pixel width in ImageInfo
17 */
18 default int getWidth() {
19 return getImageInfo()._width;
20 }
21
22 /**
23 * Returns pixel row count.
24 *
25 * Maybe be less than getPixelRef().getHeight(). Will not exceed getPixelRef().getHeight()
26 *
27 * @return pixel height in ImageInfo
28 */
29 default int getHeight() {
30 return getImageInfo()._height;
31 }
32
33 @NotNull
34 default ColorInfo getColorInfo() {
35 return getImageInfo()._colorInfo;
36 }
37
38 @NotNull
39 default ColorType getColorType() {
40 return getImageInfo()._colorInfo._colorType;
41 }
42
43 @NotNull
44 default ColorAlphaType getAlphaType() {
45 return getImageInfo()._colorInfo._alphaType;
46 }
47
48 @Nullable
49 default ColorSpace getColorSpace() {
50 return getImageInfo()._colorInfo._colorSpace;
51 }
52
53 /**
54 * Returns number of bytes per pixel required by ColorType.
55 * Returns zero if colorType is {@link ColorType#UNKNOWN}.
56 *
57 * @return bytes in pixel
58 */
59 default int getBytesPerPixel() {
60 return getImageInfo().getBytesPerPixel();
61 }
62
63
64 /**

Callers 49

executeMethod · 0.65
executeMethod · 0.65
makeFromImageMethod · 0.65
CodecSceneMethod · 0.65
drawMethod · 0.65
drawMethod · 0.65
drawImageWithFiltersMethod · 0.65
makeSubsetMethod · 0.65
swapMethod · 0.65
executeMethod · 0.65
executeMethod · 0.65

Implementers 4

Codecshared/java/Codec.java
Bitmapshared/java/Bitmap.java
Pixmapshared/java/Pixmap.java
Imageshared/java/Image.java

Calls

no outgoing calls

Tested by

no test coverage detected