亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? hgraf.c

?? 隱馬爾科夫模型工具箱
?? C
?? 第 1 頁 / 共 2 頁
字號:
/* ----------------------------------------------------------- *//*                                                             *//*                          ___                                *//*                       |_| | |_/   SPEECH                    *//*                       | | | | \   RECOGNITION               *//*                       =========   SOFTWARE                  */ /*                                                             *//*                                                             *//* ----------------------------------------------------------- *//*         Copyright: Microsoft Corporation                    *//*          1995-2000 Redmond, Washington USA                  *//*                    http://www.microsoft.com                 *//*                                                             *//*   Use of this software is governed by a License Agreement   *//*    ** See the file License for the Conditions of Use  **    *//*    **     This banner notice must not be removed      **    *//*                                                             *//* ----------------------------------------------------------- *//*         File: HGraf.X.c:  HGraf for X-Windows               *//* ----------------------------------------------------------- */char *hgraf_version = "!HVER!HGraf(X):   3.1 [CUED 16/01/02]";char *hgraf_vc_id = "$Id: HGraf.c,v 1.8 2002/12/19 16:37:11 ge204 Exp $";/*   This is the X Windows implementation of HGraf.  It is server   independent except for two areas.      a) a set of fonts in sizes 8,9,10,12,14,15,16,19,20,24 should      be provided by your server.  This distribution attempts to      load these using the pattern *-Medium-R-Normal-*.  If your      X server does not provide fonts matching this pattern you      will need to modify the FontNm initialiser below.         b) the set of X colours used for the 16 HGraf colours may need      to be modified to give the best results on your machine.      See the XColArray initialiser below.         It may be necessary to modify this source and/or change compiler   options in order to compile this version of HGraf.  For example,   under HP-UX 8.07 you would need to add the following immediately   after this comment         #define _HPUX_SOURCE   The include search path also needs to be altered by using          -I/usr/include/X11R4           compiler option      */#include "HShell.h"#include "HMem.h"#include "HMath.h"#include "HGraf.h"/*   Enable use of timer to add hysteresis to button response.   This should work for most UNIX systems but the location of   <time.h> may vary from system to system.   #define USE_TIMER*/#ifdef USE_TIMER#include <sys/time.h>#define _BSD_SIGNALS#include <signal.h>#endif #include <X11/Xlib.h>      /* the X11 stuff makes string.h also available */#include <X11/Xutil.h>#include <X11/Xos.h>#define XK_MISCELLANY      /* use miscellaneous keysym defs */#include <X11/keysymdef.h>#define MAX_GC 4  /* we need 1 GC for each transfer mode since changing                     the transfer mode in the current GC is unreliable on                     some X-servers that we have tested */static MemHeap btnHeap;      /* heap for HButton structures *//* Global X Stuff */static Display       *theDisp;                           static Window        rootW, theWindow;                   static int           theScreen;                          static unsigned int  ncells, dispWIDE, dispHIGH, dispDEEP;static Colormap      theCmap;static GC            theGC;static GC            gcs[MAX_GC];static unsigned long black, white;static Visual        *theVisual;static XEvent        report;static XSizeHints    hints;static Boolean       winCreated = FALSE;static int colours[MAX_COLOURS];static int greys[MAX_GREYS]; static char  *XColArray[] = {   "white","yellow","orange","red",   "plum", "purple","blue","lightblue",    "darkgreen","palegreen", "brown","tan",    "lightgray", "gray","darkslategray", "black" };static int   TFuncX11[4] = {   GXcopy, GXor, GXxor, GXinvert};/* --------------------------- Initialisation ---------------------- */static ConfParam *cParm[MAXGLOBS];      /* config parameters */static int nParm = 0;static int trace = 0;                   /* Just for consistency *//* EXPORT->InitGraf: initialise memory and configuration parameters */void InitGraf(void){   int i;      Register(hgraf_version,hgraf_vc_id);   nParm = GetConfig("HGRAF", TRUE, cParm, MAXGLOBS);   if (nParm>0){      if (GetConfInt(cParm,nParm,"TRACE",&i)) trace = i;   }}/*------------------- Font Handling Routines -----------------------*/#define NO_OF_FONTS 10#define FONTS_AVAILABLE 10static char *FontNm[NO_OF_FONTS] = {   "*-Medium-R-Normal-*-8-*-*-*-*-*-*-*",   "*-Medium-R-Normal-*-9-*-*-*-*-*-*-*",   "*-Medium-R-Normal-*-10-*-*-*-*-*-*-*",   "*-Medium-R-Normal-*-12-*-*-*-*-*-*-*",   "*-Medium-R-Normal-*-14-*-*-*-*-*-*-*",   "*-Medium-R-Normal-*-15-*-*-*-*-*-*-*",   "*-Medium-R-Normal-*-16-*-*-*-*-*-*-*",   "*-Medium-R-Normal-*-19-*-*-*-*-*-*-*",   "*-Medium-R-Normal-*-20-*-*-*-*-*-*-*",   "*-Medium-R-Normal-*-24-*-*-*-*-*-*-*" };static int FontSize[NO_OF_FONTS] = {8, 9, 10, 12, 14, 15, 16, 19, 20, 24};static XFontStruct  *DefaultFont, *CurrentFont, *FontInfo[NO_OF_FONTS];#define FONT1 "-*-lucida-medium-r-*-*-12-*"#define FONT2 "-*-helvetica-medium-r-*-*-12-*"#define FONT3 "6x13"/* InstallFonts: install the HGraf font set */static void InstallFonts(void){   int  i;   /* load user fonts */   for (i=0; i < FONTS_AVAILABLE; i++)       if ((FontInfo[i] = XLoadQueryFont(theDisp, FontNm[i])) == NULL)          HError(-6870, "InstallFonts: Cannot load font %s", FontNm[i]);   /* load the default font */   if ((DefaultFont = XLoadQueryFont(theDisp, FONT1))==NULL  &&        (DefaultFont = XLoadQueryFont(theDisp, FONT2))==NULL  &&        (DefaultFont = XLoadQueryFont(theDisp, FONT3))==NULL)       HError(6870, "InstallFonts: Cannot load default font");}/* ----------------------------- Event Handling --------------------------------- *//* DecodeKeyPress: decode the given keypress into char+modifier */static void DecodeKeyPress(XKeyEvent *xkev, HEventRec *hev){   char buf[20];   int n;   KeySym key;   XComposeStatus compose;      n = XLookupString(xkev,buf,20,&key,&compose);   hev->c = buf[0];   switch (key) {   case XK_Shift_L:   case XK_Shift_R:      hev->ktype = SHIFTKEY;      break;   case XK_Control_L:   case XK_Control_R:      hev->ktype = CONTROLKEY;      break;   case XK_Meta_L:   case XK_Meta_R:   case XK_Alt_L:   case XK_Alt_R:      hev->ktype = COMMANDKEY;      break;   case XK_Return:   case XK_KP_Enter:      hev->ktype = ENTERKEY;      break;   case XK_Escape:      hev->ktype = ESCKEY;      break;   case XK_BackSpace:   case XK_Delete:      hev->ktype = DELKEY;      break;     default:      hev->ktype = NORMALKEY;   }}/* EXPORT->HGetEvent: return next relevant event in event queue */HEventRec HGetEvent(Boolean anyEvent, void (*action)(void)){   XEvent xev;   HEventRec hev;   Boolean found,dummy;   XFlush(theDisp); found = FALSE;   do {      if(XEventsQueued(theDisp, QueuedAfterFlush) > 0 || action==NULL){          XNextEvent(theDisp, &xev);         found = TRUE;         if (xev.xany.window==theWindow || anyEvent){            switch (xev.type) {            case ButtonPress:                hev.event = HMOUSEDOWN;               hev.x = xev.xbutton.x;               hev.y = xev.xbutton.y;               break;            case ButtonRelease:               hev.event = HMOUSEUP;               hev.x = xev.xbutton.x;               hev.y = xev.xbutton.y;               break;            case MotionNotify:               hev.event = HMOUSEMOVE;               hev.x = xev.xmotion.x;               hev.y = xev.xmotion.y;               break;            case KeyPress:               hev.event = HKEYPRESS;               hev.x = xev.xkey.x;               hev.y = xev.xkey.y;               DecodeKeyPress(&(xev.xkey), &hev);               break;            case KeyRelease:               hev.event = HKEYRELEASE;               hev.x = xev.xkey.x;               hev.y = xev.xkey.y;               DecodeKeyPress(&(xev.xkey), &hev);               break;            case Expose:               if (xev.xexpose.count==0)                  hev.event = HREDRAW;               else                  found = FALSE;               break;            default:               found = FALSE;            }         }      } else if (action!=NULL){         (*action)();         XFlush(theDisp);         /* execute a round-robin command to make sure that */         /* client doesnt get too far ahead of the server */         dummy = HMousePos(&hev.x,&hev.y);      }   } while (!found);   return hev; }/* EXPORT->HEventsPending: Return number of events pending */int HEventsPending(void){   return XEventsQueued(theDisp, QueuedAfterFlush);}/* EXPORT->HMousePos: return mouse pos in x, y, returns TRUE if    the pointer is on the window */Boolean HMousePos(int *x, int *y){   Window root,child;   int rx,ry;   unsigned int keys;   return (Boolean)      XQueryPointer(theDisp, theWindow, &root, &child, &rx, &ry, x, y, &keys);}/* EXPORT: IsInRect: return TRUE iff (x,y) is in the rectangle (x0,y0,x1,y1) */ Boolean IsInRect(int x, int y, int x0, int y0, int x1, int y1){   return (x >= x0 && x<=x1 && y >= y0 && y <= y1);}/* ------------------------- Colour Handling ------------------------------ */#define GSTP 4static void InstallColours(void){   int pixVal=0;   int c, f, ggap, steps[GSTP] = {8, 4, 2, 1};   XColor greyDef, whiteDef, blackDef, colourDef;   short RGBval, step;   /* initialise the grey levels/colours depending on the number of planes */   for (c = 0; c < MAX_COLOURS; c++){      /* get colour from the X11 database */      if (!XParseColor(theDisp, theCmap, XColArray[c], &colourDef))         HError(6870,"InstallColours: Colour name %s not in X11 database",                 XColArray[c]);      if (!XAllocColor(theDisp, theCmap, &colourDef))         HError(-6870,"InstallColours: Cannot allocate colour %s", XColArray[c]);      else         pixVal = colourDef.pixel;      colours[c] = pixVal;   }   if (dispDEEP == 1){      /* map all grey levels onto b/w */      for (c = 0; c < MAX_GREYS/2; c++)         greys[c] = white;      for (c = MAX_GREYS/2; c < MAX_GREYS; c++)         greys[c] = black;   } else {      /* then the grey levels */      whiteDef.pixel = white; XQueryColor(theDisp, theCmap, &whiteDef);      blackDef.pixel = black; XQueryColor(theDisp, theCmap, &blackDef);      ggap = ((int)(whiteDef.red - blackDef.red))/MAX_GREYS;      for (f = 0; f < GSTP; f++){         step = steps[f]*ggap;         for (c = 0; c < (MAX_GREYS/steps[f]); c++){            RGBval = whiteDef.red - c*step;             greyDef.red = RGBval;            greyDef.green = RGBval;            greyDef.blue  = RGBval;            if (!XAllocColor(theDisp, theCmap, &greyDef))               HError(-6870, "InstallColours: Cannot allocate grey level %d",                       c*steps[f]);            else               pixVal = greyDef.pixel;            greys[c] = pixVal;         }       }   }}/* EXPORT-> HSetColour: Set current colour to c */void HSetColour(HColour c){   XferMode  xf;   for (xf = GCOPY; xf < GINVERT; xf=(XferMode) (xf+1))   /* change all GCs except GINVERT*/      XSetForeground(theDisp, gcs[(int) xf], colours[(int) c]);}/* EXPORT-> HSetGrey: Set current colour to grey level g */void HSetGrey(int g){   XferMode  xf;   for (xf = GCOPY; xf < GINVERT; xf=(XferMode) (xf+1))   /* change all GCs except GINVERT*/      XSetForeground(theDisp, gcs[(int) xf], greys[g]);}/* ------------------------ Drawing Primitives ---------------------------- *//* CheckCorners: make sure (x0,y0) is north-west of (x1,y1) */static void CheckCorners(int *x0, int *y0, int *x1, int *y1){   int a,b,c,d;      if (*x0<*x1) {a=*x0; c=*x1;} else {a=*x1; c=*x0;}   if (*y0<*y1) {b=*y0; d=*y1;} else {b=*y1; d=*y0;}   *x0=a; *y0=b; *x1=c; *y1=d;}/* EXPORT-> HDrawLines: Draw multiple lines */void HDrawLines(HPoint *points, int n){   XDrawLines(theDisp, theWindow, theGC, (XPoint *) points, n, CoordModeOrigin);}/* EXPORT-> HDrawRectangle: draw a rectangle */void HDrawRectangle(int x0, int y0, int x1, int y1){   CheckCorners(&x0,&y0,&x1,&y1);   XDrawRectangle(theDisp, theWindow, theGC, x0, y0, x1 - x0, y1 - y0);}/* EXPORT-> HFillRectangle: fill a rectangle */void HFillRectangle(int x0, int y0, int x1, int y1){   CheckCorners(&x0,&y0,&x1,&y1);   XFillRectangle(theDisp, theWindow, theGC, x0, y0, x1 - x0, y1 - y0);}/* EXPORT-> HDrawLines: Draw multiple lines */void HDrawLine(int x0, int y0, int x1, int y1){   XDrawLine(theDisp, theWindow, theGC, x0, y0, x1, y1);}/* EXPORT-> HFillPolygon: fill a convex polygon */void HFillPolygon(HPoint *points, int n){   XFillPolygon(theDisp, theWindow, theGC, (XPoint *) points, n, Convex, CoordModeOrigin);}/* EXPORT-> HDrawArc: Draw arc from stAngle thru arcAngle degrees */void HDrawArc(int x0, int y0, int x1, int y1, int stAngle, int arcAngle){   unsigned int rw, rh;   CheckCorners(&x0,&y0,&x1,&y1);   /* calculate width and height */   rw = abs(x1 - x0); rh = abs(y1 - y0);   /* the angles are signed integers in 64ths of a degree */   stAngle *=64; arcAngle*=64;   XDrawArc(theDisp, theWindow, theGC, x0, y0, rw, rh, stAngle, arcAngle);}/* EXPORT-> HFillArc: Draw filled arc from stAngle thru arcAngle degrees */void HFillArc(int x0,int y0,int x1,int y1,int stAngle,int arcAngle){   unsigned int rw, rh;      CheckCorners(&x0,&y0,&x1,&y1);

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产91丝袜在线播放| 国产精品女人毛片| 亚洲视频每日更新| 九九**精品视频免费播放| 精品视频资源站| 亚洲一卡二卡三卡四卡| 91蝌蚪porny九色| 国产欧美va欧美不卡在线| 精品一区二区三区免费毛片爱| 欧美日本一道本| 日韩理论片网站| 91久久精品一区二区二区| 亚洲乱码国产乱码精品精98午夜| 99精品热视频| 亚洲女子a中天字幕| 成人av网站在线观看免费| 国产精品久久久久久久久久久免费看| 成人福利视频网站| 欧美精品一区二区三区蜜桃视频| 狠狠色丁香婷婷综合久久片| 国产蜜臀97一区二区三区| 风间由美一区二区三区在线观看| 欧美经典一区二区| 91麻豆免费观看| 亚洲主播在线观看| 日韩一区二区免费高清| 精久久久久久久久久久| 国产精品美女一区二区三区| eeuss鲁一区二区三区| 一区二区三区中文字幕精品精品 | 国产精品福利一区二区| 99久久精品免费精品国产| 亚洲欧洲中文日韩久久av乱码| 91免费视频网| 日产国产欧美视频一区精品| 精品国产成人在线影院| 成人av高清在线| 亚洲成a人v欧美综合天堂 | 天堂久久一区二区三区| 精品国产第一区二区三区观看体验| 成人网男人的天堂| 亚洲电影激情视频网站| 日韩精品中文字幕在线不卡尤物 | 国产.欧美.日韩| 亚洲精品大片www| 精品理论电影在线观看 | 亚洲福利电影网| 久久久久久久久久美女| 色哟哟一区二区在线观看| 麻豆精品久久久| 国产精品久久久久7777按摩| 欧美一区二区三区思思人| 国产精品影音先锋| 香蕉成人伊视频在线观看| 国产欧美一区二区三区在线老狼| 色老汉av一区二区三区| 国产美女精品人人做人人爽| 亚洲一区中文在线| 亚洲国产精华液网站w| 欧美日韩色一区| 成人中文字幕合集| 国产一级精品在线| 精品中文字幕一区二区| 美女在线一区二区| 日韩电影免费在线看| 一区二区久久久| 一区二区三区免费看视频| 中文字幕一区av| 国产精品久久久久久久久免费丝袜 | 蜜乳av一区二区| 香蕉加勒比综合久久 | 日本va欧美va欧美va精品| 亚洲国产美女搞黄色| 一区二区三区欧美在线观看| 亚洲老妇xxxxxx| 一区二区在线免费观看| 亚洲影视资源网| 亚洲成人av电影在线| 午夜av电影一区| 免费在线观看不卡| 九色综合狠狠综合久久| 国产一区二区三区不卡在线观看 | 欧美精品在欧美一区二区少妇| 欧美午夜不卡视频| 91福利社在线观看| 欧美三级乱人伦电影| 在线电影一区二区三区| 4438x成人网最大色成网站| 欧美精品777| 欧美xxxxx牲另类人与| 久久精品水蜜桃av综合天堂| 国产亲近乱来精品视频| 国产精品超碰97尤物18| 一区二区三区在线视频观看58| 一区二区三区国产精华| 婷婷综合在线观看| 狂野欧美性猛交blacked| 激情文学综合丁香| 亚洲成av人片| 狠狠色狠狠色综合日日91app| 成人av免费在线观看| 欧美三级资源在线| 精品va天堂亚洲国产| 中文字幕第一区综合| 一区二区免费看| 久久成人av少妇免费| jvid福利写真一区二区三区| 在线精品视频免费观看| 日韩精品在线一区二区| 国产精品久久久久久久蜜臀 | 国产精品自拍在线| 色婷婷精品大在线视频 | 欧美精品亚洲二区| 2014亚洲片线观看视频免费| 亚洲成年人网站在线观看| 奇米777欧美一区二区| 国产99久久久国产精品潘金| 欧美性xxxxxxxx| 精品国产精品一区二区夜夜嗨| 亚洲三级小视频| 美女脱光内衣内裤视频久久网站| 国产精品1区2区3区| 在线观看日韩av先锋影音电影院| 欧美成人乱码一区二区三区| 亚洲日本va午夜在线影院| 精油按摩中文字幕久久| 色综合天天狠狠| 精品国产免费一区二区三区四区 | 国产精品一区二区男女羞羞无遮挡 | 青青草97国产精品免费观看无弹窗版 | 精品一区二区久久久| 在线免费观看日韩欧美| www激情久久| 天堂成人国产精品一区| 成人精品一区二区三区四区| 538prom精品视频线放| 亚洲视频一区二区免费在线观看| 久久超碰97中文字幕| 欧美日韩在线亚洲一区蜜芽| 中文字幕在线一区免费| 韩国视频一区二区| 正在播放亚洲一区| 一区二区三区在线观看动漫| 岛国精品在线播放| 精品少妇一区二区| 国产不卡视频在线播放| 日韩欧美电影一区| 性久久久久久久久| 在线精品观看国产| 亚洲蜜臀av乱码久久精品蜜桃| 国产精品1区2区3区| 久久综合色8888| 美国十次了思思久久精品导航| 欧美日韩精品一区视频| 亚洲欧美精品午睡沙发| 91一区二区在线| 中文字幕一区二区三区不卡 | 日韩不卡免费视频| 欧美日韩一区二区欧美激情| 一区二区三区在线观看视频| aaa欧美日韩| 中文字幕一区免费在线观看| 成人一级片在线观看| 欧美国产欧美亚州国产日韩mv天天看完整| 精品一区二区精品| 久久这里只有精品6| 国产一区二区视频在线播放| 久久久国产综合精品女国产盗摄| 国产资源在线一区| 26uuu久久天堂性欧美| 国产精品夜夜嗨| 国产日产亚洲精品系列| 国产成人免费视频一区| 日本一区二区三区国色天香| 成人av资源网站| 亚洲欧美日韩国产另类专区| 欧美亚洲高清一区二区三区不卡| 亚洲午夜电影网| 18成人在线视频| 日本乱人伦一区| 三级成人在线视频| 欧美成人精精品一区二区频| 狠狠狠色丁香婷婷综合久久五月| 久久综合色播五月| 99视频精品在线| 亚洲在线免费播放| 日韩免费观看2025年上映的电影 | 91影院在线免费观看| 一区二区三区在线观看视频| 91精品国产综合久久小美女| 国产一区二区三区蝌蚪| 国产精品视频在线看| 日本丰满少妇一区二区三区| 亚洲成人激情综合网| 欧美成人a在线| 99久久综合狠狠综合久久| 亚洲综合色噜噜狠狠| 日韩精品一区二区三区中文不卡| 国产98色在线|日韩| 亚洲一区二区三区自拍|