Skip to content

# PDFGray8RenderingSurface

Namespace: O2S.Components.PDF4NET.Rendering.RenderingSurfaces

Defines a Gray8 rendering surface that uses an array of bytes as storage.

    public class PDFGray8RenderingSurface : PDFByteRenderingSurface, O2S.Components.PDF4NET.Content.IImageDataProvider, IMaskRenderingSurface

Inheritance Object → PDFRenderingSurface → PDFByteRenderingSurface → PDFGray8RenderingSurface
Implements IImageDataProvider, IMaskRenderingSurface

## Fields

## Constructors

### PDFGray8RenderingSurface()

Initializes a new PDFGray8RenderingSurface object with an empty storage.

    public PDFGray8RenderingSurface()

### PDFGray8RenderingSurface(Int32, Int32)

Initializes a new PDFGray8RenderingSurface object.

    public PDFGray8RenderingSurface(int width, int height)

Parameters

`width` Int32
Surface width.

`height` Int32
Surface height.

### PDFGray8RenderingSurface(Int32, Int32, Int32, Int32)

Initializes a new PDFGray8RenderingSurface object.

    public PDFGray8RenderingSurface(int x, int y, int width, int height)

Parameters

`x` Int32

`y` Int32

`width` Int32
Surface width.

`height` Int32
Surface height.

## Properties

### Bitmap

Gets the surface storage.

    public Byte[] Bitmap { get; }

Property Value

Byte[]
Array of ints that stores the page image in ARGB format.

### Height

Gets or sets the surface height.

    public int Height { get; }

Property Value

Int32
The height of the surface in pixels.

### MaskBitmap

This property supports the internal library infrastructure.

    public object MaskBitmap { get; }

Property Value

Object

### Width

Gets the surface width.

    public int Width { get; }

Property Value

Int32
The width of the surface in pixels.

## Methods

### Adjust(Byte)

This method supports the internal library infrastructure.

    public void Adjust(byte alpha)

Parameters

`alpha` Byte

### ApplyTransferFunction(PDFFunction)

This method supports the internal library infrastructure.

    public void ApplyTransferFunction(PDFFunction transferFunction)

Parameters

`transferFunction` PDFFunction

### Expand(BoundingBox)

This method supports the internal library infrastructure.

    public IMaskRenderingSurface Expand(BoundingBox expandBounds)

Parameters

`expandBounds` BoundingBox

Returns

IMaskRenderingSurface

### Extract(BoundingBox)

This method supports the internal library infrastructure.

    public IMaskRenderingSurface Extract(BoundingBox extractBounds)

Parameters

`extractBounds` BoundingBox

Returns

IMaskRenderingSurface

### GetIndexForPixel(Int32, Int32, Int32, Int32, Int32)

This method supports the internal library infrastructure.

    public int GetIndexForPixel(int x, int y, int xOrigin, int yOrigin, int width)

Parameters

`x` Int32

`y` Int32

`xOrigin` Int32

`yOrigin` Int32

`width` Int32

Returns

Int32

### GetMaskLine(Int32, Int32)

This method supports the internal library infrastructure.

    public Byte[] GetMaskLine(int y, int yOrigin)

Parameters

`y` Int32

`yOrigin` Int32

Returns

Byte[]

### GetMaskRenderer()

    public object GetMaskRenderer()

Returns

Object

### Merge(IMaskRenderingSurface, BoundingBox)

This method supports the internal library infrastructure.

    public IMaskRenderingSurface Merge(IMaskRenderingSurface topMask, BoundingBox mergeBounds)

Parameters

`topMask` IMaskRenderingSurface

`mergeBounds` BoundingBox

Returns

IMaskRenderingSurface

### Merge(IMaskRenderingSurface, IMaskRenderingSurface, BoundingBox)

This method supports the internal library infrastructure.

    public IMaskRenderingSurface Merge(IMaskRenderingSurface _topMask, IMaskRenderingSurface _mergedMask, BoundingBox mergeBounds)

Parameters

`_topMask` IMaskRenderingSurface

`_mergedMask` IMaskRenderingSurface

`mergeBounds` BoundingBox

Returns

IMaskRenderingSurface

### Union(IMaskRenderingSurface, IMaskRenderingSurface)

This method supports the internal library infrastructure.

    public IMaskRenderingSurface Union(IMaskRenderingSurface _mask1, IMaskRenderingSurface _mask2)

Parameters

`_mask1` IMaskRenderingSurface

`_mask2` IMaskRenderingSurface

Returns

IMaskRenderingSurface