Libraryless. Click here for Pure Java version (9136L/51K).
1 | srecord noeq WidthAndHeightImpl(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 #1031287
download show line numbers debug dex old transpilations
Travelled to 6 computer(s): bhatertpkbcr, ekrmjmnbrukm, elmgxqgtpvxh, mowyntqkapby, mqqgnosmbjvj, wnsclhtenguj
No comments. add comment
Snippet ID: | #1033637 |
Snippet name: | WidthAndHeightImpl |
Eternal ID of this version: | #1033637/12 |
Text MD5: | e7f0f013247aedf1503debc0141ccc63 |
Transpilation MD5: | ce876ecfc0ae3b76f91ddbb66d3ac0fd |
Author: | stefan |
Category: | javax / imaging |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2022-08-17 17:26:41 |
Source code size: | 491 bytes / 16 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 184 / 749 |
Version history: | 11 change(s) |
Referenced in: | [show references] |