123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108 |
- /** @file
- * Header file for internal routines.
- *
- * @author anlzhao
- * @author mandy.wu 2009/06/30
- * @version 0.1
- */
- #ifndef _WINDRAW_H
- #define _WINDRAW_H
- #include "gui_eng/stddefs.h"
- #include "gui_eng/device_gdi.h"
- /**
- * Draw a point using the current foreground color.
- *
- * @param hdc Handle to device context.
- * @param swX x coordinate of the pixel.
- * @param swY y coordinate of the pixel.
- * @return GUI_SUCCESS if succeed, error codes otherwise.
- */
- GUIResult_e DRAW_PutPixel(HDC hdc, INT16 swX, INT16 swY, INT32 *pBlockId);
- /**
- * Draw a vertical or a horizontal line by the current fg color.
- *
- * @param hdc Handle to device context.
- * @param swX1 x coordinate of first input line.
- * @param swY1 y coordinate of first input line.
- * @param swX2 x coordinate of second input line.
- * @param swY2 y coordinate of second input line.
- * @param wThickness Thickness of line.
- * @return GUI_SUCCESS if succeed, error codes otherwise.
- */
- GUIResult_e DRAW_DrawLine(HDC hdc, INT16 swX1, INT16 swY1, INT16 swX2, INT16 swY2, UINT16 wThickness, INT32 *pBlockId);
- /**
- * Draw a rectangle by the current fg color.
- *
- * @param hdc Handle to device context.
- * @param pRect Rectangle to be drawn.
- * @param wThickneess Thickness of line.
- * @return GUI_SUCCESS if succeed, error codes otherwise.
- */
- GUIResult_e DRAW_DrawRect(HDC hdc, PRECT pRect, UINT16 wThickness, INT32 *pBlockId);
- /**
- * Fill a rectangle with the foreground color
- *
- * @param hdc Handle to device context.
- * @param pRect Rectangle to be filled.
- * @param bIgnoreTransparentColor Ignore drawing transparent or not.
- * @return GUI_SUCCESS if succeed, error codes otherwise.
- */
- GUIResult_e DRAW_FillRect(HDC hdc, PRECT pRect, BOOLEAN bIgnoreTransparentColor, INT32 *pBlockId);
- /**
- * Draw a no 4-byte pitch aligned bitmap.
- *
- * @param hdc Handle to device context.
- * @param swX Left edge of destination rectangle.
- * @param swY Top edge of destination rectangle.
- * @param pImgData Pointer to icon info PIMAGEHDR containing image
- * data ,height ,width with Data compressed using
- * compression technique.
- * @return GUI_SUCCESS if succeed, error codes otherwise.
- */
- GUIResult_e DRAW_DrawTextBitmap(HDC hdc, PRECT pstRect, const PIMAGEHDR pImgData, INT32 *pBlockId);
- /**
- * Draw a 4-bytes pitch aligned bitmap.
- *
- * @param hdc Handle to device context.
- * @param pSrcRect Pointer of the source rectangle.
- * @param pSrcRect Pointer of the destination rectangle.
- * @param pImgData Pointer to a bitmap header.
- * @param dFlags Flags indicating different drawing styles.
- * @param bDrawFlag Refer to GDL_XXX definitions in device_gdi.h
- * @return GUI_SUCCESS if succeed, error codes otherwise.
- */
- GUIResult_e DRAW_DrawBitmap (HDC hdc, PRECT pSrcRect, PRECT pDstRect, const PIMAGEHDR pImgData,
- PALENTRY *pDynSrcPal, UINT32 dFlags, UINT8 bDrawFlag, INT32 *pBlockId);
- /**
- * Apply a constant alpha value when blit a bitmap.
- *
- * @param hdc Handle to device context.
- * @param pDstRect Pointer of the source rectangle.
- * @param pImgData Pointer to the handle of a bitmap.
- * @param bAlphaValue The constant alpha value to be applied.
- * @return GUI_SUCCESS if succeed, error codes otherwise.
- */
- GUIResult_e DRAW_BlendBitmap(HDC hdc, PRECT pDstRect, const PIMAGEHDR pImgData, PALENTRY *pDynSrcPal,
- UINT8 bAlphaValue, INT32 *pBlockId);
- /**
- * Stretch blit a bitmap to the target HDC rectangle.
- *
- * @param hdc Handle to device context.
- * @param pDstRect Pointer to the target rectangle to be drawn.
- * @param pImgData Pointer to the handle of a bitmap.
- * @param dFlags Flags indicating different draw styles
- * @return GUI_SUCCESS if succeed, error codes otherwise.
- */
- GUIResult_e DRAW_StretchBlit(HDC hdc, PRECT pDstRect, const PIMAGEHDR pImgData, PALENTRY *pDynSrcPal,
- UINT32 dFlags, INT32 *pBlockId);
- #endif
|