X window newbie needs sample code

From: Norm Dresner (ndrez_at_att.net)
Date: 11/02/04


Date: Tue, 02 Nov 2004 08:09:57 GMT

I'm a very experienced (real-time) C programmer in a variety of OS with a
few sophisticated user-space C++ programs under my belt as well in Windows
including several moderately complex graphics programs, but I've never
written a single X window graphics program of any sort.

I have a need to write a single X-window graphics program which constructs a
rectangular pixel array on the screen and internally assigns each pixel to
an element of a memory array. It then needs to monitor the contents of this
array by changing the colors of the associated pixels on the screen. If the
array size were small, I'd do this with (n)curses and characters but the
array is 32K and there aren't that many character positions available on any
reasonable shell window. While this might sound like a real-time
application, it's really very soft real-time with a (nominal) 1 Hz update
rate.

Ideally I'd like to find some sample code that operates on a pixel-by-pixel
basis and writes pixels of arbitrary color to random places on the screen.
Any pointers (URL's or book references) appreciated.

TIA
    Norm



Relevant Pages

  • Re: Algorithm for "Windows Center" and "Windows Width"
    ... destBuffer is my image pixel array. ... For 16 bit pixel values, ... I tried to get window width/center as you have suggested. ... identity (no rescale values or Modality LUT, ...
    (comp.protocols.dicom)
  • Re: X window newbie needs sample code
    ... > rectangular pixel array on the screen and internally assigns each pixel to ... > an element of a memory array. ... While this might sound like a real-time ... The data comes via ioctl from a device driver I wrote. ...
    (comp.os.linux.development.apps)
  • Re: X window newbie needs sample code
    ... > written a single X window graphics program of any sort. ... > rectangular pixel array on the screen and internally assigns each pixel to ... > an element of a memory array. ... While this might sound like a real-time ...
    (comp.os.linux.development.apps)
  • Re: X window newbie needs sample code
    ... > written a single X window graphics program of any sort. ... > rectangular pixel array on the screen and internally assigns each pixel to ... > an element of a memory array. ... While this might sound like a real-time ...
    (comp.os.linux.development.apps)
  • Re: ReadConsoleOutput changes the size of my SMALL_RECT... help!
    ... The problem is probably that ReadConsoleOutput() is expecting to ... write into a 2-dimensional array, ... This will allocate enough space to hold X-rows of Y-columns ... > window displays just fine. ...
    (microsoft.public.vstudio.general)