Reports for WinForms | ComponentOne
C1.Win.C1Report.4 Assembly / C1.Win.C1Preview Namespace / C1PreviewPane Class / ClientToDocument Method
Point in client coordinates.
OUT: 0-based page index or -1.
OUT: document coordinates on page pageIdx.

In This Topic
    ClientToDocument Method
    In This Topic
    Converts a point in the current C1PreviewPane's client coordinates, to document coordinates.

    Document coordinates are also pixels, but are relative to a specific page's left top corner, and do not depend on the current zoom factor.

    For instance, a client point that is over a page's right top corner would yield a point with document coordinates (816,0) on a 96 DPI resolution display for a 8.5 in wide page (816 is 8.5 multiplied by 96), regardless of the current zoom factor or document scroll position in the preview.

    Syntax
    'Declaration
     
    Public Function ClientToDocument( _
       ByVal pt As Point, _
       ByRef pageIdx As Integer, _
       ByRef ptPage As PointF _
    ) As Boolean
    public bool ClientToDocument( 
       Point pt,
       out int pageIdx,
       out PointF ptPage
    )

    Parameters

    pt
    Point in client coordinates.
    pageIdx
    OUT: 0-based page index or -1.
    ptPage
    OUT: document coordinates on page pageIdx.

    Return Value

    True if a page containing the specified point has been found, false otherwise.
    See Also