Transpiled version (120L) is out of date.
static double calcFitScale(BufferedImage image, Component c) { ret calcFitScale(image, c.getWidth(), c.getHeight()); } static double calcFitScale(BufferedImage image, int w, int h default w) { int iw = image.getWidth(), ih = image.getHeight(); ret max(doubleRatio(h, ih), doubleRatio(w, iw)); }
Began life as a copy of #1019468
download show line numbers debug dex old transpilations
Travelled to 3 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj
No comments. add comment
Snippet ID: | #1034223 |
Snippet name: | calcFitScale |
Eternal ID of this version: | #1034223/4 |
Text MD5: | fd3820063d5c14c890df2dc318fb34d6 |
Author: | stefan |
Category: | javax / gui |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2022-01-29 03:03:34 |
Source code size: | 308 bytes / 8 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 140 / 209 |
Version history: | 3 change(s) |
Referenced in: | [show references] |