请输入您要查询的百科知识:

 

词条 line
释义

函数“line”

函数“line”的基本释义

功 能: 在指定两点间画一直线

原 形: void far line(int x0, int y0, int x1, int y1);

头文件:graphics.h

参数:x0,y0为直线初始坐标,X1,Y1为末坐标

程序例:

#include "graphics.h"

#include "stdlib.h"

int main(void)

{

/* request auto detection */

int gdriver = DETECT, gmode, errorcode;

int xmax, ymax;

/* initialize graphics and local variables */

initgraph(&gdriver, &gmode, "");

/* read result of initialization */

errorcode = graphresult();

/* an error occurred */

if (errorcode != grOk)

{

printf("Graphics error: %s\",

grapherrormsg(errorcode));

printf("Press any key to halt:");

getch();

exit(1);

}

setcolor(getmaxcolor());

xmax = getmaxx();

ymax = getmaxy();

/* draw a diagonal line */

line(0, 0, xmax, ymax);

/* clean up */

getch();

closegraph(); /*关闭图形模式*/

return 0;

}

#line

命令# line改变__LINE__ 与__FILE__的内容,它们是在编译程序中预先定义的标识符。

命令的基本形式如下:

# line number["filename"]

其中的数字为任何正整数,可选的文件名为任意有效文件标识符。行号为源程序中当前行号,文件名为源文件的名字。命令# line主要用于调试及其它特殊应用。

函数“line”举例

例如,下面说明行计数从1 0 0开始;printf( ) 语句显示数1 0 2,因为它是语句#line 100后的第3行。

#line 100 /* 初始化行计数器* /

main ( ) /* 行号100 */

{ /* 行号101 */

p r i n t f ( " % d \\ n " ,__LINE__ ) ; /* 行号102 */

}遗传学 长分散核因子

音乐组合

简介

组合名称:LINE

所属地区:中国大陆

组和人数:2人

组合成员:稽伊、梅妮莎

代表歌曲:日本动漫片(迪迦奥特曼)中文版 片尾曲《永远的奥特曼》

其它信息:她俩是从国内几万名候选者中挑选出来的。她们青春亮丽的形象就像春绽放的花朵一样

闪耀着晶莹的光芒。

特点

“LINE”合不仅具备了当红的S.H.E和TWINS的长处,而且还具有她们独有的魅力,这

使她们在歌坛上更加耀眼夺目。

英语单词

词典解释:line

名词 n. [C]

1.绳,线,索

She hung the wash on the line.

她将洗好的衣服晾在绳子上。

2.线条

Draw a line from A to B.

从A点划一条线到B点。

3.列,排;(等待顺序的)行列

There is a long line at the ticket office.

售票处排着长队。

4.交通线;航线;铁路线

A new bus line runs straight to the airport.

一条新的巴士线路直抵机场。

5.(诗文的)一行

He quoted a few lines of Milton.

他引了弥尔顿的几行诗。

6.皱纹

His face is covered with lines.

他的脸上布满了皱纹。

7.外形,轮廓[P1]

The new car has very sleek lines.

这种新车线条很流畅。

8.电话线;电报线

Fredie was speaking on the other end of the line.

弗雷迪正在另一头接电话。

9.短简,短函[S]

Drop me a line when you arrive.

你到达以后给我来一封信。

10.方式,方法

His novels follow traditional lines.

他的小说是以传统的方法创作的。

11.(政治)路线,方针

The government took a hard line on strikes.

政府对罢工采取强硬的方针。

12.行业;擅长;兴趣

What is your line?

你是干哪一行的?

13.(货物等的)种类

This dress is one of our latest lines.

这件衣服是我们的最新产品之一。

14.赤道[the S]

15.界线;战线

A small group of soldiers were parachuted behind enemy lines.

一小队士兵被空降在敌人后方。

16.消息;迹象[S][(+on)]

Can you give me a line on the new boss?

你能跟我讲讲新老板的情况吗?

17.台词[P1]

She learned her lines in a few hours.

她不到几小时就记住了台词

18.正极

电路的正极与neutral (负极)相反

MATLAB函数名

在matlab命令窗口输入doc line,将获得一下帮助信息:(也可在命令窗口下输入help line获得帮助)

line(X,Y)

line(X,Y,Z)

line(X,Y,Z,'PropertyName',PropertyValue,...)

line('PropertyName',PropertyValue,...) low-level-PN/PV pairs only

h = line(...)

较常见的使用方法:

line([起点横坐标,终点横坐标],[起点纵坐标,终点纵坐标]),

例line([1,2],[3,4])将画出(1,3)到(2,4)的一条直线,而不是(1,2)到(3,4)。

当line(a,b)中,a b是相同大小的矩阵时,将会在对应的每一列做一条直线。

当line(a,b,c)时,相应地会在三维图中画一条线。

a b c 均为2XN矩阵。

计算机专业

1.计算机图形的基本要素

2.GIS中是基本图形要素,参考point、polygon等

随便看

 

百科全书收录4421916条中文百科知识,基本涵盖了大多数领域的百科知识,是一部内容开放、自由的电子版百科全书。

 

Copyright © 2004-2023 Cnenc.net All Rights Reserved
更新时间:2025/3/14 10:23:41