Scilab Reference Manual |
---|
rectangle_properties — description of the Rectangle entity properties
The Rectangle entity is a leaf of the graphics entities hierarchy. This entity defines the parameters for rectangles and filled rectangles.
visible: | This field contains the visible property value for the entity . It should be "on" or "off" . By default, the rectangle is visible, the value's property is "on". If "off" the rectangle is not drawn on the screen. | ||||||
data: | This property is to return the coordinates of the upper-left point of the rectangle and its width and height in the data units of the axes. The result is the matrix [xleft,yup;width,height] | ||||||
line_style: | The line_style property value should be an integer in [0 9]. 0 stands for solid the other value stands for a selection of dashes. | ||||||
thickness: | This field contains the line thickness property. Its value should be a positif integer. | ||||||
mark_mode: | If mark_mode property is "on" and the rectangle is represented by a mark drawn at each corners. points. If the property property is to "off" the rectangle is represented using lines or paint surface. | ||||||
mark_style: | The mark_style property value is used to select the type of mark to use when mark_mode property is "on" . It's value should be an integer in [0 9] which stands for: dot, plus, cross, star, diamond fill, diamond, triangle up, triangle down, trefle and circle. | ||||||
mark_size: | The mark_size property is used to select the type of size of the marks when mark_mode property is "on" . Its value should be an integer in [0 5] whith stands for 8pt, 10pt, 12pt, 14pt, 18pt and 24pt. | ||||||
foreground: | This field contains the default foreground property used to draw or to fill the rectangle. Its value should be a color index (relative to the current colormap). | ||||||
fill_mode: | If fill_mode property value is "on" , the rectangle is filled with the foreground color, the mark_mode must also have the value "off". if not and the value's property is "off" only the shape of the rectangle is drawn using the foreground color. | ||||||
clip_state: | This field contains the clip_state property value for the rectangle. It should be :
| ||||||
clip_box: | This field is to determinate the clip_box property. By Default its value should be an empty matrix if clip_state is "off". Other cases the vector [x,y,w,h] (upper-left point width height) defines the portions of the rectangle to display, however clip_state property value will be changed. | ||||||
parent: | This field contains the handle of the parent. The parent of the rectancle entity should be of the type "Axes" or "Agregation". |
set("figure_style","new") //create a figure a=get("current_axes");//get the handle of the newly created axes a.data_bounds=[-2,-2,2,2]; xrect(-1,1,2,2) r=get("hdl");//get handle on current entity (here the rectangle entity) r.type r.parent.type r.foreground=13; r.line_style=2; r.fill_mode="on"; r.clip_box=[-1 1;1 1]; r.clip_state="off" r.data(:,2)=[1/2;1/2]; r.data(:,1)=[1/2;1/2];
Djalel ABDEMOUCHE
<< printing | replot >> |