首页 > 文档 > fullScreen()全屏
2017
07-03

fullScreen()全屏

8.fullScreen()

Name名称):fullScreen()//全屏

Examples例子):

例子一

 

// Run the code at the full dimensions of the screen currently在当前的屏幕上运行代码

// selected inside the Preferences window在Preferences窗口中选择

int x = 0;

void setup() {

  fullScreen();

  background(0);

  noStroke();

  fill(102);

}

 

void draw() {

  rect(x, height*0.2, 1, height*0.6);

  x = x + 2;

}

 

例子二

 

// If more than one screen is attached to the computer, run the如果在计算机上有多个屏幕,运行

// code at the full dimensions on the screen defined by the在屏幕上的完整维度上的代码

// parameter to fullScreen()参数设置为fullScreen()

int x = 0;

void setup() {

  fullScreen(2);

  background(0);

  noStroke();

  fill(102);

}

void draw() {

  rect(x, height*0.2, 1, height*0.6);

  x = x + 2;

}

 

Description描述):This function is new for Processing 3.0. It opens a sketch using the full size of the computer’s display. This function must be the first line in setup(). The size() and fullScreen() functions cannot both be used in the same program, just choose one.

这个函数是processing3.0的新功能。它使用计算机显示的全部大小来打开一个草图。这个函数必须是setup()中的第一行。大小()和fullScreen()函数不能在同一个程序中使用,只需要选择一个。

When fullScreen() is used without a parameter, it draws the sketch to the screen currently selected inside the Preferences window. When it is used with a single parameter, this number defines the screen to display to program on (e.g. 1, 2, 3…). When used with two parameters, the first defines the renderer to use (e.g. P2D) and the second defines the screen. The SPAN parameter can be used in place of a screen number to draw the sketch as a full-screen window across all of the attached displays if there are more than one.

当fullScreen()在没有参数的情况下使用时,它将草图绘制到当前在Preferences窗口中选择的屏幕。当它与一个参数一起使用时,这个数字定义屏幕显示在程序上(例如1、2、3…)。当使用两个参数时,第一个定义了渲染器的使用(例如P2D),第二个参数定义了屏幕。如果有多个显示,那么可以使用SPAN参数作为一个屏幕数字来绘制整个屏幕窗口的全屏窗口。

Prior to Processing 3.0, a full-screen program was defined with size(displayWidth, displayHeight).

在处理3.0之前,一个全屏的程序被定义为大小(显示宽度,显示高度)。

Syntax(语法):fullScreen()

fullScreen(display)

fullScreen(renderer)

fullScreen(renderer, display)

Parameters (参数):renderer——the renderer to use, e.g. P2D, P3D, JAVA2D (default) 使用的渲染器,例如P2D,P3D,JAVA2D(默认)

display——the screen to run the sketch on (1, 2, 3, etc. or on multiple screens using SPAN) 在(1、2、3等)上运行示意图的屏幕,或者在多个屏幕上使用SPAN。

Returns返回值):Void(

Related相关函数):settings()
setup()
size()
smooth()

 

 

 

 



最后编辑:
作者:卡萨布兰卡
这个作者貌似有点懒,什么都没有留下。

留下一个回复

你的email不会被公开。