OpenView

Modified in version 5.0

OpenView ( left ;​ top ;​ width ;​ height ;​ rotation )

Argument Type Range Default Note
left num -10000..10000 (required) Dimension:[pt]
top num -10000..10000 (required) Dimension:[pt]
width num 1..10000 (required) Dimension:[pt]
height num 1..10000 (required) Dimension:[pt]
rotation num -360..+360 0 Dimension:[deg], Requires xmCHART 5.0 or higher
Examples

OpenView(0;​0;​300;​200)

OpenView(200;​-50;​300;​400)

OpenView(-50;​80;​240;​110;​-90)

Description

By wrapping a sequence of functions into a view, the objects can be easily adjusted on the drawing simply by changing the position of the view, i.e modifing the first two arguments (left and top) of the OpenView() function. This proves useful, for example, when working with a large number of graphics primitives. For more information and examples, refer to Script Structure.

OPEN_VIEW_01
1

OpenDrawing(155;​300)

2

OpenView(-75;​75;​300;​155;​-90) /* Rotate counter-clockwise by 90 degrees. */

3

AddText(10;​20;​"<span size=18>P</span>lain text <b><i><u>text bold+italic</u></i></b> plain text.";​Arial;​12)

4

AddText(10;​45;​"Mixing <span font=Verdana><i>sans serif</i></span> with <span font='Times New Roman' size=15><i>serif</i></span> style.";​Arial;​12)

5

AddText(10;​70;​"H<span size=8 shiftY=4>2</span>O";​Arial;​12) /* H₂O */

6

AddText(10;​95;​"x<span size=8 shiftY=-4>3</span>";​Arial;​12) /* x³ */

7

AddText(10;​120;​"Plain text <span color=red><b><i>text in red bold+italic</i></b></span> plain text.";​Arial;​12)

8

AddText(10;​145;​"Plain text <span backgroundColor=rgba255(255,255,0,100)>text with light yellow background</span> plain text.";​Arial;​12)

9

/* Background() // Uncomment while positioning the barcode.*/

10

CloseView()

11

/* Background() // Uncomment while positioning the barcode.*/

12

CloseDrawing()

OPEN_VIEW_01
OPEN_VIEW_02
1

OpenDrawing(140;​270;​print)

2

OpenView(-50;​80;​240;​110;​-90)

3

BarcodeEAN(20;​10;​200;​80;​"5901234123457")

4

AddText(7;​95;​"5";​Verdana;​15)

5

AddRect(26;​80;​90;​20;​white)

6

AddText(30;​95;​"9 0 1 2 3 4";​Verdana;​15)

7

AddRect(123;​80;​90;​20;​white)

8

AddText(127;​95;​"1 2 3 4 5 7";​Verdana;​15)

9

AddText(223;​95;​">";​Verdana;​15)

10

/* Background() // Uncomment while positioning the barcode. */

11

CloseView()

12

/* Background() // Uncomment while positioning the barcode. */

13

CloseDrawing()

OPEN_VIEW_02
Scroll to Top
Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×