Show / Hide Table of Contents

Class ScanLine

Provides view into a portion (= one horizontal line) of a byte[] dataSource of an IImageData instance.

Inheritance
System.Object
ScanLine
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Fusee.Base.Common
Assembly: Fusee.Base.Common.dll
Syntax
public class ScanLine

Constructors

ScanLine(Byte[], Int32, Int32, ImagePixelFormat)

Constructor to initialize one horizontal ScanLine inside a byte[] dataSource, beginning at offset in bytes.

Declaration
public ScanLine(byte[] dataSource, int offset, int width, ImagePixelFormat pixelFormat)
Parameters
Type Name Description
System.Byte[] dataSource

The dataSource array, usually the byte array of an IImageData.

System.Int32 offset

Offset in bytes (= the ScanLine begins at offset bytes inside dataSource).

System.Int32 width

Width of the ScanLine in pixels.

ImagePixelFormat pixelFormat

ImagePixelFormat of the dataSource.

Properties

BytesPerPixel

Returns the byes per pixel with respect to the PixelFormat.

Declaration
public int BytesPerPixel { get; }
Property Value
Type Description
System.Int32

The number of bytes each pixel consists of.

Exceptions
Type Condition
System.ArgumentOutOfRangeException

For unknown pixel formats.

DataSource

The Data source byte array of this ScanLine.

Declaration
public byte[] DataSource { get; }
Property Value
Type Description
System.Byte[]

Offset

An Offset (in bytes) to add to the index to the first pixel of the requested line

Declaration
public int Offset { get; }
Property Value
Type Description
System.Int32

PixelFormat

Describes the PixelFormat of the ScanLine's data source.

Declaration
public ImagePixelFormat PixelFormat { get; }
Property Value
Type Description
ImagePixelFormat

Width

Width of the ScanLine in pixels.

Declaration
public int Width { get; }
Property Value
Type Description
System.Int32

Methods

GetScanLineBytes()

Copies the bytes that make up this ScanLine from the dataSource.

Declaration
public byte[] GetScanLineBytes()
Returns
Type Description
System.Byte[]

Returns a byte array that makes up this ScanLine.

Generated by DocFX
GitHub Repo
Back to top