MCPcopy Create free account
hub / github.com/PABannier/sam3.cpp / screen_to_image

Function screen_to_image

examples/main_video.cpp:210–216  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

208}
209
210static bool screen_to_image(const vapp_state& app, float sx, float sy,
211 float& ix, float& iy) {
212 if (app.canvas_w <= 0 || app.canvas_h <= 0) return false;
213 ix = (sx - app.canvas_x) / app.canvas_w * app.frame.width;
214 iy = (sy - app.canvas_y) / app.canvas_h * app.frame.height;
215 return ix >= 0 && iy >= 0 && ix < app.frame.width && iy < app.frame.height;
216}
217
218static void create_tracker(vapp_state& app) {
219 if (app.visual_only) {

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected