Logical → physical → API target dims. See `targetImageSize` + COORDINATES.md.
( logicalW: number, logicalH: number, scaleFactor: number, )
| 58 | |
| 59 | /** Logical → physical → API target dims. See `targetImageSize` + COORDINATES.md. */ |
| 60 | function computeTargetDims( |
| 61 | logicalW: number, |
| 62 | logicalH: number, |
| 63 | scaleFactor: number, |
| 64 | ): [number, number] { |
| 65 | const physW = Math.round(logicalW * scaleFactor) |
| 66 | const physH = Math.round(logicalH * scaleFactor) |
| 67 | return targetImageSize(physW, physH, API_RESIZE_PARAMS) |
| 68 | } |
| 69 | |
| 70 | async function readClipboardViaPbpaste(): Promise<string> { |
| 71 | const { stdout, code } = await execFileNoThrow('pbpaste', [], { |
no outgoing calls
no test coverage detected