MCPcopy Create free account
hub / github.com/PlotJuggler/PlotJuggler / hasPaintedStubFrame

Function hasPaintedStubFrame

pj_widgets/tests/raster_stream_view_test.cpp:14–23  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12namespace {
13
14bool hasPaintedStubFrame(PJ::RasterStreamView& view) {
15 QImage rendered(view.size(), QImage::Format_RGB32);
16 rendered.fill(Qt::black);
17
18 QPainter painter(&rendered);
19 view.render(&painter);
20
21 const QColor center = rendered.pixelColor(rendered.rect().center());
22 return center.red() > 0 || center.green() > 0 || center.blue() > 0;
23}
24
25// Launch the stub helper through the view; it publishes one frame. Verify the
26// view connects, paints the copied frame, and does not prematurely end the session.

Callers 1

TESTFunction · 0.85

Calls 4

centerMethod · 0.80
rectMethod · 0.80
sizeMethod · 0.45
renderMethod · 0.45

Tested by

no test coverage detected