{{fbdoc item="title" value="ADD"}}----
Parameter to the ##[[KeyPgPutgraphics|Put]]## graphics statement which selects addition as the blitting method

{{fbdoc item="syntax"}}##
	**Put** [ //target//, ] [ STEP ] ( //x//,//y// ), //source// [ ,( //x1//,//y1// )-( //x2//,//y2// ) ], **Add**[ ,//multiplier// ]
##
{{fbdoc item="param"}}
	##**Add**##
		Required.
	##//multiplier//##
		Optional value between 0 and 255.  The source pixels are premultiplied by ##(//multiplier// / 256)## before being added.  If omitted, this value defaults to 255.

{{fbdoc item="desc"}}
	##**Add**## selects addition as the method for blitting an image buffer.  For each source and target pixel, the values of each respective component are added together to produce the result.
	The addition is saturated - i.e. if the sum of the two values is 256 or more, then it will be cropped down to 255.
	
	This method will work in all color modes.  Mask colors (color 0 for indexed images, magenta (##[[KeyPgRgb|RGB]](255, 0, 255)##) for full color images) will be skipped, though full color values of 0 (##[[KeyPgRgba|RGBA]](0, 0, 0, 0)##) will have also have no effect.

{{fbdoc item="ex"}}
	{{fbdoc item="filename" value="examples/manual/gfx/put-add.bas"}}%%(freebasic)
''open a graphics window
screenres 320, 200, 16

''create a sprite containing a circle
const as integer r = 32
dim c as any ptr = imagecreate(r * 2 + 1, r * 2 + 1, 0)
circle c, (r, r), r, rgb(255, 255, 192), , , 1, f

''put the sprite at three different multipier
''levels, overlapping each other in the middle
put (146 - r, 108 - r), c, add,  64
put (174 - r, 108 - r), c, add, 128
put (160 - r,  84 - r), c, add, 192

''free the memory used by the sprite
imagedestroy c

''pause the program before closing
sleep
%%
{{image class="center" title="Put Add example output" url="/images/add.png"}}
{{fbdoc item="diff"}}
	- New to ""FreeBASIC""

{{fbdoc item="see"}}
	-##[[KeyPgTransGfx|Trans]]##
	-##[[KeyPgAlphaGfx|Alpha]]##
	-##[[KeyPgCustomgfx|Custom]]##
	- ##[[KeyPgPutgraphics|Put (Graphics)]]##

{{fbdoc item="back" value="CatPgGfx2D|2D Drawing Functions"}}