从这个历程来看,应该可以解决很多新手的疑惑。包括 如何驱动数码管,LCD的显示驱动,显示一幅图片,各种扫描方式等等
代码片段和文件信息
/*
*********************************************************************************************************
* uC/GUI
* Universal graphic software for embedded applications
*
* (c) Copyright 2002 Micrium Inc. Weston FL
* (c) Copyright 2002 SEGGER Microcontroller Systeme GmbH
*
* 礐/GUI is protected by international copyright laws. Knowledge of the
* source code may not be used to write a similar product. This file may
* only be used in accordance with a license and should not be redistributed
* in any way. We appreciate your understanding and fairness.
*
----------------------------------------------------------------------
File : GUIArcAA.C
Purpose : Draw Arc routines with Antialiasing
---------------------------END-OF-HEADER------------------------------
*/
#include
#include
#include
#include
#include “GUI_Protected.h“
#if GUI_SUPPORT_AA
/*********************************************************************
*
* Static code
*
**********************************************************************
*/
/*********************************************************************
*
* _DrawArcAA
*/
static void _DrawArcAA(int x0 int y0 int rx int ry int a0 int a1) {
int PenSizePrev = GUI_GetPenSize();
int PenSize_AA;
int Factor;
Factor = GUI_Context.AA_HiResEnable ? 1 : GUI_Context.AA_Factor;
/* Convert into Hires coordinates (if not already done) */
x0 *= Factor;
y0 *= Factor;
rx *= Factor;
ry *= Factor;
PenSize_AA = PenSizePrev * GUI_Context.AA_Factor;
GUI_AA_Init_HiRes(x0 - rx - PenSize_AA x0 + rx + PenSize_AA);
GUI_SetPenSize(PenSize_AA);
GL_DrawArc(x0 y0 rx rya0a1);
GUI_SetPenSize(PenSizePrev); /* restore former pen size */
/* Cleanup */
GUI_AA_Exit();
}
/*********************************************************************
*
* Public code
*
**********************************************************************
*/
/*********************************************************************
*
* GUI_AA_DrawArc
*/
void GUI_AA_DrawArc(int x0 int y0 int rx int ry int a0 int a1) {
GUI_LOCK();
#if (GUI_WINSUPPORT)
WM_ADDORG_AA(x0y0);
WM_ITERATE_START(NULL) {
#endif
_DrawArcAA( x0 y0 rx ry a0 a1);
#if (GUI_WINSUPPORT)
} WM_ITERATE_END();
#endif
GUI_UNLOCK();
}
#else /* Avoid problems with empty object modules */
void GUIAAArc_C(void);
void GUIAAArc_C(void) {}
#endif /* GUI_SUPPORT_AA */
/*************************** End of file ****************************/
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。
评论列表(条)