1. Introduction to the Solaris X Server
2. DPS Features and Enhancements
3. Visuals on the Solaris X Server
6. Transparent Overlay Windows
What are Transparent Overlay Windows?
Basic Characteristics of Transparent Overlay Windows
More on Transparent Overlay Characteristics
Choosing Visuals for Overlay/Underlay Windows
Overview of the Solaris Transparent Overlay Window API
Creating Transparent Overlay Windows
Setting the Paint Type of a Graphics Context
Setting the Background State of a Transparent Overlay Window
Querying the Characteristics of a Transparent Overlay Window
Determining Whether a Window is an Overlay Window
Determining the Paint Type of a Graphics Context
Filling an Area Using the Source Area Paint Type
Copying an Area and Its Paint Type
Retrieving Overlay Color Information
Using Existing Xlib Pixel Transfer Routines
Designing an Application for Portability
Selecting a Visual for an Overlay/Underlay Window
Once a transparent overlay window is created, you can use all the standard Xlib primitive rendering routines, such as XDrawLines and XFillRectangles, to draw into the window. When drawing to transparent overlay windows, the paint type attribute of the GC is used to control the quality of the pixels rendered. The paint type attribute applies to both the foreground and background GC attributes. To set the paint type, use the XSolarisOvlSetPaintType routine; for information on this routine, see Setting the Paint Type of a Graphics Context.
The paint type of the GC also controls the type of pixels rendered with XPutImage. If the paint type of the argument GC is XSolarisOvlPaintOpaque, the color information from the source image is used and the pixels are rendered with opaque paint. However, if the paint type is XSolarisOvlPaintTransparent, the source color information is ignored, and the pixels are rendered with transparent paint.
If a GC with a paint type of XSolarisOvlPaintTransparent is used to render to a drawable other than a transparent overlay window, such as an underlay window or pixmap, the GC paint type is ignored, and the pixels are rendered with opaque paint.