AddFrameEx Method

Build 1501 on 14/Nov/2017  This topic last edited on: 23/Mar/2016, at 12:14

Description

Creates a frame on the page with specified coordinates, size, and angle of rotation.

Syntax

Page.AddFrameEx (dim1, dim2, dim3, dim4, int5)

dim1        

X position, in mpt. 0 is left edge of the page. Add Page.GetLeftM to a value, to start from the left margin.

dim2        

Y position, in mpt. 0 is top edge of the page. Add Page.GetTopM to a value, to start from the top margin.

dim3

width, in mpt.

dim4

height, in mpt.

int5        

rotation angle, counter-clock wise, in tenths of degree

Examples

Page.AddFrameEx (Page.GetLeftM, Page.GetTopM, Page.GetColW, Page.GetModH, 0)

Inserts a 1-column wide and 1 module high frame in the top left corner of the page.

Page.AddFrameEx (Page.GetLeftM, Page.GetTopM, Page.GetColW, Page.GetModH, 0)

Inserts a 1-column wide and 1 module high frame in the top left corner of the page.

x = Page.GetLeftM + Units.ToVal("1ncol")+Page.GetInterCol

Page.AddFrameEx (x, Page.GetTopM, Page.GetColW, Page.GetModH, 0)

Inserts a 1-column wide and 1 module high frame, starting from the 2nd column in the top of the page.

Page.AddFrameEx (Page.GetLeftM, Page.GetTopM, Page.GetColW, Page.GetModH, 450)

Inserts a 1-column wide and 1 module high frame in the top left corner of the page, rotated for 45° counter-clockwise around centre

Page.AddFrameEx (Page.GetLeftM, Page.GetTopM, Page.GetColW, Page.GetModH, 0)

Page.objsetangle(45,3)

Inserts a 1-column wide and 1 module high frame in the top left corner of the page, rotated for 45° counter-clockwise around bottom-left corner

Examples of parameters

Rotation angle

0

non-rotated element

450

rotated for 45° around top left corner, counter-clockwise

-335

rotated for 33.5° around top-left corner, clockwise

 

For rotations not around centre, but around corners, combine  AddFrameEx with ObjSetAngle (see the example in Examples).

Remarks

The method returns error code. 0 means it was successful, 1201 means the page was not available, 1202 means the page was read-only.

Context

Page designer