共用方式為


IXpsOMTileBrush::GetViewport method

Gets the portion of the destination geometry that is covered by a single tile.

Syntax

HRESULT GetViewport(
  [out, retval] XPS_RECT *viewport
);

Parameters

  • viewport [out, retval]
    The XPS_RECT structure that describes the portion of the destination geometry that is covered by a single tile.

Return value

If the method succeeds, it returns S_OK; otherwise, it returns an HRESULT error code.

Return code Description
S_OK

The method succeeded.

E_POINTER

viewport is NULL.

 

Remarks

The viewport is the portion of the output area where the first tile is drawn. In the illustration, the viewport is outlined by the purple rectangle inside the red, dotted rectangle. The tile mode of the brush determines how the rest of the tiles are drawn in the output area.

An image that shows how a viewport is mapped to the output area

Requirements

Minimum supported client

Windows 7, Windows Vista with SP2 and Platform Update for Windows Vista [desktop apps | Windows Store apps]

Minimum supported server

Windows Server 2008 R2, Windows Server 2008 with SP2 and Platform Update for Windows Server 2008 [desktop apps | Windows Store apps]

Header

Xpsobjectmodel.h

IDL

XpsObjectModel.idl

See also

IXpsOMTileBrush

XPS_RECT

XML Paper Specification