MCPcopy Create free account
hub / github.com/aseprite/laf / getColorFromScreen

Method getColorFromScreen

os/win/system.cpp:270–276  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

268}
269
270gfx::Color SystemWin::getColorFromScreen(const gfx::Point& screenPosition) const
271{
272 HDC dc = GetDC(nullptr);
273 COLORREF c = GetPixel(dc, screenPosition.x, screenPosition.y);
274 ReleaseDC(nullptr, dc);
275 return gfx::rgba(GetRValue(c), GetGValue(c), GetBValue(c));
276}
277
278ScreenRef SystemWin::primaryScreen()
279{

Callers

nothing calls this directly

Calls 1

rgbaFunction · 0.85

Tested by

no test coverage detected