function fill_rect_rect(limcao,limcai)
global pot_press
%FIND BOUNDARY POINTS OF OUTER RECTANGLE
x1=limcao(1);
x2=limcao(1)+limcao(3);
y1=limcao(2);
y2=limcao(2)+limcao(4);
t=1;
for s=x1:x2
    rect(t,1)=s;
    rect(t,2)=y2;
    t=t+1;
end
for s=(y2-1):-1:y1
    rect(t,1)=x2;
    rect(t,2)=s;
    t=t+1;
end
for s=(x2-1):-1:x1
    rect(t,1)=s;
    rect(t,2)=y1;
    t=t+1;
end
for s=(y1+1):y2
    rect(t,1)=x1;
    rect(t,2)=s;
    t=t+1;
end
outer=rect;
clear rect

%FIND BOUNDARY POINTS OF INNER RECTANGLE
x1=limcai(1);
x2=limcai(1)+limcai(3);
y1=limcai(2);
y2=limcai(2)+limcai(4);
t=1;
for s=x1:x2
    rect(t,1)=s;
    rect(t,2)=y2;
    t=t+1;
end
for s=(y2-1):-1:y1
    rect(t,1)=x2;
    rect(t,2)=s;
    t=t+1;
end
for s=(x2-1):-1:x1
    rect(t,1)=s;
    rect(t,2)=y1;
    t=t+1;
end
for s=(y1+1):y2
    rect(t,1)=x1;
    rect(t,2)=s;
    t=t+1;
end
inner=rect;
clear rect

polygon=vertcat(outer,inner);
col1=polygon(:,1);
col2=polygon(:,2);
if pot_press==1
    patch(col1,col2,'w','EdgeColor','w','EdgeAlpha',0)
else
    patch(col1,col2,'k','EdgeColor','w','EdgeAlpha',0)
end
return

