mzapo_canvas.c
void Canvas2CanvasFull(Canvas* A, Canvas* B, unsigned int B_x, unsigned int B_y, bool transparent, RGB* transparent_color){

	// Iterate image a and copy pixel by pixel values from canvas A to B
	for(int A_y = 0; A_y < A->h; A_y++){
		for(int A_x = 0; A_x < A->w; A_x++){
			// Check boundraries
			unsigned int Target_x = A_x + B_x; // Origin from A + offset
			unsigned int Target_y = A_y + B_y; // Origin from A + offset
			
			if((Target_x < B->w) && (Target_y < B->h)){ 
				// Grab pixel from canvas A and copy it to canvas B
				RGB color = GetPixelValue(A_x, A_y, A); // From A
				
				if((color.R == transparent_color->R) && (color.G == transparent_color->G) && (color.B == transparent_color->B) && (transparent == true)){
					continue; // Transparent pixel
				}else{
					ColorCanvasPixel(Target_x, Target_y, &color, B); // Color B
				}
				
			}else{
				continue; // Out of bounds
			}
		}
	}
	return;
}
/*  This functions takes one canvas A and copies is to another cavnas B.
	To coordiantions specified by B_x and B_y. B_x and B_y are basically offsets in B.
	No need to worry about overflow. It's taken care of.  */
This functions takes one canvas A and copies is to another cavnas B.
To coordiantions specified by B_x and B_y. B_x and B_y are basically offsets in B.
No need to worry about overflow. It's taken care of.
This functions takes one canvas A and copies is to another cavnas B . To coordiantions specified by B_x and B_y . B_x and B_y are basically offsets in B . No need to worry about overflow . It ' s taken care of .
void Canvas2CanvasFull(Canvas* A, Canvas* B, unsigned int B_x, unsigned int B_y, bool transparent, RGB* transparent_color){
	for(int A_y = 0; A_y < A->h; A_y++){
		for(int A_x = 0; A_x < A->w; A_x++){
			unsigned int Target_x = A_x + B_x; 
			unsigned int Target_y = A_y + B_y; 
			if((Target_x < B->w) && (Target_y < B->h)){ 
				RGB color = GetPixelValue(A_x, A_y, A); 
				if((color.R == transparent_color->R) && (color.G == transparent_color->G) && (color.B == transparent_color->B) && (transparent == true)){
					continue; 
				}else{
					ColorCanvasPixel(Target_x, Target_y, &color, B); 
				}
			}else{
				continue; 
			}
		}
	}
	return;
}
void Canvas2CanvasFull ( Canvas * A , Canvas * B , unsigned int B_x , unsigned int B_y , bool transparent , RGB * transparent_color ) { for ( int A_y = 0 ; A_y < A -> h ; A_y ++ ) { for ( int A_x = 0 ; A_x < A -> w ; A_x ++ ) { unsigned int Target_x = A_x + B_x ; unsigned int Target_y = A_y + B_y ; if ( ( Target_x < B -> w ) && ( Target_y < B -> h ) ) { RGB color = GetPixelValue ( A_x , A_y , A ) ; if ( ( color . R == transparent_color -> R ) && ( color . G == transparent_color -> G ) && ( color . B == transparent_color -> B ) && ( transparent == true ) ) { continue ; } else { ColorCanvasPixel ( Target_x , Target_y , & color , B ) ; } } else { continue ; } } } return ; }
This functions takes one canvas A and copies is to another cavnas B.
This functions takes one canvas A and copies is to another cavnas B .
// Iterate image a and copy pixel by pixel values from canvas A to B // Check boundraries // Origin from A + offset // Origin from A + offset // Grab pixel from canvas A and copy it to canvas B // From A // Transparent pixel // Color B // Out of bounds