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

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

?? image_graph.c

?? LastWave
?? C
字號:
/*..........................................................................*//*                                                                          *//*      L a s t W a v e    P a c k a g e 'image' 2.1                        *//*                                                                          *//*      Copyright (C) 1998-2002 Emmanuel Bacry, Jerome Fraleu.              *//*      emails : fraleu@cmap.polytechnique.fr                               *//*               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             *//*                                                                          *//*..........................................................................*//****************************************************************************//*                                                                          *//*  image_graph.c   Functions for displaying image                          *//*                                                                          *//****************************************************************************/#include "lastwave.h"#include "images.h"  /* The GOBJECT structure for displaying an image */typedef struct graphImage {  GObjectFields;     /* The image to be displayed */  IMAGE image;    /* The colormap used */  unsigned long cm;   /* The norm field */  LWFLOAT norm;  char flagAbsVal;  } GraphImage      , *GRAPHIMAGE;/* The corresponding class */      GCLASS theGraphImageClass = NULL;/* Values for ->norm field */enum {  NormNone  = 0,  NormMax  = -1};     /* Initialization of the GraphImage structure */static void _InitGraphImage(GOBJECT o){  GRAPHIMAGE graph;  graph = (GRAPHIMAGE) o;  graph->image = NewImage();    graph->cm = GetColorMapCur();    graph->bgColor = invisibleColor;  graph->rectType = SmallRect;    graph->norm = NormMax;  graph->flagAbsVal = YES;}/* Deleting the content of a GraphImage */static void _DeleteContentGraphImage(GOBJECT o){  GRAPHIMAGE graph;  graph = (GRAPHIMAGE) o;  DeleteImage(graph->image);}/* The setg method */static int _SetGraphImage (GOBJECT o, char *field, char**argv){  GRAPHIMAGE graph;  IMAGE image;  char *str;  LWFLOAT f;  LISTV lv;  VALUE val;  /* The help command */  if (o == NULL) {      SetResultStr("{{{graph [<image>]} {Gets/Sets the image to be displayed by the GraphImage. (The '-cgraph' field \is equivalent to that field).}} \{{cm [<colormap>]} {Sets/Gets the colormap that will be used to display the image.}} \{{norm '[+][none' | 'max' | <number>]} {Sets/Gets the normalization mode. The '+' sign indicates whether the absolute values \are coded (if '+' is specified) or the signed values. If the mode is 'none', then \no normalization is done, i.e., the values of the image are taken as color indexes in the colormap. Whatever index \is out of range is replaced by either the first color of the colormap (for negative indexes) or the last one. If it is 'max' \then the values (resp. absolute values) are normalized between -<max> (resp. 0) (first color of the colormap) and <max> (last color), \where <max> stands for the maximum absolute value. \If it is a positive number \<number> then the values (resp. absolute values) are normalized between -<number> (resp. 0) (first color) and <number> (last color). Default value is 'max'.}}}");    return(YES);  }             graph = (GRAPHIMAGE) o;    /* the 'graph' and 'cgraph' fields */  if (!strcmp(field,"graph") || !strcmp(field,"cgraph")) {    if (*argv == NULL) {      SetResultValue(graph->image);      return(YES);    }    argv = ParseArgv(argv,tIMAGEI,&image,0);    if (image->ncol == 0 || image->nrow == 0) Errorf("_SetGraphImage() : You cannot display an empty image");    DeleteImage(graph->image);          if (!strcmp(field,"graph")) {      graph->image = image;      AddRefValue(image);    }    else {      graph->image = NewImage();      CopyImage(image,graph->image);    }    o->rx = -.5;    o->rw = image->ncol;    o->ry = -.5;    o->rh = image->nrow;    UpdateGlobalRectGObject(o);       return(YES);  }  /* The colormap field */  if (!strcmp(field,"cm")) {    if (*argv == NULL) {      SetResultStr(GetColorMapName(graph->cm));      return(YES);      }        argv = ParseArgv(argv,tCOLORMAP,&(graph->cm),0);    return(YES);  }  /* The norm field */  if (!strcmp(field,"norm")) {    if (*argv == NULL) {      if (graph->norm == NormNone && graph->flagAbsVal) SetResultStr("+none");      else if (graph->norm == NormNone) SetResultStr("none");      else if (graph->norm == NormMax && graph->flagAbsVal) SetResultStr("+max");      else if (graph->norm == NormMax) SetResultStr("max");      else if (graph->flagAbsVal) SetResultf("+%g",graph->norm);      else SetResultFloat(graph->norm);      return(YES);      }        ParseVal(*argv,&val);    if (GetTypeValue(val) == strType) {      str = CastValue(val,STRVALUE)->str;      if (*str=='+') {graph->flagAbsVal = YES; str++;}      else {graph->flagAbsVal = NO;}      if (!strcmp(str,"none")) graph->norm = NormNone;       else if (!strcmp(str,"max")) graph->norm = NormMax;     }    else {      str = *argv;      if (*str == '+') {graph->flagAbsVal = YES; str++;}      else {graph->flagAbsVal = NO;}      ParseFloat(str,&f);      if (f <= 0) Errorf("_SetGraphImage() : Bad '-norm' value '%s'",*argv);      graph->norm = f;    }    argv++;    NoMoreArgs(argv);    return(YES);  }    /* The 'rect' field */  if (!strcmp(field,"rect")) {     NoMoreArgs(argv);    o->rx = -.5;    o->rw = graph->image->ncol;    o->ry = -.5;    o->rh = graph->image->nrow;    lv = TNewListv();    SetResultValue(lv);    AppendFloat2Listv(lv,o->rx);    AppendFloat2Listv(lv,o->ry);    AppendFloat2Listv(lv,o->rw);    AppendFloat2Listv(lv,o->rh );    UpdateGlobalRectGObject(o);    return(YES);  }  return(NO);}/* The drawing procedure */static void _DrawGraphImage (WINDOW win, GOBJECT obj, int x, int y,int w,int h){  GRAPHIMAGE graph;  GOBJECT o1;  IMAGE image;    int nColors;  long c;  unsigned long color,bg;  int nRow,nCol;  int indexY,indexX;  LWFLOAT valMin,valMax,val;  LWFLOAT fx,fy;  int i,j;   /* Some inits */  graph = (GRAPHIMAGE) obj;  image = graph->image;  if (image == NULL) return;  if (image->ncol == 0 || image->nrow == 0) return;  if (graph->norm == NormMax) {    MinMaxImage(image,NULL,NULL,&valMin,NULL,NULL,&valMax);    valMax = MAX(fabs(valMin), fabs(valMax));  }  else if (graph->norm == NormNone) valMax = -1;  else valMax = graph->norm;      /* Get the number of colors of the colormap */  nColors = ColorMapSize(graph->cm);  bg = graph->bgColor;  o1 = obj;  while(bg & invisibleColor) {    o1 = (GOBJECT) o1->father;    if (o1 == NULL) break;    bg = o1->bgColor;  }  if (bg &invisibleColor) bg = bgColor;    /* The size of the image to be drawn */  nRow = h+1;    nCol = w+1;     /* Allocation of the pixmap */  WInitPixMap(nRow,nCol);   /*   * Loop on the rows    */  for (i=y;i<=y+h;i++) {      /* Get local ordinate fy */    Global2Local(obj,0,i,&fx,&fy);        /* Transform it in the number of the row */       fy = (int) (fy+.5);      if (fy < 0) fy = 0;      else if (fy >= image->nrow) fy = image->nrow-1;      indexY = (int) fy;   /*     * Loop on the columns      */    for (j=x;j<=x+w;j++) {      /* Get local abscissa */      Global2Local(obj,j,0,&fx,&fy);            /* Transform it into an index for the signal */            fx = (int) (fx+.5);      if (fx < 0) fx = 0;      else if (fx >= image->ncol) fx = image->ncol-1;      indexX = (int) fx;           val = image->pixels[indexY*image->ncol+indexX];      if (graph->flagAbsVal) val = fabs(val);      if (graph->norm == NormNone) c = (int) (val+.5);      else if (graph->flagAbsVal) c = (int) ((nColors * val)/valMax);       else c = (int) ((nColors * (val/(2*valMax)+.5)));       c = (c>=nColors ? nColors-1 : c);	  c = (c<0 ? 0 : c);	  color = c+graph->cm;      /* Then set the point */       WSetPixelPixMap(i-y,j-x,color);           }   }  /* Display the image */  WDisplayPixMap(win,x,y);}/* Defining the GraphImage gclass */  void DefineGraphImage(void){  theGraphImageClass = NewGClass("GraphImage",theGObjectClass,"image");   theGraphImageClass->nbBytes = sizeof(GraphImage);  theGraphImageClass->init = _InitGraphImage;  theGraphImageClass->deleteContent = _DeleteContentGraphImage;  theGraphImageClass->set = _SetGraphImage;  theGraphImageClass->draw = _DrawGraphImage;    theGraphImageClass->varType = imageiType;  theGraphImageClass->flags &= ~(GClassMoveResize+GClassLocalCoor);  theGraphImageClass->info = "Graphic Class that allows to display image";  }

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
精品久久久久久久久久久久久久久| 国产成人免费视频| 精品国产91乱码一区二区三区| 国产成人午夜精品5599| 亚洲第一电影网| 国产精品久久777777| 日韩一区二区免费视频| 92精品国产成人观看免费| 国内外成人在线| 亚洲国产成人tv| 亚洲男同1069视频| 国产欧美精品一区二区色综合朱莉| 欧美日韩激情一区二区| 91视频www| 成人午夜激情视频| 精品一区二区三区的国产在线播放| 亚洲精品美国一| 国产精品久99| 国产精品久久免费看| 久久综合狠狠综合久久激情 | 亚洲黄网站在线观看| 久久综合成人精品亚洲另类欧美| 欧美日产国产精品| 日本精品一级二级| 91原创在线视频| 成人一区二区视频| 国产精品一区不卡| 韩国一区二区在线观看| 另类小说欧美激情| 免费高清不卡av| 免费人成黄页网站在线一区二区 | 亚洲一区二区三区四区五区黄| 中文字幕在线免费不卡| 国产精品免费aⅴ片在线观看| 精品av综合导航| 精品成a人在线观看| 日韩免费观看高清完整版在线观看| 欧美日本免费一区二区三区| 在线看不卡av| 91国产视频在线观看| 91久久人澡人人添人人爽欧美| 91在线porny国产在线看| 91小视频在线观看| 欧洲视频一区二区| 欧美视频在线一区二区三区| 欧美三级一区二区| 欧美猛男超大videosgay| 欧美图片一区二区三区| 欧美剧在线免费观看网站 | 91在线云播放| 91免费在线看| 欧美日韩国产在线观看| 欧美人动与zoxxxx乱| 欧美一区国产二区| 欧美精品一区二区三区四区| 久久久久久久国产精品影院| 天天色综合天天| 麻豆传媒一区二区三区| 国产剧情在线观看一区二区 | 在线播放日韩导航| 日韩精品在线网站| 欧美激情一区二区三区蜜桃视频| 中文字幕日韩精品一区| 亚洲国产成人高清精品| 久久se精品一区二区| 成人精品视频网站| 欧美色老头old∨ideo| 精品久久99ma| 中文字幕欧美一| 性做久久久久久久免费看| 久久精品国产99国产| 福利一区二区在线观看| 91福利视频在线| 精品三级在线看| 17c精品麻豆一区二区免费| 天天综合天天做天天综合| 国产伦精品一区二区三区视频青涩 | 欧美久久一二区| 精品国产sm最大网站| 欧美高清在线视频| 亚洲国产日韩a在线播放性色| 毛片av中文字幕一区二区| 成人av资源网站| 欧美一区二区三区四区五区 | 婷婷夜色潮精品综合在线| 久久99国产精品久久99果冻传媒| 成人av片在线观看| 91精品国产综合久久精品性色| 久久久久久久久岛国免费| 亚洲国产一区二区a毛片| 国产成人亚洲综合a∨婷婷| 欧美亚洲动漫制服丝袜| 久久嫩草精品久久久精品| 91国偷自产一区二区三区成为亚洲经典 | 国产精品一区2区| 欧洲av一区二区嗯嗯嗯啊| 2024国产精品| 亚洲国产成人精品视频| 成人网在线播放| 91精品在线一区二区| 一区在线中文字幕| 韩国在线一区二区| 欧美精品一二三区| 亚洲美女屁股眼交| 成人午夜免费视频| 亚洲精品在线免费观看视频| 亚洲 欧美综合在线网络| 99久久久国产精品| 国产视频一区在线观看| 麻豆传媒一区二区三区| 欧美日韩国产精选| 亚洲欧美日韩久久精品| 成人免费视频国产在线观看| 精品国产网站在线观看| 亚洲r级在线视频| 欧美综合一区二区| 亚洲美女免费在线| 99r精品视频| 国产精品久久777777| 国产成人av资源| 国产亚洲女人久久久久毛片| 老司机精品视频在线| 欧美日韩在线一区二区| 尤物在线观看一区| 91在线观看美女| 亚洲欧美日本韩国| 色综合久久六月婷婷中文字幕| 国产精品久久久一本精品| 成人黄色电影在线 | 欧美亚洲综合另类| 亚洲最大成人网4388xx| 色婷婷久久久亚洲一区二区三区| 亚洲欧美怡红院| 99久久精品国产麻豆演员表| 国产精品全国免费观看高清 | 午夜视频久久久久久| 欧美日韩五月天| 亚洲一区二区五区| 91黄色小视频| 五月激情丁香一区二区三区| 欧美猛男男办公室激情| 美女www一区二区| 亚洲精品一区二区三区99| 国产乱码一区二区三区| 精品理论电影在线观看| 国产成人av电影在线| 国产精品色呦呦| 91福利视频网站| 日韩av一区二区三区| 日韩欧美的一区二区| 国产一区二区三区免费在线观看| 国产午夜亚洲精品不卡| 成人av片在线观看| 亚洲国产人成综合网站| 日韩欧美自拍偷拍| 国产黄色91视频| 成人欧美一区二区三区1314 | 欧美在线啊v一区| 午夜欧美大尺度福利影院在线看| 91精品一区二区三区久久久久久 | 欧美亚男人的天堂| 日韩高清国产一区在线| www日韩大片| 色综合激情五月| 免费成人小视频| 国产精品毛片无遮挡高清| 欧美亚洲图片小说| 麻豆成人综合网| 亚洲色图欧美在线| 日韩一区二区电影在线| 成人性视频免费网站| 亚洲成av人影院在线观看网| 精品粉嫩aⅴ一区二区三区四区| 成人激情动漫在线观看| 五月天视频一区| 国产欧美视频一区二区| 欧美在线看片a免费观看| 激情综合网天天干| 亚洲精品视频一区二区| 精品美女一区二区三区| 91色porny在线视频| 久久99精品国产.久久久久久| 一区视频在线播放| 日韩免费高清视频| 日本韩国精品一区二区在线观看| 精品在线免费视频| 一区二区国产视频| 久久久噜噜噜久久人人看| 欧美中文字幕一区| 成人听书哪个软件好| 日本免费在线视频不卡一不卡二| 国产精品色在线观看| 日韩免费高清av| 欧美性大战久久久久久久蜜臀| 风间由美一区二区av101| 免费一级欧美片在线观看| 亚洲精品日韩一| 国产婷婷色一区二区三区四区 | 久久福利资源站| 一区二区成人在线|