PicasToPoints
Converts picas to points.
Syntax
expression.PicasToPoints(pc);
expression - A variable that represents a Api class.
Parameters
| Name | Required/Optional | Data type | Default | Description |
|---|---|---|---|---|
| pc | Required | number | The number of picas to convert to points. |
Returns
number
Example
This example shows how to convert picas to points.
- Code
- Result
const picas = 100;
const points = Api.PicasToPoints(picas);
const rgb = Api.RGB(50, 150, 250);
const fill = Api.CreateSolidFill(rgb);
const stroke = Api.CreateStroke(0, Api.CreateNoFill());
const shape = Api.CreateShape('rect', 150 * 36000, 150 * 36000, fill, stroke);
const paragraph = shape.GetContent().GetElement(0);
paragraph.AddText(picas + ' picas are equal to ' + points + ' points.');
const doc = Api.GetDocument();
const page = doc.GetPage(0);
page.AddObject(shape);