Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

16
LINES

< > BotCompany Repo | #1035994 // WidthAndHeightFinal

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (9179L/52K).

static final record WidthAndHeightFinal(int width, int height) extends Meta is WidthAndHeight
  ifclass ByteIO , ByteIO endif {
  public int getWidth() { ret width; }
  public int getHeight() { ret height; }
  
  *(int wAndH) { this(wAndH, wAndH); }
  
  toString { ret n2(width) + "*" + n2(height) + " px"; }
  
  ifclass ByteHead
  public void readWrite(ByteHead head) {
    head.exchangeInt(l0 width, w -> width = w);
    head.exchangeInt(l0 height, h -> height = h);
  }
  endif
}

Author comment

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: 122 / 738
Referenced in: [show references]