Windows GDI Learning Notes (1) - Basic Concept

xiaoxiao2021-03-06  18

GDI

The graphics components in the Windows environment are between the application and the drawing device driver, which provides a plot program interface that is unrelated to the specific device.

Device context

It is an abstraction to the specific drawing device to load a specific drawing device driver, and call the specific drawing device to implement the desired drawing operation according to the application's instruction. The application creates and maintains a device context before drawing, and calls the created Device Context to draw a drawing.

Pen

Virtual line drawing pen object. There are two types of Pen - Cosmetic Pen and Geometic Pen in GDI.

Cosmetic Pen

Cosmetic Pen can be used to quickly draw lines of fixed width. The speed of drawing the line with Cosmetic Pen is generally 3 to 10 times the Geometic Pen. It contains 3 properties: Width, Style and Color.

Geometic Pen

Geometic Pen is used to draw adjustable lines. Its attribute except Width, Styoe, Color, and Pattern, Optional Hatch, End Style and Join Style.

Brush

Virtual flat graphic painting pen object. Can be used to draw multiple variability, round, and the like. In GDI, there are two types of Brush - Logical Brush and Physical Brush. The former is used to define and describe the bitmaps you need, the latter is based on the definition of Logical Brush, and a actual bitmap image that needs to be drawn according to the definition of Logical Brush.

Bitmap

Bitmap in GDI is a program object that represents an image, configured to create, operation, and storage for disk image files.

Color

Indicates the color attribute of the image element, which is represented in the form of RGB.

Coordinate Spaces

Indicates 2-dimensional coordinate space on the application interface.

Filled Shape

A graphic representing the PEN object is subjected and fill by the brush object. Includes circles, rectangles, polygons, and the like.

Path

Refers to one or more graphical sets of maps. Using PATH, a complex graphic consisting of a straight line and a Bessel curve can be drawn.

Region

Refers to a graphic that can have a border, a filler rectangle, a polygon or a circle.

转载请注明原文地址:https://www.9cbs.com/read-41007.html

New Post(0)