Layer.mainImageBufferPitch

機能/意味
Main image buffer pitch
タイプ
Layerクラスのプロパティ (読み出し専用)
説明
 Represents the pitch (number of bytes to the next lower scanline) of the image buffer of the main image (a 32bpp bitmap containing color and mask (opacity) information).
 This property is to provide a means of direct access to the image buffer for plugins etc.
 Assuming that tjs_uint32 is a 32-bit integer type and tjs_uint8 is an 8-bit (1 byte) integer type, the pointer to the image position (x, y) can be calculated as follows by writing in C language.
( (tjs_uint32*)( (tjs_uint8*)mainImageBuffer + y*mainImageBufferPitch )) + x
 Note that this property returns the number of bytes, not the number of pixels until the next scanline. This number may be slightly larger than the exact number of bytes required for the image width.
 Note that this property can be negative.
参照
Layer.mainImageBuffer
Layer.mainImageBufferForWrite