Color of a screen pixel: Difference between revisions

Content added Content deleted
m (→‎Using GTK3: Remove unused assignment)
Line 717:
 
proc getPixelColor(x, y: int32): Color =
var pixbuf = newPixbufpixbufGetFromWindow(Colorspace.rgbgetDefaultRootWindow(), falsex, 8y, 1, 1)
pixbuf = pixbufGetFromWindow(getDefaultRootWindow(), x, y, 1, 1)
result = cast[ptr Color](pixbuf.readPixels())[]