AddHRuleEx Method

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

Description

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

The weight is set from the personal preferences (Default hor.rule).

Syntax

Page.AddHRuleEx (dim1, dim2, dim3, int4)

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        

length, in mpt.

int4        

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

Examples

Page.AddHRuleEx (Page.GetLeftM, Page.GetTopM, Page.GetColW, 0)

Inserts a 1-column wide rule the top left corner of the page.

Page.AddHRuleEx (Page.GetLeftM + Units.ToVal("1ncol")+Page.GetInterCol, Page.GetTopM, Page.GetColW, 0)

Inserts a 1-column wide rule, starting from the 2nd column in the top of the page.

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

 

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

Rules/boxes creation related commands

AddBoxEx, AddElliEx, AddHRuleEx, AddVRuleEx, ObjSetBorderWeight, ObjSetBorderColor