1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
   | % --- Executes just before untitled is made visible.
function untitled_OpeningFcn(hObject, eventdata, handles, varargin)
% This function has no output args, see OutputFcn.
% hObject    handle to figure
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
% varargin   command line arguments to untitled (see VARARGIN)
% Choose default command line output for untitled
handles.output = hObject;
X = imread('37-creer-un-background-degrade-vertical-large.png', 'png');  % Charge l'image
ax = axes('Units', 'Normalized', 'Position', [0 0 1 1]);  % Création d'un objet Axes prenant toute la fenêtre
imagesc(X, 'Parent', ax)  % Affiche l'image
uistack(ax, 'bottom')     % Place l'objet Axes en arrière-plan
set(ax, 'Visible', 'off') %  Cache les marques "ticks"
set(handles.axes1,'Visible','Off');
t1 = text(.5,.5,'Sans le fond,','parent',handles.axes1,...
   'color','white','fontsize',12,'fontweight','bold','units','normalized',...
   'horizontalalignment','center','verticalalignment','middle');
uistack(t1,'top')
% Update handles structure
guidata(hObject, handles); | 
Partager