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

📄 ellipse.c

📁 这是一个同样来自贝尔实验室的和UNIX有着渊源的操作系统, 其简洁的设计和实现易于我们学习和理解
💻 C
字号:
#include <u.h>#include <libc.h>#include <draw.h>staticvoiddoellipse(int cmd, Image *dst, Point *c, int xr, int yr, int thick, Image *src, Point *sp, int alpha, int phi, Drawop op){	uchar *a;	_setdrawop(dst->display, op);	a = bufimage(dst->display, 1+4+4+2*4+4+4+4+2*4+2*4);	if(a == 0){		fprint(2, "image ellipse: %r\n");		return;	}	a[0] = cmd;	BPLONG(a+1, dst->id);	BPLONG(a+5, src->id);	BPLONG(a+9, c->x);	BPLONG(a+13, c->y);	BPLONG(a+17, xr);	BPLONG(a+21, yr);	BPLONG(a+25, thick);	BPLONG(a+29, sp->x);	BPLONG(a+33, sp->y);	BPLONG(a+37, alpha);	BPLONG(a+41, phi);}voidellipse(Image *dst, Point c, int a, int b, int thick, Image *src, Point sp){	doellipse('e', dst, &c, a, b, thick, src, &sp, 0, 0, SoverD);}voidellipseop(Image *dst, Point c, int a, int b, int thick, Image *src, Point sp, Drawop op){	doellipse('e', dst, &c, a, b, thick, src, &sp, 0, 0, op);}voidfillellipse(Image *dst, Point c, int a, int b, Image *src, Point sp){	doellipse('E', dst, &c, a, b, 0, src, &sp, 0, 0, SoverD);}voidfillellipseop(Image *dst, Point c, int a, int b, Image *src, Point sp, Drawop op){	doellipse('E', dst, &c, a, b, 0, src, &sp, 0, 0, op);}voidarc(Image *dst, Point c, int a, int b, int thick, Image *src, Point sp, int alpha, int phi){	alpha |= 1<<31;	doellipse('e', dst, &c, a, b, thick, src, &sp, alpha, phi, SoverD);}voidarcop(Image *dst, Point c, int a, int b, int thick, Image *src, Point sp, int alpha, int phi, Drawop op){	alpha |= 1<<31;	doellipse('e', dst, &c, a, b, thick, src, &sp, alpha, phi, op);}voidfillarc(Image *dst, Point c, int a, int b, Image *src, Point sp, int alpha, int phi){	alpha |= 1<<31;	doellipse('E', dst, &c, a, b, 0, src, &sp, alpha, phi, SoverD);}voidfillarcop(Image *dst, Point c, int a, int b, Image *src, Point sp, int alpha, int phi, Drawop op){	alpha |= 1<<31;	doellipse('E', dst, &c, a, b, 0, src, &sp, alpha, phi, op);}

⌨️ 快捷键说明

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