MCPcopy Create free account
hub / github.com/OpenShot/libopenshot / offsetPixel

Function offsetPixel

tests/SphericalEffect.cpp:47–52  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

45}
46
47static QColor offsetPixel(std::shared_ptr<QImage> img, int dx, int dy) {
48 const int cx = img->width() / 2 + dx;
49 const int cy = img->height() / 2 + dy;
50 return img->pixelColor(std::clamp(cx, 0, img->width() - 1),
51 std::clamp(cy, 0, img->height() - 1));
52}
53
54// Loose classifiers for our colored guide lines
55static bool is_red(QColor c) { return c.red() >= 200 && c.green() <= 60 && c.blue() <= 60; }

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected