Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/visual-studio-code/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Processing 有没有一种方法可以在处理过程中使用多个层?_Processing_Layer - Fatal编程技术网

Processing 有没有一种方法可以在处理过程中使用多个层?

Processing 有没有一种方法可以在处理过程中使用多个层?,processing,layer,Processing,Layer,有没有一种方法可以在处理过程中使用多个层 每个层都有自己的设置/绘制上下文。是的,有点像。考虑使用(基本上缓冲的,独立的画布)。然后,您可以在每个PGraphic中操纵图像,使每个图像都具有屏幕的大小(形成层),或者将PGraphic作为对象在屏幕上移动。你可以从一个地方开始。你是说多个窗口吗?不,PGraphics不是Window是的,这是一个已知的问题。有一种方法可以删除缓存。Look无法找出“g.removeCache(img);”中的“g”是什么;它是小程序的实例吗?g不是程序中声明的变

有没有一种方法可以在处理过程中使用多个层


每个层都有自己的设置/绘制上下文。

是的,有点像。考虑使用(基本上缓冲的,独立的画布)。然后,您可以在每个PGraphic中操纵图像,使每个图像都具有屏幕的大小(形成层),或者将PGraphic作为对象在屏幕上移动。你可以从一个地方开始。

你是说多个窗口吗?不,PGraphics不是Window是的,这是一个已知的问题。有一种方法可以删除缓存。Look无法找出“g.removeCache(img);”中的“g”是什么;它是小程序的实例吗?
g
不是程序中声明的变量,它是core.jar库的一部分。请原谅我非常近似的解释,但粗略地说,这是一种访问Java中底层
Graphics
模块的方法,在这种情况下,可以使用其内置方法之一先发制人地清除缓存。是否可以在不重新绘制/重置背景的情况下单独移动/翻译每个PGraphics?