10: 2D BITBLT ENGINE
2-74
EPSON
S1D13806 SERIES PROGRAMMING NOTES
AND EXAMPLES (X28B-G-003-01)
10.2.8 Transparent Move BitBLT in Positive Direction
The Transparent Move BitBLT in Positive Direction moves an area of the display buffer to a differ-
ent area of the display buffer. It allows for selection of a transparent color which is not copied during
the BitBLT. This allows fast display of non-rectangular images. For example, consider a source bit-
map having a red circle on a blue background. By selecting the blue color as the transparent color
and using the Transparent Move BitBLT on the whole rectangle, the effect is a BitBLT of the red
circle only.
The Transparent Move BitBLT may move data from one rectangular area to another, or it may be
specified as linear. The linear configuration may be applied to the source or destination. Defining
the Move BitBLT as linear allows each line of the Move BitBLT area to be placed directly after the
previous line, rather than requiring a complete row of address space for each line.
Note: The Transparent Move BitBLT is supported only in a positive direction.
Example 15
Copy a 9
× 321 rectangle at the screen coordinates x = 100, y = 10 to screen coordi-
nates X = 200, Y = 20 using a 640
× 480 display at a color depth of 16 bpp. Transpar-
ent color is blue.
1. Calculate the source and destination addresses (upper left corners of the source and destination
rectangles), using the formula:
SourceAddress
= (y
× ScreenStride) + (x × BytesPerPixel)
= (10
× (640 × 2)) + (100 × 2)
= 13000
= 32C8h
DestinationAddress = (Y
× ScreenStride) + (X × BytesPerPixel)
= (20
× (640 × 2)) + (200 × 2)
= 26000
= 6590h
where:
BytesPerPixel = 1 for 8 bpp
BytesPerPixel = 2 for 16 bpp
ScreenStride = DisplayWidthInPixels
× BytesPerPixel = 1280 for 16 bpp
Program the BitBLT Source Start Address Registers. REG[106h] is set to 00h, REG[105h] is set
to 32h, and REG[104h] is set to C8h.
Program the BitBLT Destination Start Address Registers. REG[10Ah] is set to 00h, REG[109h]
is set to 65h, and REG[108h] is set to 90h.
2. Program the BitBLT Width Registers to 9 - 1. REG[111h] is set to 00h and REG[110h] is set to
08h.
3. Program the BitBLT Height Registers to 321 - 1. REG[113h] is set to 01h and REG[112h] is set
to 40h (320 decimal).