画矩形操作(可调节,边缘线宽度,边缘线颜色,内部填充颜色),模板如下:
set(rectangle(‘Position’, [起点x坐标,起点y坐标,x轴方向长度,y轴方向长度]), ‘EdgeColor’, [R,G,B],’LineWidth’, 线宽, ‘FaceColor’, [R,G,B])
举个例子:
set(rectangle('Position', [0,0,2440,1220]), 'EdgeColor', [0, 0, 0], 'LineWidth',0.8, 'FaceColor', [245/255,245/255,220/255]);
rect_H = rectangle('Position', [0, 0, 500, 500]);
set(rect_H, 'EdgeColor', [0,0,0], 'FaceColor', [160/255,82/255,45/255]);
效果图如下: