Principles of the palette

Source: Internet
Author: User

The Windows palette management is very complicated. Every Windows ApplicationProgramThey all have their own color palette. When using the color palette, you must first apply for it by the system. Windows assigns the palette Based on the Application priority. Applications with the highest priority can obtain the foreground color palette of windows. Other programs use the background color palette.

To ensure the consistency of Windows Basic Display Interfaces, Windows retains the internal system color palette of 20 colors, which is used to draw window icons and boundaries through the interface. This palette will not change in all display settings.

Each device context has a logical palette. To use a color other than the internal system palette, you should create a new logical palette and select it into the device context. In this way, new colors cannot be used. Only the logical color palette in the device context can be implemented in the system color palette. When the logical palette is implemented to the system palette, Windows creates a palette ing table. When drawing with a logical palette, the GDI Plotting Program directly queries the palette ing table to convert the pixel value from the index of the logical palette to the index of the system palette.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.