Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
6.0.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 > handle > swap_handles

swap_handles

グラフィック階層の2つのハンドルを交換する.

呼び出し手順

swap_handle( handle1, handle2 )

パラメータ

handle1

交換する最初のハンドル.

handle2

交換する2番目のハンドル.

説明

swap_handles関数により グラフィック階層の2つのハンドルを交換することができます. 最初のハンドルは2番目のハンドルの位置と交換されます.

あるハンドルは他のハンドルと常に互換であるわけではないため, ハンドルの交換についえはいくつかの制約があります. 例えば, polylineとaxesハンドルを交換することはできません. この互換性に関する詳細については, graphics_entitiesページを参照ください.

このルーチンは同じ親の子の間で添字を変更する際に使用することができます.

//-----------------//

//  最初の例       //

//-----------------//

// 矩形を作成

xrect( 0.5, 0.5,0.5,0.5) ;

rect = gce() ;

// 円を作成

xarc( 0.5, 0.5, 0.5, 0.5, 0, 64 * 360 ) ;

circle = gce() ;

// 矢印を作成

xpoly([0,1],[0,1]) ;

arrow = gce() ;

arrow.polyline_style = 4 ;

arrow.arrow_size_factor = 4 ;

// 子のリストを取得

axes = gca()  ;

axes.children

// 順番を変更

swap_handles( rect, arrow ) ;

swap_handles( arrow, circle ) ;

// 新しい順番を得る

axes.children

//-----------------//

//  2番目の例      //

//-----------------//

// 2つのウインドウを作成

plot2d ;

axes1 = gca() ;

scf() ;

fec ;

axes2 = gca() ;

// 軸を交換

// 色マップは変更されないことに注意.

swap_handles( axes1, axes2 ) ;

参照

  • graphics_entities — グラフィックスエンティティデータ構造体の説明
  • copy — グラフィックエンティティをコピー.
  • delete — グラフィックエンティティとその子を削除.
Report an issue
<< is_handle_valid handle unglue >>

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 14 15:10:31 CET 2017