Returns the horizontal percentage corresponding to the given location or size.
<display>
extent
Name | Type | Description |
---|---|---|
x | extent | The horizontal location or size value. |
monitor | integer | Optional. The monitor number. |
Both pixels and percentages increase from left to right, with the leftmost side of the screen corresponding to a value of 0.
The following displays the horizontal percentage corresponding to 300 pixels on the second monitor:
<text myText>
/ items= ("percentage = <% display.getPercentX(300, 2) %>")
</text>
The following displays the horizontal percentage corresponding to last mouse coordinate on the default (first) monitor:
<page myPage>
percentage = <% display.getPercentX(mouse.x) %>
</page>