function aObj = domove(aObj, x, y)
%SCRIBEHGOBJ/DOMOVE

%   Copyright (c) 1984-98 by The MathWorks, Inc.
%   $Revision: 1.6 $  $Date: 1997/12/06 00:41:27 $

figH = gcbf; oldFigUnits = get(figH,'Units');
oldAxUnits = get(A,'Units');

set(figH,'Units','pixels');
myFigPos = get(figH,'Position');


set(A,'Units','pixels');
pos = get(A,'Position');

% restore original units
set(figH,'Units',oldFigUnits);
set(0,'Units',oldUnits);

% update my position
A = set(A,'Units',oldAxUnits);


function hit = IsInRect(rect,pt)
% ISINRECT Local function

% rect = [l b w h]
rectBounds = [rect(1:2) ; rect(1:2)+rect(3:4)];
% rectBounds = [l b; r t];
hit = (pt >= rectBounds(1,:)) & (pt <=rectBounds(2,:));

