共用方式為


IXpsOMTileBrush interface

A tile brush uses a visual image to paint a region by repeating the image.

This is the base interface of IXpsOMImageBrush and IXpsOMVisualBrush.

When to implement

Never. Custom implementation of this interface is not supported.

Members

The IXpsOMTileBrush interface inherits from IXpsOMBrush. IXpsOMTileBrush also has these types of members:

  • Methods

Methods

The IXpsOMTileBrush interface has these methods.

Method Description
GetTileMode

Gets the XPS_TILE_MODE value that describes the tile mode of the brush.

GetTransform

Gets a pointer to the IXpsOMMatrixTransform interface that contains the resolved matrix transform for the brush.

GetTransformLocal

Gets a pointer to the IXpsOMMatrixTransform interface that contains the local, unshared resolved matrix transform for the brush.

GetTransformLookup

Gets the lookup key that identifies the IXpsOMMatrixTransform interface in a resource dictionary that contains the resolved matrix transform for the brush.

GetViewbox

Gets the portion of the source image to be used by the tile.

GetViewport

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

SetTileMode

Sets the XPS_TILE_MODE value that describes the tiling mode of the brush.

SetTransformLocal

Sets the IXpsOMMatrixTransform interface pointer to a local, unshared matrix transform.

SetTransformLookup

Sets the lookup key name of a shared matrix transform that will be used as the transform for this brush.

SetViewbox

Sets the portion of the source content to be used as the tile image.

SetViewport

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

 

Remarks

As shown in the illustration that follows, the tile brush takes a visual element, or a part of it, transforms the visual element to create a tile, places the tile in the viewport of the output area, and fills the output area as specified by the tile mode.

A figure that shows how a tile brush fills a geometry

In the preceding illustration, the viewport is the area covered by the first tile in the output area. The viewport image is repeated throughout the output area as specified by the tile mode. The transform property determines how the output area is transformed after the viewport has been tiled in the output area. The part of the output area that is ultimately rendered as a visible image is determined by the path, stroke, or glyph that is using the tile brush.

A viewbox describes the portion of the source image that is used for the brush. The viewbox in the preceding illustration has the same size as the source image, so all of the source image is used for the brush. A viewbox can also be smaller than the original image.

In the illustration that follows, the brush is created by using a viewbox that includes only a portion of the original image or visual.

An illustration that shows a viewbox example

The next illustration shows the tile modes that are used to repeat the tile image to fill the output area. If the tile mode value is XPS_TILE_MODE_NONE, the tile image is drawn only once.

An illustration that shows different examples of different tile mode behaviors

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

IXpsOMBrush

IXpsOMImageBrush

IXpsOMVisualBrush

Interfaces

XML Paper Specification