Show / Hide Table of Contents

Enum Lines.Algorithm

Various supported line-drawing algorithms.

Namespace: SadRogue.Primitives
Assembly: TheSadRogue.Primitives.dll
Syntax
public enum Lines.Algorithm

Fields

Name Description
Bresenham

Bresenham line algorithm. Points are guaranteed to be in order from start to finish.

DDA

Digital Differential Analyzer line algorithm. It will produce slightly different lines compared to Bresenham, and it takes approximately the same time as Bresenham (very slightly slower) for most inputs. Points are guaranteed to be in order from start to finish.

Orthogonal

Line algorithm that takes only orthogonal steps (each grid location on the line returned is within one cardinal direction of the previous one). Potentially useful for LOS in games that use MANHATTAN distance. Based on the algorithm here. Points are guaranteed to be in order from start to finish.

Extension Methods

PropertyChangedEventHelpers.SafelySetProperty<Lines.Algorithm, TProperty>(Lines.Algorithm, ref TProperty, TProperty, EventHandler<ValueChangedEventArgs<TProperty>>)
PropertyChangedEventHelpers.SafelySetProperty<Lines.Algorithm, TProperty>(Lines.Algorithm, ref TProperty, TProperty, EventHandler<ValueChangedEventArgs<TProperty>>, EventHandler<ValueChangedEventArgs<TProperty>>)
  • View Source
In this article
Back to top Generated by DocFX