# OfficeRasterRenderTarget

Supersampled RGBA render target used by dependency-free raster renderers.

Class 

`OfficeIMO.Drawing`

**Namespace**

`OfficeIMO.Drawing`

**Assembly**

`OfficeIMO.Core`

**Source revision**

`ba882f6b0d07` with working tree changes

**Source**

[OfficeRasterRenderTarget.cs:12](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Raster/OfficeRasterRenderTarget.cs#L12)

**Modifiers**

sealed

Supersampled RGBA render target used by dependency-free raster renderers.

## Inheritance

- object
- OfficeRasterRenderTarget

## Usage

Explore 1 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

### Accepted by parameters 1

- Constructor [OfficeRasterCanvas.OfficeRasterCanvas](/api/core/officeimo-drawing-officerastercanvas/#constructor-ctor-officeimo-drawing-officerasterrendertarget-officeimo-drawing-officetruetypefont-officeimo-drawing-officefontfacecollection) parameter `target`

Filter members 

Show inherited

## Constructors

`public OfficeRasterRenderTarget(int width, int height, int supersampling = 1, OfficeColor? background = null)` [#](#constructor-ctor-int32-int32-int32-nullable-officeimo-officecolor)

[OfficeRasterRenderTarget.cs:12](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Raster/OfficeRasterRenderTarget.cs#L12)

Creates a render target with an optional supersampling factor.

Parameters

**width int required**

**height int required**

**supersampling int = 1 optional**

**background OfficeIMO.OfficeColor? = null optional**

## Methods

`public void BlendPixel(int x, int y, OfficeColor color)` [#](#method-blendpixel-int32-int32-officeimo-officecolor)

[OfficeRasterRenderTarget.cs:73](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Raster/OfficeRasterRenderTarget.cs#L73)

Alpha blends a render-buffer pixel over the current pixel.

Parameters

**x int required**

**y int required**

**color OfficeIMO.OfficeColor required**

`public void Fill(OfficeColor color)` [#](#method-fill-officeimo-officecolor)

[OfficeRasterRenderTarget.cs:101](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Raster/OfficeRasterRenderTarget.cs#L101)

Fills the internal render buffer.

Parameters

**color OfficeIMO.OfficeColor required**

`public OfficeColor GetPixel(int x, int y)` [#](#method-getpixel-int32-int32)

[OfficeRasterRenderTarget.cs:53](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Raster/OfficeRasterRenderTarget.cs#L53)

Gets a render-buffer pixel.

Parameters

**x int required**

**y int required**

Returns

`OfficeColor`

`public byte[] ResolveRgba()` [#](#method-resolvergba)

[OfficeRasterRenderTarget.cs:111](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Raster/OfficeRasterRenderTarget.cs#L111)

Resolves the render target into output-size RGBA bytes.

Returns

`byte[]`

`public void SetPixel(int x, int y, OfficeColor color)` [#](#method-setpixel-int32-int32-officeimo-officecolor)

[OfficeRasterRenderTarget.cs:60](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Raster/OfficeRasterRenderTarget.cs#L60)

Sets a render-buffer pixel without alpha blending.

Parameters

**x int required**

**y int required**

**color OfficeIMO.OfficeColor required**

## Inherited Methods

`public virtual bool Equals(object? obj)` [#](#method-equals-object)

Inherited from object

Parameters

**obj object? required**

Returns

`bool`

`public virtual int GetHashCode()` [#](#method-gethashcode)

Inherited from object

Returns

`int`

`public Type GetType()` [#](#method-gettype)

Inherited from object

Returns

`Type`

`public virtual string? ToString()` [#](#method-tostring)

Inherited from object

Returns

`string?`

## Properties

`public int Width { get; }` [#](#property-width)

[OfficeRasterRenderTarget.cs:37](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Raster/OfficeRasterRenderTarget.cs#L37)

Resolved output width in pixels.

`public int Height { get; }` [#](#property-height)

[OfficeRasterRenderTarget.cs:40](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Raster/OfficeRasterRenderTarget.cs#L40)

Resolved output height in pixels.

`public int Supersampling { get; }` [#](#property-supersampling)

[OfficeRasterRenderTarget.cs:43](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Raster/OfficeRasterRenderTarget.cs#L43)

Supersampling factor applied to render coordinates.

`public int RenderWidth { get; }` [#](#property-renderwidth)

[OfficeRasterRenderTarget.cs:46](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Raster/OfficeRasterRenderTarget.cs#L46)

Internal render-buffer width in pixels.

`public int RenderHeight { get; }` [#](#property-renderheight)

[OfficeRasterRenderTarget.cs:49](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Raster/OfficeRasterRenderTarget.cs#L49)

Internal render-buffer height in pixels.

<!-- PowerForge markdown artifact sha256:75DB0C74F3AF95B9AA38A01B975FE37DF013CB89D6F862DB1549609F9F6E34E6 -->
