Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
6.1.0 - 日本語

Change language to:
English - Français - Português - Русский

Please note that the recommended version of Scilab is 2024.0.0. This page might be outdated.
See the recommended documentation of this function

Scilabヘルプ >> Graphics > property > get

get

グラフィックエンティティまたはユーザーインターフェイスオブジェクト からプロパティの値を取得する.

呼び出し手順

h=get(prop)

val=get(h,prop)

val=get(handlePath,prop)

val=h.prop

引数

h

ハンドル, プロパティを取得するエンティティのハンドル. h はハンドルのベクトルとすることができ,この場合, h に含まれる全てのオブジェクトに関するプロパティの値を返します. h0 を指定することができ, この場合,ルートオブジェクトのプロパティが取得されます. get(0) とコールすると, 設定プロパティを有する "Console"ハンドルが返されます.

handlePath

グラフィックエンティティを指すパスを有する文字列. このパスはグラフィックエンティティ"Tag"プロパティと グラフィック階層におけるその親の"Tag"プロパティから, "figuretag/entitytag"形式 (エンティティが図の子の場合)で作られます.

"figuretag/entity1tag/entity2tag/entitntag/entitytag"のように より深い階層レベルも使用できます. 複数パス検索用にワイルドカードも使用できます. パスにマッチした最初のエンティティが使用されます. k

prop

プロパティ名を表す文字列.

val

プロパティの値.

説明

このルーチンはグラフィクエンティティまたはGUIオブジェクトから指定したプロパティの 値を取得するために使用されます. この場合,ハンドルのドット演算子を使用することと等価です. 例えば, get(h,"background")h.backgroundと等価です.

プロパティ名は文字列です.存在する全てのプロパティの一覧を得るには, graphics_entities,もしくは ユーザインターフェイスオブジェクトについてはuicontrol を参照ください.

get 関数はプロパティのみを引数に指定してコールすることも 可能です.この場合,そのプロパティは以下のどれかとする必要があります (他のプロパティ名を指定したコールした場合, get[]を返します):

current_entity または hdl

直近に作成された(そしてまだ存在する)エンティティのハンドルを返します. get('current_entity') および get('hdl')gceと等価です.

current_figure

カレントのグラフィック図のハンドルを返します. get('current_figure')gcfと等価です.

current_axes

カレントの軸のハンドルを返します. get('current_axes')gcaと等価です.

default_figure

デフォルトの図のエンティティのハンドルを返します. get('default_figure')gdfと等価です.

default_axes

デフォルトの軸のエンティティのハンドルを返します. get('default_axes')gdaと等価です.

figures_id

オープンした全てのグラフィク図のIDを有する行ベクトルを返します. get('figures_id')winsidと等価です.

// グラフィックエンティティ用

 clf()

// シンプルなグラフィックオブジェクト

subplot(121);

x=[-.2:0.1:2*%pi]';

plot2d(x-2,x.^2);

subplot(122);

xrect(.2,.7,.5,.2);

xrect(.3,.8,.3,.2);

xfarc(.25,.55,.1,.15,0,64*360);

xfarc(.55,.55,.1,.15,0,64*360);

xstring(0.2,.9,"Example <<A CAR>>");

h=get("current_entity") //新規に作成されたオブジェクトを取得

h.font_size=3;

f=get("current_figure") //カレントの図を取得

f.figure_size

f.figure_size=[700 500];

f.children

f.children(2).type

f.children(2).children

f.children(2).children.children.thickness=4;

a=get("current_axes") //カレントの軸を取得

a.children.type

a.children.foreground //グラフィックオブジェクトの集合の前景色を取得

a.children.foreground=9;

// ユーザーインターフェイスオブジェクト用

h=uicontrol('string', 'Button'); // ボタンを有するウインドウをオープン.

p=get(h,'position'); // ボタンの位置を取得

disp('Button width: ' + string(p(3))); // ボタンの幅を出力

close(); // 図を閉じる

// Using path

f = figure("dockable", "off", "menubar", "none", "toolbar", "none", "infobar_visible", "off", "tag", "mainfig");

frameHandle = uicontrol("parent", f, "style", "frame", "position", [200 200 190 100], "tag", "myframe");

btnHandle = uicontrol("parent", frameHandle, "position", [20 20 150 30], "string", "button", "tag", "example");

set("mainfig/myframe/example", "string", "complete path");

get("mainfig/myframe/example", "string")

set("mainfig/*/example", "string", "wildcard path");

get("mainfig/*/example", "string")

set("myframe/example", "string", "partial path");

get("myframe/example", "string")

Report an issue
<< property property set >>

Copyright (c) 2022-2023 (Dassault Systèmes)
Copyright (c) 2017-2022 (ESI Group)
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Tue Feb 25 08:53:23 CET 2020