easyx.h画图相关函数

1.getpixel

COLORREF getpixel(int x,int y):用于获取点的颜色。
参数:
x
x坐标来获得颜色。
y
y坐标来得到颜色。

 

2.putpixel

void putpixel( int x, int y, COLORREF color):用于绘制点
参数:
x
点的x坐标。
y
点的y坐标。
color
点的颜色。

 

1.line

void line( int x1, int y1, int x2, int y2):此函数用于绘制直线。函数linerel和lineto也可以用来绘制直线。
参数:
x1
直线起始点的x坐标。
日元
直线起始点的y坐标。
x2
直线端点的x坐标。
y2
直线端点的y坐标。

 

1.rectangle

void rectangle( int left, int top, int right, int bottom):用于绘制矩形
参数:
left
矩形左边的x坐标。
top
矩形上端的y坐标。
right
矩形右边的x坐标。
bottom
矩形下端的y坐标。

 

2.fillrectangle

void fillrectangle( int left, int top, int right, int bottom):用于绘制带有边框的已填充矩形。

3.solidrectangle

void solidrectangle( int left, int top, int right, int bottom):用于绘制一个填充的、没有边框的矩形。

 

4.clearrectangle

void clearrectangle(int left, int top, int right, int bottom):使用背景色清除矩形区域。
参数:
left
矩形左边的x坐标。
top
矩形上端的y坐标。
right
矩形右边的x坐标。
bottom
矩形下端的y坐标。

 

1.circle

void circle( int x,int y, int radius):画一个不填充的圆
参数:
x
圆心的x坐标。
y
圆心的y坐标。
radius
圆的半径。

 

2.fillcircle

void fillcircle(int x, int y, int radius):用于绘制带边框的填充圆。

 

3.solidcircle

void solidcircle( int x, int y, int radius):用于绘制一个没有边框的填充圆。

 

4.clearcircle

void clearcircle( int x,int y, int radius):使用背景色清除圆形区域。
参数:
x
圆心的x坐标。
y
圆心的y坐标。
radius
圆的半径。

 

1.ellipse

void ellipse( int left, int top, int right, int bottom):用于绘制不填充的椭圆。
参数:
left
椭圆外切矩形的左上角x坐标。
top
椭圆外切矩形的左上角y坐标。
right
椭圆外切矩形的右下角x坐标。
bottom
椭圆外切矩形的右下角y坐标。

 

2.fillellipse

void fillellipse( int left, int top, int right, int bottom):用于绘制带有边框的填充椭圆。

3.solidellipse

void solidellipse( int left, int top, int right, int bottom):用于绘制一个填充的没有边框的椭圆。

 

4.clearellipse

void clearellipse(int left, int top, int right,int bottom):使用背景色清除一个椭圆形区域
参数:
left
椭圆外切矩形的左上角x坐标。
top
椭圆外切矩形的左上角y坐标。
right
椭圆外切矩形的右下角x坐标。
bottom
椭圆外切矩形的右下角y坐标。

1.roundrect

void roundrect( int left, int top, int right, int bottom, int ellipsewidth, int ellipseheight):用于绘制不填充的圆角矩形。
参数:
left
矩形左边的x坐标。
top
矩形上端的y坐标。
right
矩形右边的x坐标。
bottom
矩形下端的y坐标。
ellipsewidth
构成圆角矩形的椭圆的宽度。
ellipseheight
构成圆角矩形的椭圆的高度

2.fillroundrect

void fillroundrect( int left, int top, int right, int bottom, int ellipsewidth, int ellipseheight):绘制一个带边框的已填充圆角矩形。

 

3.solidroundrect

void solidroundrect( int left, int top, int right, int bottom, int ellipsewidth, int ellipseheight):用于绘制没有边框的填充圆角矩形。

 

4.clearroundrect

void clearroundrect(int left,int top,int right,int bottom,int ellipsewidth,int ellipseheight):使用背景色清除圆角矩形区域。
参数:
left
矩形左边的x坐标。
top
矩形上端的y坐标。
right
矩形右边的x坐标。
bottom
矩形下端的y坐标
ellipsewidth
构成圆角矩形的椭圆的宽度。
ellipseheight
构成圆角矩形的椭圆的高度。

1.arc

void arc( int left,int top, int right, int bottom, double stangle,double endangle):用来画弧线的
参数:
left
弧的外切矩形的左上纵坐标。
top
弧的外切矩形的左上纵坐标。
right
弧的外切矩形的右下x坐标。
bottom
弧的外切矩形的右下y坐标。
stangle
弧的起始角的弧度。
endangle
弧终止角的弧度。

1.pie

void pie( int left, int top, int right, int bottom, double stangle, double endangle):用于绘制未填充的扇区。
参数:
left
扇区所在的椭圆形的外切矩形的左上角x坐标。
top
扇区所在的椭圆形的外切矩形的左上纵坐标。
right
扇区所在的椭圆的外切矩形的右下x坐标。
bottom
扇区所在的椭圆的外切矩形的右下x坐标。
stangle
扇区的起始角度的弧度。
endangle
扇区端角的弧度。

2.fillpie

void fillpie( int left, int top, int right, int bottom, double stangle,double endangle):用于绘制带边框的填充扇区。

3.solidpie

void solidpie( int left, int top, int right, int bottom, double stangle, double endangle):用于绘制一个没有边框的填充扇区。

 

4.clearpie

void clearpie( int left, int top, int right, int bottom,double stangle,double endangle):使用背景色清除扇区。
参数:
left
扇区所在的椭圆形的外切矩形的左上角x坐标。
top
扇区所在的椭圆形的外切矩形的左上纵坐标。
right
扇区所在的椭圆的外切矩形的右下x坐标。
bottom
扇区所在的椭圆的外切矩形的右下x坐标。
stangle
扇区的起始角度的弧度。
endangle
扇区端角的弧度。

1.polyline

void polyline( const POINT *points, int num):用于绘制多条连续的直线。
参数:
points
每个点的坐标,数组元素的数量为num。
num
多个段的顶点数。

 

1.polygon

void polygon( const POINT *points, int num):用于绘制不填充的多边形
参数:
points
每个点的坐标,数组元素的数量为num。
该函数自动将多边形连接到末端。
num
多边形顶点的数目。

 

2.fillpolygon

void fillpolygon( const POINT *points, int num):该函数用于绘制带有边框的填充多边形。

 

3.solidpolygon

void solidpolygon( const POINT *points, int num):用于绘制填充的无边框多边形。

 

4.clearpolygon

void clearpolygon( const POINT *points, int num):使用背景色清除多边形区域。
参数:
points
每个点的坐标,数组元素的数量为num。
该函数自动将多边形连接到末端。
num
多边形顶点的数目。

 

1.polybezier

void polybezier( const POINT *points, int num):用于绘制三条方形贝塞尔曲线
参数:
points
描述三条方形贝塞尔曲线的坐标点。坐标为:起点、控制点1、控制点2、终点(起点)、控制点1、控制点2、终点(起点)、…,控制点2,终点2,终点。
num
坐标点的个数。由于描述一条三边Bezier曲线需要4个点,且后一条Bezier曲线的起点与前一条曲线的终点相同,因此确保(num - 1) 3 s 0是很重要的。

1.floodfill

void floodfill( int x, int y, COLORREF color, int filltype = FLOODFILLBORDER):用于填充区域。
参数:
x
要填满的区域内任意点的x坐标。
y
要填满的区域内任意点的y坐标。
color
要填充的边界或区域的颜色。确切的解释取决于参数filltype的值。
filltype
要执行的填充操作的类型。这可以是以下宏或值:
宏 value 描述
FLOODFILLBORDER 0 填充动作被填充在一个被颜色参数color包围的封闭区域中。
FLOODFILLSURFACE 1 填充动作由颜色参数color指定的连续颜色表面填充。

posted @ 2023-01-26 19:50  ImreW  阅读(383)  评论(0编辑  收藏  举报