📄 mask.m
字号:
function [x,y,s] = mask(a,idx,ins,vals)if length(ins) == 2 rot = strcmp(ins{2},'normal'); orient = ins{1};else rot = 1; orient = ins{1}; end[xc,yc] = fm_draw('circle','Ltc',orient);switch vals{3} case '3' x = cell(10,1); y = cell(10,1); s = cell(10,1); x{1} = xc; y{1} = yc; s{1} = 'k'; x{2} = xc+1.4; y{2} = yc; s{2} = 'k'; x{3} = [2.4 3.5]; y{3} = [0 0]; s{3} = 'k'; x{4} = [-1 -2]; y{4} = [0 0]; s{4} = 'k'; x{5} = 0; y{5} = 2-4*rot; s{5} = 'w'; x{6} = [0.8 0.8]; y{6} = 3*rot-[1.3 1.7]; s{6} = 'g'; x{7} = [0.65 0.95 0.95 0.65 0.65]; y{7} = [3.4*rot-1.7 3.4*rot-1.7 4*rot-2 4*rot-2 3.4*rot-1.7]; s{7} = 'g'; x{8} = [0.8 -0.8]; y{8} = [2.4*rot-1.2 1.3-2.6*rot]; s{8} = 'g'; x{9} = [-0.6 -0.8]; y{9} = [1.1-2.2*rot 1.2-2.4*rot]; s{9} = 'g'; x{10} = [-0.8 -0.8]; y{10} = [1-2*rot 1.2-2.4*rot]; s{10} = 'g'; otherwise x = cell(8,1); y = cell(8,1); s = cell(8,1); x{1} = xc; y{1} = yc; s{1} = 'k'; x{2} = xc+1.4; y{2} = yc; s{2} = 'k'; x{3} = [2.4 2.8]; y{3} = [0 0]; s{3} = 'k'; x{4} = [3.1 3.5]; y{4} = [0 0]; s{4} = 'k'; x{5} = [-1 -2]; y{5} = [0 0]; s{5} = 'k'; x{6} = 0; y{6} = 2; s{6} = 'w'; x{7} = [ 2.95 2.95 -0.8 -0.8 0.7 1.1 0.7 0.7]; y{7} = [-0.15 -2 -2 -1.2 1.2 0.5 1.2 1.0]; s{7} = 'g'; x{8} = [2.8 3.1 3.1 2.8 2.8]; y{8} = [-0.15 -0.15 0.15 0.15 -0.15]; s{8} = 'g'; end [x,y] = fm_maskrotate(x,y,orient);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -