日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 人工智能 > 循环神经网络 >内容正文

循环神经网络

matlabapp窗口图像_matlab – 如何自定义App Designer图形的背景?

發布時間:2023/12/1 循环神经网络 54 豆豆
生活随笔 收集整理的這篇文章主要介紹了 matlabapp窗口图像_matlab – 如何自定义App Designer图形的背景? 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

>如果要為整個圖形設置純色背景顏色,則執行此操作需要

a documented way,例如:

% When creating a new uifigure:

fig = uifigure('Color',[R G B])

% if the uifigure already exists:

fig.Color = [R G B];

>如果你想改變一些地區的背景顏色,你可以添加一個沒有標題或邊框的uipanel(uipanel(…,’BorderType’,’none’,’Title’,”,’BackgroundColor’, [RGB])).

>如果要將圖像設置為整個圖形的背景:

function q41602238a

%% Turn off some warnings:

warning off Matlab:structOnObject

warning off Matlab:HandleGraphics:ObsoletedProperty:JavaFrame

%% 0. Create a uifigure:

app = uifigure();

%% 1. Get a handle to the webwindow:

while true

try

win = struct(struct(app).Controller).Container.CEF;

break

catch

pause(0.1); % Give the figure (webpage) some more time to load

end

end

%% 2. Find the data_tag of the DOM element we want to edit:

data_tag = char(struct(app).Controller.ProxyView.PeerNode.getId);

%% 3. Manipulate the DOM via a JS command

while true

try

win.executeJS(['dojo.style(dojo.query("[data-tag^=''' data_tag ''']")[0],"background-image","url(https://upload.wikimedia.org/wikipedia/commons/8/80/Wikipedia-logo-v2.svg")']);

break

catch

pause(0.1); % Maybe JS is still not ready.

end

end

結果:

>如果要將圖像設置為某個區域的背景:

function q41602238b

%% Turn off some warnings:

warning off Matlab:structOnObject

warning off Matlab:HandleGraphics:ObsoletedProperty:JavaFrame

%% 0. Create a some element:

app = uifigure();

pnl = uipanel(app);

%% 1. Get a handle to the webwindow:

while true

try

win = struct(struct(app).Controller).Container.CEF;

% disp(win.URL);

break

catch

pause(0.1); % Give the figure (webpage) some more time to load

end

end

%% 2. Find the id of the DOM element we want to edit:

data_tag = char(struct(pnl).Controller.ProxyView.PeerNode.getId);

widgetId = win.executeJS(['dojo.getAttr(dojo.query("[data-tag^=''' data_tag ''']")[0],"widgetid")']);

%% 3. Manipulate the DOM via a JS command

dojo_style_prefix = ['dojo.style(dojo.query("#' widgetId(2:end-1) '")[0],'];

while true

try

win.executeJS([dojo_style_prefix '"background-image","url(https://upload.wikimedia.org/wikipedia/commons/8/80/Wikipedia-logo-v2.svg")']);

break

catch

pause(0.1); % Maybe JS is still not ready.

end

end

結果:

筆記:

>最后兩個示例基于這兩個帖子:1,2,操作原理是在某些所需UI元素的樣式屬性中添加background-image:“…”條目(恰好是HTML DIV).

>可以在this GitHub存儲庫中找到用于編程操作App Designer圖形的工具.>示例圖像恰好是.svg,這很有趣,因為我們可以以這種格式導出“常規”MATLAB數字,然后將它們用作uifigure的背景:)

總結

以上是生活随笔為你收集整理的matlabapp窗口图像_matlab – 如何自定义App Designer图形的背景?的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。