C# Class Alexandria.Engines.Sciagi.Resources.PictureInstruction

An operation used for drawing a Picture with a PictureRenderer.
Exibir arquivo Open project: Burton-Radons/Alexandria Class Usage Examples

Public Methods

Method Description
PictureInstruction ( PictureExtendedOpcode extendedOpcode ) : System

Initialise the instruction.

PictureInstruction ( PictureOpcode opcode ) : System

Initialise the instruction.

ReadInstruction ( Stream stream, PicturePatternFlags &patternFlags, byte &patternNumber ) : PictureInstruction

Read an instruction from the stream.

Render ( PictureRenderer renderer ) : void

Render the instruction.

Protected Methods

Method Description
PeekByte ( Stream stream ) : byte

Peek at a byte without reading it.

PeekContinue ( Stream stream ) : bool

Peek at the next byte and return whether it's not an opcode.

ReadAbsoluteCoordinates ( Stream stream ) : Vector2i

Read absolute coordinates from the stream.

ReadAbsoluteCoordinatesList ( Stream stream ) : List

Read a list of absolute coordinates from the stream.

ReadByte ( Stream stream ) : byte

Read a byte from the stream.

ReadMediumRelativeCoordinates ( Stream stream, Vector2i start ) : Vector2i

Read medium relative coordinates from the stream.

ReadPatternNumber ( Stream stream, PicturePatternFlags patternCode, byte &patternNumber ) : byte

Read a pattern number from the stream.

ReadShortRelativeCoordinates ( Stream stream, Vector2i to ) : Vector2i

Read short relative coordinates from the stream.

Skip ( Stream stream, int count = 1 ) : void

Skip a number of bytes in the stream.

Method Details

PeekByte() protected static method

Peek at a byte without reading it.
protected static PeekByte ( Stream stream ) : byte
stream Stream
return byte

PeekContinue() protected static method

Peek at the next byte and return whether it's not an opcode.
protected static PeekContinue ( Stream stream ) : bool
stream Stream
return bool

PictureInstruction() public method

Initialise the instruction.
public PictureInstruction ( PictureExtendedOpcode extendedOpcode ) : System
extendedOpcode PictureExtendedOpcode
return System

PictureInstruction() public method

Initialise the instruction.
public PictureInstruction ( PictureOpcode opcode ) : System
opcode PictureOpcode
return System

ReadAbsoluteCoordinates() protected static method

Read absolute coordinates from the stream.
protected static ReadAbsoluteCoordinates ( Stream stream ) : Vector2i
stream Stream
return Vector2i

ReadAbsoluteCoordinatesList() protected static method

Read a list of absolute coordinates from the stream.
protected static ReadAbsoluteCoordinatesList ( Stream stream ) : List
stream Stream
return List

ReadByte() protected static method

Read a byte from the stream.
protected static ReadByte ( Stream stream ) : byte
stream Stream
return byte

ReadInstruction() public static method

Read an instruction from the stream.
public static ReadInstruction ( Stream stream, PicturePatternFlags &patternFlags, byte &patternNumber ) : PictureInstruction
stream Stream
patternFlags PicturePatternFlags
patternNumber byte
return PictureInstruction

ReadMediumRelativeCoordinates() protected static method

Read medium relative coordinates from the stream.
protected static ReadMediumRelativeCoordinates ( Stream stream, Vector2i start ) : Vector2i
stream Stream
start Vector2i
return Vector2i

ReadPatternNumber() protected static method

Read a pattern number from the stream.
protected static ReadPatternNumber ( Stream stream, PicturePatternFlags patternCode, byte &patternNumber ) : byte
stream Stream
patternCode PicturePatternFlags
patternNumber byte
return byte

ReadShortRelativeCoordinates() protected static method

Read short relative coordinates from the stream.
protected static ReadShortRelativeCoordinates ( Stream stream, Vector2i to ) : Vector2i
stream Stream
to Vector2i
return Vector2i

Render() public abstract method

Render the instruction.
public abstract Render ( PictureRenderer renderer ) : void
renderer PictureRenderer
return void

Skip() protected static method

Skip a number of bytes in the stream.
protected static Skip ( Stream stream, int count = 1 ) : void
stream Stream
count int
return void