BitPasteTo

HC Graphics Bitmaps BitPasteTo
BitPasteFast BitPasteToScaled

BitPasteTo bitmapTo bitmapFrom x y


command which pastes the bitmapFrom with lower left corner at pixel position (x,y) inside the bitmapTo to bitmapTo.

Example:

to bitpastetotest
	clearScreen
	box
	PenUp setXY -10 -10
	bmp=BitCopy 200 200
	bmp2=BitCopy 200 200
	BitMakeTransparent bmp2 ScreenColor
	BitPasteTo bmp bmp2 (BitMaxX bmp)*0.4 (BitMaxY bmp)*0.4
	Home
	setXY -10 -10
	BitPaste bmp
	Home
	PenDown
end

An interesting effect is created when applying BitPasteTo with the bitmapFrom being the same as bitmapTo.

Example:

to bitpastetotest2
	clearScreen
	setPenColor RGBA 0 0 1 0.8
	box
	PenUp setXY -10 -10
	bmp=BitCopy 200 200
	BitMakeTransparent bmp ScreenColor
	BitPasteTo bmp bmp (BitMaxX bmp)*0.05 (BitMaxY bmp)*0.03
	Home
	setXY -10 -10
	BitPaste bmp
	Home
	PenDown
end

Example:

Reference:

BitPasteFast BitPasteToScaled