简体   繁体   English

获取Rasters DataBuffer是什么意思

[英]what does it mean to get a Rasters DataBuffer

I've been trying to practice some active rendering involving triple buffering and manipulating a BufferedImage's raster. 我一直在尝试练习一些主动渲染,包括三重缓冲和处理BufferedImage的栅格。 however, as I was watching some videos and reading articles, I noticed programers using this method invocation hierarchy to get the raster's pixels ((DataBufferInt) BufferedImage.getRaster().getDataBuffer()).getData() I know what does the method getRaster() return, but I'm confused about the other ones especially the getDataBuffer() . 但是,当我观看一些视频和阅读文章时,我注意到编程人员使用此方法调用层次结构来获取光栅的像素((DataBufferInt) BufferedImage.getRaster().getDataBuffer()).getData()我知道getRaster方法的作用()返回,但我对其他参数感到困惑,尤其是getDataBuffer() can somebody please explain what is a data buffer exactly, and what is happening when invoking those methods? 有人可以确切说明什么是数据缓冲区,调用这些方法时会发生什么?

Thanks 谢谢

It's an abstraction for the low level storage of the data being rendered. 这是用于呈现的数据的低级存储的抽象。 In your example, the data is stored in the buffer as an int array, but it could also be a byte, float, double, etc. 在您的示例中,数据作为int数组存储在缓冲区中,但也可以是字节,浮点数,双精度数等。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM