Scilab Home page | Wiki | Bug tracker | Forge | Mailing list archives | ATOMS | File exchange
Please login or create an account
Change language to: English - Português - 日本語

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

Aide Scilab >> Bibliothèque graphique > rubberbox


Rubberband box for rectangle selection

Calling Sequence

[final_rect,btn]=rubberbox(initial_rect, edition_mode)



vector with two or four entries. With four entries it gives the initial rectangle defined by [x_left, y_top, width, height], with two entries width and height are supposed to be 0.


a boolean, if edition_mode is %t button press selects the first corner, release selects the opposite corner. If edition_mode is %f, a button press or click selects the first corner, a click is requested to select the opposite corner. The default value is %f.


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


an integer, the number of the mouse button clicked


rubberbox(initial_rect) tracks a rubberband box in the current graphic window, following the mouse. When a button is clicked rubberbox returns the final rectangles definition in final_Rect. If the argument initial_rect is not specified, a click is needed to fix the initial corner position.



See Also

  • xrect — dessine un rectangle
  • xrects — dessine ou remplit un ensemble de rectangles
  • xclick — Attend un appui sur un bouton de la souris.
  • xgetmouse — get the mouse events and current position
  • dragrect — déplace un ou plusieurs rectangles avec la souris
Scilab Enterprises
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Thu Mar 03 11:00:14 CET 2011