I am writing a program that uses the XGetPixel() method. However, upon using it I get an error saying "Error: XGetPixel was not declared in this scope"
My code is the following:
#include
#include
#include
#include
using namespace std;
int main()
{
// Open a display.
Display *d = XOpenDisplay(NULL);
// Get the root of the display
Window root = DefaultRootWindow(d);
// Map the root window
XMapWindow(d, root);
// Get width and height of the display
int windowHeight = XDisplayHeight (d, 0);
int windowWidth = XDisplayWidth(d, 0);
// Get dump of screen
XImage *image = XGetImage(d, root, 0, 0, windowWidth, windowHeight, AllPlanes, ZPixmap);
XGetPixel(image,5,5);
return 0;
}
Strangely, when I check in the X11/Xlib.h it dosn't appear to even have a XGetPixel() method or structure. Is it possible this is a bug? I am currently using Ubuntu 16 and installed it using apt-get libx11-dev and I cannot find any reported issues about this problem.
JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)