FastLED 3.9.15
Loading...
Searching...
No Matches

◆ gif__clip()

static fl::u32 fl::third_party::gif__clip ( fl::u32 frame_off,
fl::u32 frame_dim,
fl::u32 image_ext )
inlinestatic

Get any frame clip adjustment for the image extent.

Parameters
[in]frame_offFrame's X or Y offset.
[in]frame_dimFrame width or height.
[in]image_extImage width or height constraint.
Returns
the amount the frame needs to be clipped to fit the image in given dimension.

Definition at line 413 of file gif.cpp.hpp.

417{
418 fl::u32 frame_ext = frame_off + frame_dim;
419
420 if (frame_ext <= image_ext) {
421 return 0;
422 }
423
424 return frame_ext - image_ext;
425}

References FL_NOEXCEPT.

Referenced by nsgif__decode_complex(), nsgif__decode_simple(), and nsgif__restore_bg().

+ Here is the caller graph for this function: