Show / Hide Table of Contents

Class SettableViewport<T>

Similar to Viewport<T>, but implements ISettableMapView<T>and thus implements "set" functionality via relative coordinates.

Inheritance
System.Object
Viewport<T>
SettableViewport<T>
Implements
ISettableMapView<T>
IMapView<T>
Inherited Members
Viewport<T>.Height
Viewport<T>.ViewArea
Viewport<T>.Width
Viewport<T>.ToString()
Viewport<T>.ToString(Func<T, String>)
Viewport<T>.ToString(Int32, Func<T, String>)
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)
Namespace: GoRogue.MapViews
Assembly: GoRogue.dll
Syntax
public class SettableViewport<T> : Viewport<T>, ISettableMapView<T>, IMapView<T>
Type Parameters
Name Description
T

Type being exposed by map view.

Constructors

| Improve this Doc View Source

SettableViewport(ISettableMapView<T>)

Constructor. Takes the map view to represent. The viewport will represent the entire given map view.

Declaration
public SettableViewport(ISettableMapView<T> mapView)
Parameters
Type Name Description
ISettableMapView<T> mapView

The map view to represent.

| Improve this Doc View Source

SettableViewport(ISettableMapView<T>, Rectangle)

Constructor. Takes the parent map view, and the initial subsection of that map view to represent.

Declaration
public SettableViewport(ISettableMapView<T> mapView, Rectangle viewArea)
Parameters
Type Name Description
ISettableMapView<T> mapView

The map view being represented.

Rectangle viewArea

The initial subsection of that map to represent.

Properties

| Improve this Doc View Source

Item[Coord]

Given a position in relative coordinates, sets/returns the "value" associated with that location in absolute coordinates.

Declaration
public T this[Coord relativePosition] { get; set; }
Parameters
Type Name Description
Coord relativePosition

Viewport-relative position of the location to retrieve/set the value for.

Property Value
Type Description
T

The "value" associated with the absolute location represented on the underlying map view.

| Improve this Doc View Source

Item[Int32]

Given a position in relative 1d-array-index style, returns/sets the "value" associated with that location in absolute coordinates.

Declaration
public T this[int relativeIndex1D] { get; set; }
Parameters
Type Name Description
System.Int32 relativeIndex1D

Viewport-relative position of the location to retrieve/set the value for, as a 1D array index.

Property Value
Type Description
T

The "value" associated with the absolute location represented on the underlying map view.

| Improve this Doc View Source

Item[Int32, Int32]

Given an X and Y value in relative coordinates, sets/returns the "value" associated with that location in absolute coordinates.

Declaration
public T this[int relativeX, int relativeY] { get; set; }
Parameters
Type Name Description
System.Int32 relativeX

Viewport-relative X-value of location.

System.Int32 relativeY

Viewport-relative Y-value of location.

Property Value
Type Description
T

The "value" associated with the absolute location represented on the underlying map view.

| Improve this Doc View Source

MapView

The map view that this viewport is exposing values from.

Declaration
public ISettableMapView<T> MapView { get; }
Property Value
Type Description
ISettableMapView<T>

Implements

ISettableMapView<T>
IMapView<T>

Extension Methods

Utility.Yield<T>(T)
IMapViewExtensions.ApplyOverlay<T>(ISettableMapView<T>, IMapView<T>)
IMapViewExtensions.Bounds<T>(IMapView<T>)
IMapViewExtensions.Contains<T>(IMapView<T>, Int32, Int32)
IMapViewExtensions.Contains<T>(IMapView<T>, Coord)
IMapViewExtensions.ExtendToString<T>(IMapView<T>, String, String, Func<T, String>, String, String, String, String)
IMapViewExtensions.ExtendToString<T>(IMapView<T>, Int32, String, String, Func<T, String>, String, String, String, String)
IMapViewExtensions.Positions<T>(IMapView<T>)
IMapViewExtensions.RandomItem<T>(IMapView<T>, IGenerator)
IMapViewExtensions.RandomItem<T>(IMapView<T>, Func<Coord, T, Boolean>, IGenerator)
IMapViewExtensions.RandomPosition<T>(IMapView<T>, T, IGenerator)
IMapViewExtensions.RandomPosition<T>(IMapView<T>, IEnumerable<T>, IGenerator)
IMapViewExtensions.RandomPosition<T>(IMapView<T>, HashSet<T>, IGenerator)
IMapViewExtensions.RandomPosition<T>(IMapView<T>, IGenerator, T[])
IMapViewExtensions.RandomPosition<T>(IMapView<T>, Func<Coord, T, Boolean>, IGenerator)
IMapViewExtensions.RandomPosition<T>(IMapView<T>, IGenerator)
  • Improve this Doc
  • View Source
Back to top Generated by DocFX