XPSRasterizationFactory1::CreateRasterizer method

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

Syntax

HRESULT CreateRasterizer(
  [in, optional]  IXpsOMPage            *xpsPage,
  [in]            FLOAT                 DPI,
  [in]            XPSRAS_RENDERING_MODE nonTextRenderingMode,
  [in]            XPSRAS_RENDERING_MODE textRenderingMode,
  [out, optional] IXpsRasterizer        **ppIXPSRasterizer,
  [in]            XPSRAS_PIXEL_FORMAT   xpsRasPixelFormat
);

Parameters

  • xpsPage [in, optional]
    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 [in]
    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 [in]
    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 [in]
    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

  • ppIXPSRasterizer [out, optional]
    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.

  • xpsRasPixelFormat [in]
    Allows a caller to select the pixel format used by the IWICBitmap returned by the method IXpsRasterizer::RasterizeRect. Set this parameter to one of the following XPSRAS_PIXEL_FORMAT enumeration values:

    • XPSRAS_PIXEL_FORMAT_32BPP_PBGRA_UINT_SRGB

    • XPSRAS_PIXEL_FORMAT_64BPP_PRGBA_HALF_SCRGB

    • XPSRAS_PIXEL_FORMAT_128BPP_PRGBA_FLOAT_SCRGB

Return value

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

Requirements

Header

Xpsrassvc.h (include Xpsrassvc.h)

See also

XPSRasterizationFactory1

 

 

Send comments about this topic to Microsoft