toInt method

int toInt()

Return an integer.

Implementation

int toInt() {
  switch (this) {
    case DisplayOrientation.unknown:
      return SDL_DisplayOrientation.SDL_ORIENTATION_UNKNOWN;
    case DisplayOrientation.landscape:
      return SDL_DisplayOrientation.SDL_ORIENTATION_LANDSCAPE;
    case DisplayOrientation.landscapeFlipped:
      return SDL_DisplayOrientation.SDL_ORIENTATION_LANDSCAPE_FLIPPED;
    case DisplayOrientation.portrait:
      return SDL_DisplayOrientation.SDL_ORIENTATION_PORTRAIT;
    case DisplayOrientation.portraitFlipped:
      return SDL_DisplayOrientation.SDL_ORIENTATION_PORTRAIT_FLIPPED;
  }
}