MediaCrop.h header

#include <ew/core/MediaCrop.h>

Namespace ew::core

MediaCrop struct

struct ew::core::MediaCrop

A non-destructive crop applied to a media image: the visible region, given as two opposite corners in image pixel coordinates (matching MediaAnnotation's coordinate convention). The underlying asset file is never modified – the crop is stored as metadata and applied when the image is displayed or exported, so it stays undoable and diff-friendly. A Media with no crop shows the whole image.

Members

double ew::core::MediaCrop::x1 = 0.0

The first corner, in image pixels.

double ew::core::MediaCrop::y1 = 0.0

The first corner's y, in image pixels.

double ew::core::MediaCrop::x2 = 0.0

The opposite corner, in image pixels.

double ew::core::MediaCrop::y2 = 0.0

The opposite corner's y, in image pixels.

bool operator==(const MediaCrop &, const MediaCrop &)=default

Two crops compare equal when every corner matches.