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

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專(zhuān)輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? signal_graph.c

?? LastWave
?? C
字號(hào):
/*..........................................................................*//*                                                                          *//*      L a s t W a v e    P a c k a g e 'signal' 2.1                       *//*                                                                          *//*      Copyright (C) 1998-2002 Emmanuel Bacry.                             *//*      email : lastwave@cmap.polytechnique.fr                              *//*                                                                          *//*..........................................................................*//*                                                                          *//*      This program is a free software, you can redistribute it and/or     *//*      modify it under the terms of the GNU General Public License as      *//*      published by the Free Software Foundation; either version 2 of the  *//*      License, or (at your option) any later version                      *//*                                                                          *//*      This program is distributed in the hope that it will be useful,     *//*      but WITHOUT ANY WARRANTY; without even the implied warranty of      *//*      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the       *//*      GNU General Public License for more details.                        *//*                                                                          *//*      You should have received a copy of the GNU General Public License   *//*      along with this program (in a file named COPYRIGHT);                *//*      if not, write to the Free Software Foundation, Inc.,                *//*      59 Temple Place, Suite 330, Boston, MA  02111-1307  USA             *//*                                                                          *//*..........................................................................*//****************************************************************************//*                                                                          *//*  signal_graph.c   Functions for displaying signals                       *//*                                                                          *//****************************************************************************/#include "lastwave.h"#include "signals.h"/* The GOBJECT structure for displaying a signal */typedef struct graphSignal {  GObjectFields;     /* The signal to be displayed */  SIGNAL signal;    /* The way to display it (see enum below) */  char curve;    /* And a parameter to specify the latter field */  LWFLOAT parameterCurve;    /* Is the display causal ? */  char flagCausal;  } GraphSignal, *GRAPHSIGNAL;/* The corresponding class */            GCLASS theGraphSignalClass = NULL;/* The types of curve */enum {  LineGraphType = 0,  DLineGraphType,  DotGraphType,  CircleGraphType,  BarGraphType,  CrossGraphType};/* Initialization of the SignalWtrans structure */static void _InitGraphSignal(GOBJECT o){  GRAPHSIGNAL graph;  graph = (GRAPHSIGNAL) o;  graph->signal = NewSignal();    graph->curve = LineGraphType;  graph->parameterCurve = 0;  graph->flagCausal = NO;    graph->bgColor = invisibleColor;  graph->rectType = LargeRect;}/* Deleting the content of a GraphSignal */static void _DeleteContentGraphSignal(GOBJECT o){  GRAPHSIGNAL graph;  graph = (GRAPHSIGNAL) o;  DeleteSignal(graph->signal);}/* The setg method */static int _SetGraphSignal (GOBJECT o, char *field, char**argv){  GRAPHSIGNAL graph;  char c;  SIGNAL signal;  int i,j;  LWFLOAT xMin,xMax,yMin,yMax,f;  LISTV lv;      /* The help command */  if (o == NULL) {    SetResultStr("{{{graph [<signal>]} {Gets/Sets the signal to be displayed by the GraphSignal with <signal>.}} \{{cgraph [<signal>]} {Gets/Sets the signal to be displayed by the GraphSignal with a copy of <signal>.}} \{{causal [<flagOnOff>]} {Sets/Gets the causal flag. If 1 then it will not display all the values which were \affected by border effects.}} \{{curve [<symbol> [<parameter>]]} {Sets/Gets the symbol which is used to draw the signal. There are several choices \n\- '_' : A plain line is used. \n\- '-' : A dashed line is used (since this symbols is also used for specifying fields, for using it in a \'setg' command, you must escape it using two successive '-', e.g., 'setg ..signal -curve - -').\n\- '|' : A histogram-type display will be used. The argument <parameter> specifies the y-value the boxes of the histogram \will start at (default is 0). \n\- '+' : Crosses of size <parameter> will be used. \n\- 'o' : Circles of size <parameter> will be used. If <parameter> < 0 then the cirlces will be filled.}}}");    return(YES);  }    graph = (GRAPHSIGNAL) o;    /* the 'graph' and 'cgraph' field */  if (!strcmp(field,"graph") || !strcmp(field,"cgraph")) {    if (*argv == NULL) {      SetResultValue(graph->signal);      return(YES);    }    argv = ParseArgv(argv,tSIGNALI,&signal,0);    DeleteSignal(graph->signal);    if (!strcmp(field,"graph")) {      graph->signal = signal;      AddRefValue(signal);    }    else {      graph->signal = NewSignal();      CopySig(signal,graph->signal);    }    xMin = 1;    xMax = -1;    MinMaxSig(graph->signal,&xMin,&xMax,&yMin,&yMax,&i,&j,NO);    o->rx = xMin;    o->ry = yMin;    o->rw = xMax-xMin;    o->rh = yMax-yMin;    UpdateGlobalRectGObject(o);    return(YES);  }    /* the 'causal' field */  if (!strcmp(field,"causal")) {    if (*argv == NULL) SetResultInt((int) graph->flagCausal);    else {      argv = ParseArgv(argv,tINT,&i,0);      graph->flagCausal = i != 0;    }    return(YES);  }  /* the 'curve' field */  if (!strcmp(field,"curve")) {    if (*argv == NULL) {      switch(graph->curve) {        case LineGraphType : SetResultStr("_"); break;        case DLineGraphType : SetResultStr("-"); break;        case CircleGraphType : lv = TNewListv(); SetResultValue(lv); AppendStr2Listv(lv,"o"); AppendInt2Listv(lv,(int) graph->parameterCurve); break;        case CrossGraphType : lv = TNewListv(); SetResultValue(lv); AppendStr2Listv(lv,"+"); AppendInt2Listv(lv,(int) graph->parameterCurve); break;        case DotGraphType : SetResultStr("."); break;        case BarGraphType : lv = TNewListv(); SetResultValue(lv); AppendStr2Listv(lv,"|"); AppendFloat2Listv(lv,graph->parameterCurve); break;       }      return(YES);    }    argv = ParseArgv(argv,tCHAR,&c,-1);    switch(c) {      case '_' : NoMoreArgs(argv); graph->curve = LineGraphType; graph->lineStyle = LinePlain; break;      case '-' : NoMoreArgs(argv); graph->curve = DLineGraphType; graph->lineStyle = LineDash; break;      case '.' : NoMoreArgs(argv); graph->curve = DotGraphType; graph->lineStyle = LinePlain; break;      case 'o' :         argv = ParseArgv(argv,tINT_,4,&i,0);        if (i == 0) Errorf("_SetGraphSignal() : Size of circles must be different from 0");        graph->parameterCurve = i;        graph->curve = CircleGraphType;         graph->lineStyle = LinePlain;        break;      case '+' :         argv = ParseArgv(argv,tINT_,4,&i,0);        if (i <= 0) Errorf("_SetGraphSignal() : Size of crosses must be strictly greater than 0");        graph->parameterCurve = i;        graph->curve = CrossGraphType;         graph->lineStyle = LinePlain;        break;      case '|' :         argv = ParseArgv(argv,tFLOAT_,0.,&f,0);        graph->parameterCurve = f;        graph->curve = BarGraphType;         graph->lineStyle = LinePlain;        break;      default : Errorf("_SetGraphSignal() : Bad value '%c' for field 'curve'",c);    }    return(YES);  }    /* The 'rect' field */  if (!strcmp(field,"rect")) {    NoMoreArgs(argv);    xMin = 1;    xMax = -1;    MinMaxSig(graph->signal,&xMin,&xMax,&yMin,&yMax,&i,&j,NO);    lv = TNewListv();    SetResultValue(lv);    AppendFloat2Listv(lv,xMin);    AppendFloat2Listv(lv,yMin);    AppendFloat2Listv(lv,xMax-xMin);    AppendFloat2Listv(lv,yMax-yMin);    o->rx = xMin;    o->ry = yMin;    o->rw = xMax-xMin+graph->signal->dx;    o->rh = yMax-yMin;    UpdateGlobalRectGObject(o);    return(YES);  }  /* The 'rectx' field */  if (!strcmp(field,"rectx")) {    argv = ParseArgv(argv,tFLOAT,&xMin,tFLOAT,&xMax,0);    MinMaxSig(graph->signal,&xMin,&xMax,&yMin,&yMax,&i,&j,NO);    lv = TNewListv();    SetResultValue(lv);    AppendFloat2Listv(lv,xMin);    AppendFloat2Listv(lv,yMin);    AppendFloat2Listv(lv,xMax-xMin);    AppendFloat2Listv(lv,yMax-yMin);    return(YES);  }  return(NO);}/* The drawing procedure */static void _DrawGraphSignal (WINDOW win, GOBJECT o, int x, int y,int w,int h){  GRAPHSIGNAL graph;  SIGNAL signal;  int iMin,iMax;  int i;  char flagLastPointPlotted;  int xCur, yCur, xLast, yLast,xNext,yNext,yBase;  int yInf, ySup;  LWFLOAT x0,y0,x1,y1;  int rightSizeBox,leftSizeBox;  /* Some init */      graph = (GRAPHSIGNAL) o;  signal = graph->signal;  if (signal->size == 0) return;    /* Special case we should not draw anything */  if (signal == NULL) Errorf("_DrawGraphSignal() : No signal specified in GraphSignal object");  if (signal->size == 0) return;  /* Getting the minimum and maximum indexes the drawing should be perform on */  Global2LocalRect(o,x,y,w,h,&x0,&y0,&x1,&y1,LargeRect);  x1 += x0;  y1 += y0;  iMin = ISig(signal,x0)-1;    iMax = ISig(signal,x1)+1;  iMin = MAX(0,iMin);  iMax = MIN(signal->size-1,iMax);  if (graph->flagCausal) {    iMin = MAX(iMin,signal->firstp);    iMax = MIN(iMax,signal->lastp);  }  if (graph->curve == BarGraphType)     Local2Global(o,0,graph->parameterCurve,&xCur,&yBase);           /*   * Let's start the loop !   */       flagLastPointPlotted = NO;  yInf = INT_MAX;  ySup = INT_MIN;     for (i = iMin ; i <= iMax; i++) {      /* Computing the point coordinates */        Local2Global(o,XSig(signal,i),signal->Y[i],&xCur,&yCur);            switch(graph->curve) {    /* Drawing lines */        case LineGraphType : case DLineGraphType :      if (i != iMin && xLast != xCur) {        if (yInf < ySup-1) WDrawLine((GOBJECT) win,xLast, yInf, xLast, ySup);	    if (flagLastPointPlotted == NO) WDrawPoint((GOBJECT) win,xCur,yCur);        else WDrawLine((GOBJECT) win,xLast, yLast, xCur, yCur);        yInf = yCur;        ySup = yCur;      }      else {        yInf = MIN(yInf,yCur);        ySup = MAX(ySup,yCur);        if (i == iMax) {          if (i == iMin || flagLastPointPlotted == NO) WDrawPoint((GOBJECT) win,xCur, yCur);          else if (yInf < ySup-1)  WDrawLine((GOBJECT) win,xLast, yInf, xLast, ySup);        }      }             flagLastPointPlotted = YES;      xLast = xCur;      yLast = yCur;            break;    /* Drawing bars */        case BarGraphType :            /* We first compute the rightSizeBox */      if (i+1 < signal->size) {        Local2Global(o,XSig(signal,i+1),signal->Y[i+1],&xNext,&yNext);        rightSizeBox = (xNext-xCur)/2;      }      else {        if (i != iMin) rightSizeBox = (xCur-xLast)/2;        else if (i > 0) {          Local2Global(o,XSig(signal,i-1),signal->Y[i-1],&xLast,&yLast);          rightSizeBox = (xCur-xLast)/2;        } else rightSizeBox = 1;      }        /* We then compute the leftSizeBox */      if (i != iMin) leftSizeBox = (xCur-xLast)/2;      else if (i > 1) {        Local2Global(o,XSig(signal,i-1),signal->Y[i-1],&xLast,&yLast);        leftSizeBox = (xCur-xLast)/2;      } else leftSizeBox = rightSizeBox;            rightSizeBox--;      leftSizeBox--;            /* Then Filling the rect */ 	  WFillRect((GOBJECT) win,xCur-leftSizeBox,yBase,leftSizeBox+rightSizeBox,yCur-yBase,YES,LargeRect);       xLast = xCur;      yLast = yCur;            break;	              /* Drawing Dots */       case DotGraphType :      WDrawPoint((GOBJECT) win,xCur,yCur);      break;       /* Drawing Circles */       case CircleGraphType :      if (graph->parameterCurve > 0) WDrawCenteredEllipse((GOBJECT) win,xCur,yCur,graph->parameterCurve,graph->parameterCurve,YES);      else WFillCenteredEllipse((GOBJECT) win,xCur,yCur,-graph->parameterCurve,-graph->parameterCurve,YES);      break;    /* Drawing Crosses */       case CrossGraphType :      WDrawCenteredCross((GOBJECT) win,xCur,yCur,graph->parameterCurve,YES);      break;         }  } }/* The isin procedure */static LWFLOAT _IsInGraphSignal(GOBJECT o, GOBJECT *o1, int x, int y){  LWFLOAT rx, ry,rx1,ry1,d;  GRAPHSIGNAL g;  int i;  LWFLOAT index;  g = (GRAPHSIGNAL) o;  *o1 = NULL;    /* Get the local coordinate */  Global2Local(o,x,y,&rx,&ry);    /* Get the corresponding index in the signal */    index = X2FIndexSig(g->signal,rx);    /* If the index is out of the bounds of the signal then we consider the point is not in the signal */  if (index < 0 || index > g->signal->size-1 ||       (index == g->signal->size-1 && g->signal->type == XYSIG && g->signal->X[g->signal->size-1] < rx)) return(-1);    /* Otherwise we must compute the distance of the signal to the point and return it */  i = (int) (index+.5);  rx1 = XSig(g->signal,i);  ry1 = g->signal->Y[i];  rx -= rx1;  ry -= ry1;  d = sqrt(rx*rx + ry*ry);    *o1 = o;    return(d);}/* Defining the GraphSignal gclass */  void DefineGraphSignal(void){  theGraphSignalClass = NewGClass("GraphSignal",theGObjectClass,"signal");   theGraphSignalClass->nbBytes = sizeof(GraphSignal);  theGraphSignalClass->init = _InitGraphSignal;  theGraphSignalClass->deleteContent = _DeleteContentGraphSignal;  theGraphSignalClass->set = _SetGraphSignal;  theGraphSignalClass->draw = _DrawGraphSignal;   theGraphSignalClass->isIn = _IsInGraphSignal;   theGraphSignalClass->varType = signaliType;  theGraphSignalClass->flags &= ~(GClassMoveResize+GClassLocalCoor);  theGraphSignalClass->info = "Graphic Class that allows to display signals";}

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久精品一区蜜桃臀影院| 91在线观看下载| 国产91精品露脸国语对白| 成人黄色av网站在线| 在线观看日韩精品| 欧美成人bangbros| 综合久久给合久久狠狠狠97色| 亚洲综合一区在线| 激情av综合网| 欧美亚洲综合网| 久久综合色鬼综合色| 一区二区免费在线| 麻豆一区二区三| 99久久综合精品| 日韩三级在线免费观看| 亚洲视频一区二区免费在线观看 | www.亚洲色图| 欧美美女激情18p| 日本一区二区成人在线| 日韩福利电影在线观看| 成人动漫中文字幕| 日韩欧美亚洲国产另类| 欧美韩国日本综合| 国产一区在线不卡| 91麻豆精品秘密| 久久综合久久久久88| 亚洲国产成人高清精品| 国产精品一区二区视频| 欧美日韩国产区一| 国产精品福利在线播放| 久久99精品国产.久久久久久| 在线看国产一区二区| 国产婷婷色一区二区三区在线| 午夜精品一区在线观看| av一区二区三区| 久久久99久久| 麻豆精品在线观看| 欧美美女一区二区| 伊人婷婷欧美激情| 成人毛片视频在线观看| 精品国产免费人成在线观看| 亚洲国产精品久久人人爱| heyzo一本久久综合| 国产亚洲欧美日韩日本| 老司机精品视频在线| 在线不卡中文字幕播放| 一区二区三区精品在线| 成人高清伦理免费影院在线观看| 久久久久久夜精品精品免费| 免费视频最近日韩| 欧美高清精品3d| 午夜一区二区三区在线观看| 91成人在线精品| 成人一二三区视频| 久久综合九色综合欧美就去吻 | 成人高清伦理免费影院在线观看| 精品剧情在线观看| 另类小说图片综合网| 91精品国产综合久久香蕉的特点| 亚洲国产aⅴ天堂久久| 色欧美片视频在线观看| 亚洲区小说区图片区qvod| 97精品视频在线观看自产线路二| 久久天堂av综合合色蜜桃网| 精品一区二区三区免费播放| 欧美一区二区精品久久911| 天堂一区二区在线| 欧美放荡的少妇| 天堂一区二区在线| 日韩一区二区免费电影| 久久99精品视频| 日韩精品在线网站| 激情久久五月天| 久久久精品天堂| 国产精品一线二线三线精华| 亚洲国产精品国自产拍av| 成人午夜视频网站| 亚洲人123区| 欧美色精品天天在线观看视频| 亚洲h动漫在线| 9191久久久久久久久久久| 日本va欧美va欧美va精品| 日韩精品一区二区在线| 国产精品99久久久久久似苏梦涵| 久久精品一区二区三区不卡| 成人av先锋影音| 亚洲伊人色欲综合网| 欧美电影在线免费观看| 麻豆精品在线播放| 久久久午夜电影| 99re热视频精品| 香蕉久久一区二区不卡无毒影院| 日韩三级免费观看| 国产一区二区三区观看| 亚洲欧洲av另类| 欧美午夜精品一区二区蜜桃 | 精品国产sm最大网站免费看| 国产成人午夜视频| 亚洲欧洲精品天堂一级| 欧美人与禽zozo性伦| 麻豆91免费观看| 国产精品女人毛片| 欧美视频完全免费看| 久久超级碰视频| 1区2区3区欧美| 欧美一区二区三区婷婷月色 | 国产精品久久免费看| 在线视频你懂得一区| 日本欧美一区二区三区乱码 | 99久久99久久久精品齐齐| 亚洲一区二区视频在线| 精品久久久久99| 成人av电影观看| 日韩av电影免费观看高清完整版在线观看| 久久一日本道色综合| 91免费版pro下载短视频| 日韩精品视频网站| 国产日韩亚洲欧美综合| 欧美性色aⅴ视频一区日韩精品| 麻豆91在线播放| 亚洲乱码日产精品bd| 日韩午夜激情免费电影| 99久久免费视频.com| 日韩在线一区二区| 亚洲欧美在线aaa| 日韩三级视频在线看| 色婷婷综合久久久久中文一区二区| 蜜臀国产一区二区三区在线播放 | 在线欧美小视频| 久久99国产精品麻豆| 亚洲制服丝袜在线| 亚洲国产成人在线| 欧美一区二区三区喷汁尤物| www.色综合.com| 激情综合色综合久久| 一区二区免费在线播放| 久久久久久久网| 91精品在线观看入口| 99riav久久精品riav| 国产酒店精品激情| 三级不卡在线观看| 亚洲免费成人av| 国产午夜精品一区二区三区视频| 欧美日韩国产三级| 97久久精品人人做人人爽50路 | 欧美国产精品一区二区三区| 欧美日韩和欧美的一区二区| av亚洲精华国产精华| 国产精品一二三在| 久久99精品久久久久久国产越南| 午夜日韩在线电影| 亚洲男女一区二区三区| 国产女主播一区| 亚洲精品一区在线观看| 欧美一区二区美女| 欧美日韩国产高清一区二区三区| 99久久久久久| 国产成人免费av在线| 麻豆国产精品视频| 日本视频在线一区| 日韩中文欧美在线| 午夜精品久久久久久久久久久| 亚洲裸体xxx| 亚洲欧美日韩久久| 亚洲婷婷综合色高清在线| 国产欧美一区二区精品性色超碰| 精品对白一区国产伦| 欧美变态口味重另类| 精品入口麻豆88视频| 日韩午夜三级在线| 91精品福利在线一区二区三区| 欧美二区乱c少妇| 欧美剧情电影在线观看完整版免费励志电影| 91福利在线看| 欧美羞羞免费网站| 欧美日韩午夜精品| 欧美性大战xxxxx久久久| 欧美在线高清视频| 欧美在线免费视屏| 欧美三级视频在线播放| 欧美日韩一区久久| 欧美人动与zoxxxx乱| 欧美一区二区日韩一区二区| 91精品国产免费| 欧美大片日本大片免费观看| 欧美电视剧在线观看完整版| 日韩欧美国产成人一区二区| 精品欧美乱码久久久久久1区2区| 精品国产乱码久久久久久久久| 久久综合中文字幕| 国产清纯白嫩初高生在线观看91 | 欧美亚洲动漫另类| 欧美日韩精品欧美日韩精品一 | 久草中文综合在线| 精品制服美女久久| 国产91精品在线观看| 99视频国产精品| 欧美视频你懂的| 日韩三级视频中文字幕| 国产三级精品视频|