Three-dimensional raster operation

Source: Internet
Author: User
Tags bitwise

This paper lists three-dimensional raster operation codes for use by BitBlt, Patblt and StretchBlt functions. The ternary raster opcode defines how to merge bits of the source bitmap and the destination bitmap.

Each raster opcode provides a Boolean operation, which is how to merge the pixels in the source bitmap, the selected brush, and the pixel in the destination bitmap. The following are the action objects used in these operations:

Manipulating objects

Significance

D

Destination bitmap

P

Selected brushes (also known as mode)

S

SOURCE Bitmap

The following are the Boolean operators used in these operations:

Operator

Significance

A

and (Bitwise AND)

N

Not (bitwise counter)

O

or (bitwise OR)

X

XOR (bitwise exclusive OR)

All Boolean operations use the reverse Polish notation. For example, the following action replaces the pixel in the destination bitmap with the combination of the source bitmap pixel and the brush: PSo The following action makes the pixels in the source bitmap merged with the brush and then merge the pixels in the destination bitmap (there are many mutable spellings for the same feature, so a particular spelling method may not be listed. And the equivalent of a format may be listed: DPSoo each raster opcode is a 132-bit integer, its high word (high-order Word) is a Boolean operation index, its low word (low-order word) is the opcode. The 16-bit operation index starts at 0, and the 8-bit value represents the result of a Boolean operation for the intended brush, source bitmap, and destination bitmap. For example, the operations of PSO and Dpsoo are indexed as follows:

P

S

D

Pso

Dpsoo

0

0

0

0

0

0

0

1

0

1

0

1

0

1

1

0

1

1

1

1

1

0

0

1

1

1

0

1

1

1

1

1

0

1

1

1

1

1

1

1

Operation Index:

00FCh

00FEh

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.