Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
5.4.1 - Русский

Change language to:
English - Français - 日本語 - Português -

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

Scilab help >> Графики > interaction > dragrect

dragrect

Drag rectangle(s) with mouse

Calling Sequence

[final_rect,btn]=dragrect(initial_rect)

Arguments

initial_rect

4 4xn matrix containing the initial rectangles definition. Each column contains [x_left; y_top; width; height]. If only one rectangle is present the initial_rect may also be a vector.

final_rect

a rectangle defined by [x_left, y_top, width, height]

btn

an integer, the number of the mouse button clicked

Description

dragrect drags one or more rectangles anywhere on the screen. The 4xn matrix rect defines the rectangles. Each column of initial_rect must contain the initial rectangle position as [left;top;width;height] values. When a button is clicked dragrect returns the final rectangles definition in final_Rect.

Examples

xsetech(frect=[0,0,100,100])
r=dragrect([10;10;30;10])
xrect(r)

See Also

  • xrect — draw a rectangle
  • xrects — draw or fill a set of rectangles
  • xclick — Wait for a mouse click or an event in a graphic window.
  • xgetmouse — get the mouse events and current position
Report an issue
<< rubberbox interaction edit_curv >>

Copyright (c) 2022-2024 (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 Apr 02 17:37:57 CEST 2013