GDI, drawing

Source: Internet
Author: User

The GDI drawing consists of the following sections:

1. Drawing of points and lines

2. Draw the Fill area


Point

SetPixel () and GetPixel () are set pixel points and get pixel points.

In theory, all graphics device drivers only need to implement the SetPixel () function and the GetPixel () function, and everything else can be handled using higher-level programs in the GDI module. For example, to draw a line, GDI can constantly adjust the x and Y coordinates, and then call the SetPixel function continuously to draw all the required graphics.    However, this can cause serious performance problems. So if a graphics system (such as GDI, or OpenGL, etc.) is built on top of the device driver hierarchy, then the performance of the device driver is much higher if it is done by drawing lines and other complex graphics.

The SetPixel () function sets the color of a point in a coordinate:

SetPixel (Hdc,x,y,crcolor); //

The GetPixel () function returns the color of a specified point pixel

Crcolor = GetPixel (hdc, x, y);


GDI, drawing

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.