⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 memdev_autodev.c

📁 ucGui 的示范例子源码,里面包含好多哟, 有LIST 控件,BUTTON 控件,窗口管理,尤其是透明窗口管理.非常的形象.
💻 C
📖 第 1 页 / 共 4 页
字号:
*       static data, shape of polygon**********************************************************************/static const GUI_POINT _aNeedle[] = {  { MAG * ( 0), MAG * (  0 + 125)},  { MAG * (-3), MAG * (-15 + 125)},  { MAG * (-3), MAG * (-65 + 125)},  { MAG * ( 3), MAG * (-65 + 125)},  { MAG * ( 3), MAG * (-15 + 125)},};/*********************************************************************       structure containing information for drawing routine*/typedef struct {  /* Information about what has to be displayed */  GUI_AUTODEV_INFO AutoDevInfo;  /* Polygon data */  GUI_POINT aPoints[7];  float Angle;} PARAM;/*********************************************************************       static code**********************************************************************//*********************************************************************       _GetAngle  This routine returns the value value to indicate. In a real  application, this value would somehow be measured.*/static float _GetAngle(int tDiff) {  if (tDiff < 15000) {    return  225 - 0.006 * tDiff ;  }  tDiff -= 15000;  if (tDiff < 7500) {    return  225 - 90 + 0.012 * tDiff ;  }  tDiff -= 7000;  return 225;}/*********************************************************************       _Draw*/static void _Draw(void * p) {  PARAM * pParam = (PARAM *)p;  /* Fixed background */  if (pParam->AutoDevInfo.DrawFixed) {    GUI_ClearRect (60, 80 + bmScaleR140.YSize, 60 + bmScaleR140.XSize - 1, 180);    GUI_DrawBitmap(&bmScaleR140, 60, 80);  }  /* Moving needle */  GUI_SetColor(GUI_WHITE);  GUI_AA_FillPolygon(pParam->aPoints, countof(_aNeedle), MAG * 160, MAG * 220);  /* Fixed foreground */  if (pParam->AutoDevInfo.DrawFixed) {    GUI_SetTextMode(GUI_TM_TRANS);    GUI_SetColor(GUI_RED);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -