AlphaBlendWindow Function

Microchip Graphics Library

Microchip Graphics Library
AlphaBlendWindow Function
C
WORD AlphaBlendWindow(
    DWORD foregroundArea, 
    SHORT foregroundLeft, 
    SHORT foregroundTop, 
    DWORD backgroundArea, 
    SHORT backgroundLeft, 
    SHORT backgroundTop, 
    DWORD destinationArea, 
    SHORT destinationLeft, 
    SHORT destinationTop, 
    WORD width, 
    WORD height, 
    BYTE alphaPercentage
);
Overview

This Alpha-Blends a foreground and a background stored in frames to a destination window. A frame is a memory area that contain array of pixels information. An example would be a display buffer. This operation can be performed on a single frame (where foregroundArea, backgroundArea and destinationArea all points to the same frame), 2 frames (where two of the three areas are pointing to the same frame and one is another frame), or 3 frames (where each area is a separate frame). The Alpha-Blending is performed on the windows inside the specified frames. These windows are defined by the offsets for each frame and the given width and height. The Alpha-Blended windows are always equal in sizes. This function is only available when it is supported by the display driver used. Enabling this feature requires the macros USE_ALPHABLEND_LITE or USE_ALPHABLEND defined in the GraphicsConfig.h.

Input Parameters
Input Parameters 
Description 
DWORD foregroundArea 
Defines the starting address/page of the foreground window. 
SHORT foregroundLeft 
Defines the foreground horizontal offset in pixels starting from the starting address/page defined by foregroundArea. 
SHORT foregroundTop 
Defines the foreground vertical offset in pixels starting from the starting address/page defined by foregroundArea. 
DWORD backgroundArea 
Defines the starting address/page of the background window. 
SHORT backgroundLeft 
Defines the background horizontal offset in pixels starting from the starting address/page defined by backgroundArea. 
SHORT backgroundTop 
Defines the background vertical offset in pixels starting from the starting address/page defined by backgroundArea. 
DWORD destinationArea 
Defines the starting address/page of the destination window. 
SHORT destinationLeft 
Defines the destination horizontal offset in pixels starting from the starting address/page defined by destinationArea. 
SHORT destinationTop 
Defines the destination vertical offset in pixels starting from the starting address/page defined by destinationArea. 
WORD width 
Defines the width of the window to be alpha blended. 
WORD height 
Defines the height of the window to be alpha blended. 
BYTE alphaPercentage 
This defines the amount of transparency to give the foreground Window. Valid range is 0-100. Actual allowed values may be limited by the driver used. Refer to the specific driver for allowed values. 
Returns

none

Preconditions

none

Side Effects

none

Microchip Graphics Library Version 3.06.02 - October 15, 2012
Copyright © 2012 Microchip Technology, Inc.  All rights reserved