[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference bulova::decw_jan-89_to_nov-90

Title:DECWINDOWS 26-JAN-89 to 29-NOV-90
Notice:See 1639.0 for VMS V5.3 kit; 2043.0 for 5.4 IFT kit
Moderator:STAR::VATNE
Created:Mon Oct 30 1989
Last Modified:Mon Dec 31 1990
Last Successful Update:Fri Jun 06 1997
Number of topics:3726
Total number of notes:19516

1270.0. "Color Table Changes ???" by CARP::PANOSIAN () Mon Aug 14 1989 12:54

    My customer recently experienced great pain in moving their application
    from a VS3200 to the VS3100. They indicated that the entries in
    the Color Table that DECwindows uses was changed from high order
    entries to low order. His question is why did DEC modify which entries
    DECwindows uses? Given this change, what will happen with the next
    announcement of new workstations? And, now that their application
    is using high order entries in the color table they are experiencing
    slower execution of updates to the color of the images
    presented on the screen, is their a way to speed up the application?
    
    If anyone could provide answers to the questions listed above it
    would be greatly appreciated. 

T.RTitleUserPersonal
Name
DateLines
1270.1User error on deviceMU::PORTERstill life with prawn cocktailMon Aug 14 1989 14:194
Why do they care which entries DEC chooses to use?  A correctly-implemented
X application shouldn't worry about such things.   The application
requests colour cells, and it will be given ones that are available.

1270.2PSW::WINALSKIMeetings are our most important productMon Aug 14 1989 14:1916
First, off, any application in X that depends on particular numeric pixel
values in the default color map mapping to particular RGB values is broken.
X does not guarantee this.  That is why there's BlackPixelOfScreen,
WhitePixelOfScreen, and the whole elaborate set of routines to allocate
named colors and RGB valuea and to share colors.  If you want to use particular
numeric values, you must use a private color map.

I don't know why specifically the VS3200 and VS3100 allocate the particular
pixel values that they do, but I suspect it has to do with the display hardware.

I can think of no reason why DECwindows should be doing color image displays
slower because pixels 254 and 255 (say) are being used rather than 0 and 1.
My guess is that it's their own code that's slowed down.

--PSW

1270.3Answers to repliesMUSKIE::PANOSIANTue Aug 15 1989 16:0011
    To answer the question posed in reply 1 & 2 - The customer is using
    128 colors which change quantitatively every 1/30th of a second, hence
    they can not use named colors. The only way they know of to get this real
    time responce is to use X$INSTALL_COLORMAP to install their own
    private color map. For this reason, it is very important for them
    to know which colors xwindows needs for its own use, otherwise,
    they will not know where to store their colors. This is
    an OEM application and the customer needs to know DEC philosophy
    for implementing x-windows on future releases of the VAXstation.
                             

1270.4PSW::WINALSKIMeetings are our most important productTue Aug 15 1989 16:1312
RE: .3

In that case, they should create their color map with AllocNone and then use
XAllocColorCells asking for 128 pixel values and no planes.  They then should
use the pixel values that are returned.

Once again, in X, you are not allowed to make assumptions about what are valid
pixel values for a colormap.  It will vary depending on the hardware.  Any
program that makes such assumptions is broken.

--PSW

1270.5SDSVAX::SWEENEYHoney, I iconified the kidsTue Aug 15 1989 16:5017
    I'm not sure there's a meeting of the minds here yet.  "x windows"
    doesn't really require any colors.  Screens have a _default_colormap_
    and typical applications allocate cells out of the the default
    colormap.  The number of entries and their RGB values in the default
    colormap can't be determined in advance by the client.  If the default
    colormap won't do, then X provides other methods.
    
    Other notes with good tutorial information about colormaps are 1026
    and 1052.  It's important to understand what the default colormap is,
    what a private colormap is, and what a standard colormap is.
    
    Programmers of well-behaved applications remember that clients and
    servers are separate, and many applications must ask the server for
    information about itself rather that assuming a specific environment,
    this goes for screen dimensions, colors, and other aspects that may be
    expected to change from server to server.

1270.6PSW::WINALSKIMeetings are our most important productWed Aug 16 1989 00:5817
RE: .5

There is another little wrinkle, and it is what .0 is running into.  The server
preallocates some cells for use with the mouse cursor.  Some workstation models
use pixel values 255 and 254 for this purpose (or was it 252 and 253? I forget).
Others use 0 and 1.  In either case, those values aren't available for
application programs to allocate.  I think .0 is complaining that the values
aren't consistent across all our workstations--they're dependent on the 
exact hardware involved.

The X architectural answer to this question is, yes, that's true, but it doesn't
matter because you are supposed to ask the server for pixel values to use,
anyway.  You aren't allowed to just assume that certain pixel values are valid,
precisely because the available values vary from platform to platform.

--PSW

1270.7planes argument to XAllocColorCells comes in handyLBDUCK::SCHOELLERWho's on first?Wed Aug 16 1989 16:0613
To expand a little bit on what Paul said:

You should use XAllocColorCells or XAllocColorPlanes depending on what Visual
type you get.  If you need pixel values which are guaranteed to have a certain
number of bits in common (for logical operations on pixel values) then use
the planes argument in XAllocColorCells.  I am not sure about the details
of doing this with XAllocColorPlanes.

See _X_Window_System_C_Library_and_Protocol_Reference_ by Scheifler, Gettys and
Newman.  Section 5.1.2

Dick

1270.8PSW::WINALSKIMeetings are our most important productWed Aug 16 1989 18:268
RE: .7

Another option, for use with the TrueColor visual on the Firefox, is to call
XAllocColor.  XAllocColorCells won't work when the "colormap" is read-only, as
is the case with TrueColor.

--PSW