% Draw user-specified rectangles

close all;
figure;
axis ([0 1 0 1]);
axis equal off;
hold on;

% TODO: Draw background
% Fill the [0,1]x[0,1] canvas with DrawRect.m
DrawRect(  ,  ,  ,  , 'k');
title('Make two clicks to paint a rectangle');

% TODO: Wait for user inputs
% You can either use ginput(2) once, or use ginput(1) twice
ginput(  );

% TODO: A loop to draw rectangles and wait for next user inputs, 
% until the user clicks outside of the canvas
% Use while loop to check if the user input is inside of the canvas
while 

	% TODO: Use the two points the user clicks to find the 4 corners of the
	% rectangle, and use DrawRect.m to draw it
	DrawRect(  ,  ,  ,  , 'y');

	% TODO: Wait for the next user inputs by using ginput(2) once 
        % or ginput(1) twice
	ginput(  );
	
end