Libraryless. Click here for Pure Java version (9179L/52K).
1 | static final record WidthAndHeightFinal(int width, int height) extends Meta is WidthAndHeight |
2 | ifclass ByteIO , ByteIO endif { |
3 | public int getWidth() { ret width; } |
4 | public int getHeight() { ret height; } |
5 | |
6 | *(int wAndH) { this(wAndH, wAndH); } |
7 | |
8 | toString { ret n2(width) + "*" + n2(height) + " px"; } |
9 | |
10 | ifclass ByteHead |
11 | public void readWrite(ByteHead head) { |
12 | head.exchangeInt(l0 width, w -> width = w); |
13 | head.exchangeInt(l0 height, h -> height = h); |
14 | } |
15 | endif |
16 | } |
Began life as a copy of #1033637
download show line numbers debug dex old transpilations
Travelled to 4 computer(s): elmgxqgtpvxh, mowyntqkapby, mqqgnosmbjvj, wnsclhtenguj
No comments. add comment
Snippet ID: | #1035994 |
Snippet name: | WidthAndHeightFinal |
Eternal ID of this version: | #1035994/1 |
Text MD5: | 4c4075e5e6acbefebb87c8825e57db1f |
Transpilation MD5: | c0d2dea3deedc23c8f126c991980cbbb |
Author: | stefan |
Category: | javax / imaging |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2022-08-21 07:38:54 |
Source code size: | 499 bytes / 16 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 124 / 740 |
Referenced in: | [show references] |