Table of Contents

Class PortrayalTimeFilter

Namespace
EncDotNet.S100.Pipelines.Vector
Assembly
EncDotNet.S100.Core.dll

Leaves out the drawing instructions that aren't valid at the time the map shows (S-100 Part 9 timeValid; see TimeValid).

public static class PortrayalTimeFilter
Inheritance
PortrayalTimeFilter
Inherited Members

Remarks

The filter runs on a display list that has already been portrayed, so a host can move the view time without running the portrayal rules again.

Methods

Apply(IReadOnlyList<DrawingInstruction>, PortrayalTime?)

The instructions of instructions drawn at time, in order; all of them when time is null.

public static IReadOnlyList<DrawingInstruction> Apply(IReadOnlyList<DrawingInstruction> instructions, PortrayalTime? time)

Parameters

instructions IReadOnlyList<DrawingInstruction>

The display list.

time PortrayalTime

The time the map shows, or null for no filter.

Returns

IReadOnlyList<DrawingInstruction>

The instructions drawn; instructions itself when none is left out.

Changes(IEnumerable<PortrayalTimeInterval>, PortrayalTime?, PortrayalTime?)

Whether moving the map from from to to can change what a display list with intervals draws: some interval holds at one and not the other.

public static bool Changes(IEnumerable<PortrayalTimeInterval> intervals, PortrayalTime? from, PortrayalTime? to)

Parameters

intervals IEnumerable<PortrayalTimeInterval>

The display list's intervals (Intervals(IEnumerable<DrawingInstruction>)).

from PortrayalTime

The time drawn now.

to PortrayalTime

The new time.

Returns

bool

true when the list should be filtered again.

Intervals(IEnumerable<DrawingInstruction>)

The distinct time intervals of instructions, in first-seen order.

public static IReadOnlyList<PortrayalTimeInterval> Intervals(IEnumerable<DrawingInstruction> instructions)

Parameters

instructions IEnumerable<DrawingInstruction>

The display list.

Returns

IReadOnlyList<PortrayalTimeInterval>

The intervals; empty when every instruction is always drawn.

IsDrawn(DrawingInstruction, PortrayalTime)

Whether instruction is drawn at time: it has no time intervals, or time meets one of them.

public static bool IsDrawn(DrawingInstruction instruction, PortrayalTime time)

Parameters

instruction DrawingInstruction

The instruction.

time PortrayalTime

The time the map shows.

Returns

bool

true when the instruction is drawn.