📄 setfiguresposition.m
字号:
function setFiguresPosition(handle,to)
% setFiguresPosition Set the position of a chess figure.
% The position of a given chess figure is set.
%
% Inputs:
% * handle ... handle to the chess figure
% * to ... position in matrix notation
%
% Outputs:
% * Changes the chess figures position a specified
%
% Example
% Assume a figure with "handle" should be placed at [2 3].
% The command |setFiguresPosition(handle,[2 3])| manages that.
%
% See also: show
%
%% Signature
% Author: W.Garn
% E-Mail: wgarn@yahoo.com
% Date: 2006/03/23 12:00:00
%
% Copyright 2006 W.Garn
%
global board
if board.which_set==1
op = get(handle,'Position');
set(handle,'Position',[to(2)-.5,9-to(1)-.5, op(3)]);
else
set(handle,'XData',to(2)-1+[.1 .9]);
set(handle,'YData',8-to(1)+[.1 .9]);
end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -