ibgdpixmap.h

来自「有限元学习研究用源代码(老外的),供科研人员参考」· C头文件 代码 · 共 41 行

H
41
字号
/* last edit: Ilja Schmelzer -------------- 11-OCT-1994 11:36:08.50	*/
/************************************************************************/
/*                                                                      */
/*  <<< I B G >>> - Intersection - Based Grid generation package 	*/
/*                                                                      */
/*  Version 1.1             author:  schmelzer@iaas-berlin.d400.de      */
/*                                                                      */
/*  to be distributed under IBG license conditions (see "readme.ibg")	*/
/*                                                                      */
/************************************************************************/
/*	geometry description defined by a pixmap			*/

/* in ibgdpixmap.c only the following definitions will be used:		*/

#define ibgPixmapSegment(p,ix,iy)	((p).map[(ix)+(p).lx*(iy)])
#define ibgPixmapFree(p)	free((p).map)
#define ibgPixmapLx(p)		((p).lx)
#define ibgPixmapLy(p)		((p).ly)
#define ibgPixmapAlloc(p)	(p).map = malloc((p).lx * (p).ly)

/* So, the implementation of the pixmap can be easily replaced:		*/
typedef struct{
  	char	*map;		/* one byte per pixel	*/
	int	lx;		/* pixel in x-direction	*/
	int	ly;		/* pixel in y-direction	*/
}ibgPixmap;

#ifdef IBG_H
ibGeometry ibgdPixmap(ibgPixmap	*px,
		ibgFloat xmin, ibgFloat xmax,
		ibgFloat ymin, ibgFloat ymax);
/* 
	(xmin,ymin)	has the segment ibgPixmapSegment(0,0)
	(xmax,ymax)	has the segment ibgPixmapSegment(lx-1,ly-1)
*/
#endif

#ifdef IBGOUTPUT_H
int ibgdPixmapRead(ibgPixmap *p, int *colors, ibgColor *colmap, char *fname);
#endif

⌨️ 快捷键说明

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