IXpsRasterizationFactory1::CreateRasterizer method

The CreateRasterize method creates an XPS rasterizer object that can handle high precision colors.

Syntax

HRESULT CreateRasterizer(
  IXpsOMPage            *xpsPage,
  FLOAT                 DPI,
  XPSRAS_RENDERING_MODE nonTextRenderingMode,
  XPSRAS_RENDERING_MODE textRenderingMode,
  XPSRAS_PIXEL_FORMAT   pixelFormat,
  IXpsRasterizer        **ppIXPSRasterizer
);

Parameters

xpsPage

Pointer to an IXpsOMPage object that represents the XPS fixed page to render. This object encapsulates a FixedPage section from an XPS document. For more information about IXpsOMPage, see IXpsOMPage.

DPI

Dots per inch in the rasterized output. This parameter applies to both the x and y dimensions of the output bitmap. The DPI value is the resolution of the device that is to print or display the XPS fixed page.

nonTextRenderingMode

Rendering mode for nontext items in the rasterized output. This parameter indicates whether to generate antialiased output. Set this parameter to one of the following XPSRAS_RENDERING_MODE enumeration values:

  • XPSRAS_RENDERING_MODE_ANTIALIASED
  • XPSRAS_RENDERING_MODE_ALIASED

textRenderingMode

Rendering mode for text in the rasterized output. This parameter indicates whether to generate antialiased output. Set this parameter to one of the following XPSRAS_RENDERING_MODE enumeration values:

  • XPSRAS_RENDERING_MODE_ANTIALIASED
  • XPSRAS_RENDERING_MODE_ALIASED

pixelFormat

ppIXPSRasterizer

This parameter points to a location into which the method writes a pointer to the IXpsRasterizer interface of the newly created XPS rasterizer object. If the method fails, it writes NULL to this location and returns an error code.

Return Value

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Requirements

   
Target Platform Windows
Header xpsrassvc.h (include Xpsrassvc.h)

See Also

XPSRasterizationFactory1