Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!usc!ucsd!ucbvax!bloom-beacon!dont-send-mail-to-path-lines From: mouse@larry.mcrcim.mcgill.EDU Newsgroups: comp.windows.x Subject: Re: Getting the width and height of a Pixmap Message-ID: <9101100808.AA00933@Larry.McRCIM.McGill.EDU> Date: 10 Jan 91 08:08:09 GMT Sender: daemon@athena.mit.edu (Mr Background) Organization: The Internet Lines: 57 > Is there any way to determine the width and height of a Pixmap? From the Xlib document: To obtain the current geometry of a given drawable, use XGetGeometry. Status XGetGeometry(display, d, root_return, x_return, y_return, width_return, height_return, border_width_return, depth_return) Display *display; Drawable d; Window *root_return; int *x_return, *y_return; unsigned int *width_return, *height_return; unsigned int *border_width_return; unsigned int *depth_return; display Specifies the connection to the X server. d Specifies the drawable, which can be a window or a pixmap. root_return Returns the root window. x_return y_return Return the x and y coordinates that define the location of the drawable. For a window, these coordinates specify the upper-left outer corner relative to its parent's origin. For pixmaps, these coordinates are always zero. width_return height_return Return the drawable's dimensions (width and height). For a window, these dimensions specify the inside size, not including the border. border_width_return Returns the border width in pixels. If the draw- able is a pixmap, it returns zero. depth_return Returns the depth of the drawable (bits per pixel for the object). The XGetGeometry function returns the root window and the current geometry of the drawable. The geometry of the draw- able includes the x and y coordinates, width and height, border width, and depth. These are described in the argu- ment list. It is legal to pass to this function a window whose class is InputOnly. der Mouse old: mcgill-vision!mouse new: mouse@larry.mcrcim.mcgill.edu