MCPcopy
hub / github.com/CapSoftware/Cap / boundsToRaw

Function boundsToRaw

apps/desktop/src/components/Cropper.tsx:422–430  ·  view source on GitHub ↗
(real: CropBounds)

Source from the content-addressed store, hash-verified

420 );
421
422 function boundsToRaw(real: CropBounds) {
423 const scale = logicalScale();
424 return {
425 x: Math.max(0, real.x / scale.x),
426 y: Math.max(0, real.y / scale.y),
427 width: Math.max(0, real.width / scale.x),
428 height: Math.max(0, real.height / scale.y),
429 };
430 }
431
432 function animateToRawBounds(target: CropBounds, durationMs = 240) {
433 const start = displayRawBounds();

Callers 3

computeInitialBoundsFunction · 0.85
updateContainerSizeFunction · 0.85
CropperFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected