Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenoit Bolsee <benoit.bolsee@online.be>2009-12-08 13:02:22 +0300
committerBenoit Bolsee <benoit.bolsee@online.be>2009-12-08 13:02:22 +0300
commit445d077cf4ecc84b5d5cf422bfb2040186d60164 (patch)
treee133b230734d2c20eab3b7c36f240bf6843d654e /source/blender/makesrna
parent5132b6a173fd88ead0bd7f0dd82bacf8672b3b4a (diff)
BGE: Add plot method to VideoTexture.ImageBuff class.
Synopsis: plot(brush,width,height,x,y,mode) plot(imgbuff,x,y,mode) The first form uses a byte array containing the brush shape. The second form uses another ImageBuff object as a brush. The ImageBuff object must be initialized before you can call these methods. Use load(rgb_buffer,sizex,sizey) method to create an image buffer of given size (with alpha channel set to 255). The brush is plotted directly in the image buffer. The texture is updated only when the VideoTexture.Texture parent object is refreshed: this will download the image buffer to the GPU. brush: Byte array containing RGBA data to be plotted in image buffer. The data must be continuous in memory, organized row by row starting from lower left corner of the image. Each pixel is 4 bytes representing RGBA data in that order. width: Horizontal size in pixels of image in brush. height: Vertical size in pixels of the image in brush. imgbuff:Another ImageBuff object that is used as a brush. The object must have been initialized first with load(). x: Horizontal position in pixel from left side of the image buffer where the brush will be plotted. The brush is plotted on pixels positions x->x+width-1. Clipping is performed if the brush falls partially outside the image buffer. y: Vertical position in pixel from bottom side of the image buffer where the brush will be plotted. mode: Mode of drawing. Use one of the following value: 0 : MIX 1 : ADD 2 : SUB 3 : MUL 4 : LIGHTEN 5 : DARKEN 6 : ERASE ALPHA 7 : ADD ALPHA 1000 : COPY RGBA (default) 1001 : COPY RGB 1002 : COPY ALPHA Modes 0 to 7 are 'blend' modes: the brush pixels are combined with the image pixel in various ways. Refer to Blender documentation to learn more about these modes.
Diffstat (limited to 'source/blender/makesrna')
0 files changed, 0 insertions, 0 deletions