Rose
Namespaces | Classes | Typedefs | Enumerations | Functions
rose Namespace Reference

ToDo: There is an issue that the initial scroll interaction is lost if the click/press lands on a Widget and not a Container (by user observation). More...

Namespaces

 color
 Color management.
 
 sdl
 Class and functions that are used to access the SDL2 api.
 
 util
 Utility Functions.
 

Classes

class  Animation
 
class  Animator
 
class  AntiAliasedDrawing
 
class  Application
 
class  Button
 A configurable button class. More...
 
class  ButtonFrame
 A frame that supports ButtonSemantics. More...
 
class  ButtonSemantics
 Interpret interaction events to drive button operation semantics. More...
 
class  Cache
 A collection CacheObject objects associated with. More...
 
class  CacheFileSystem
 A CacheLocalStore implemented on the local filesystem. More...
 
class  CacheLocalStore
 A pure virtual class specifying the interface to a cache store system. More...
 
class  CacheObject
 The base class for an object to be cached. More...
 
class  CacheSource
 Virtual ase class for data sources to be cached. More...
 
class  CacheWebSource
 A cache source on the World Wide Web. More...
 
class  CapsLockKey
 A specialized ImageKey for Caps Lock. More...
 
class  CascadeButton
 A Button Widget that will popup a cascade menu. More...
 
class  CelestialOverlay
 Add observable celestial objects to MapProjection. More...
 
class  ClearSkyEphemeris
 
class  Column
 
class  Command
 Execute a program and gather the output. More...
 
class  CommonSignals
 
class  ConfigDialog
 Present a dialog to allow the user to configure the program. More...
 
class  Container
 A container which holds the subordinate Node objects. More...
 
class  ContainerTypeError
 An exception to indicate an unexpected container type at runtime. More...
 
class  ContainerView
 Provide a view of a standard container type. More...
 
class  DateBox
 
class  Dialog
 A Dialog is a way for the application to have a brief conversation with the user. More...
 
struct  DialogActionButton
 The data required to creat a DialogActionButton. More...
 
struct  Elastic
 A stream manipulator to set a Widget elastic value. More...
 
class  Environment
 
class  Ephemeris
 
class  EventSemantics
 A class to process event semantics. More...
 
class  ExitDialog
 A Dialog specialized to guard the exit path. More...
 
struct  FillToEnd
 A manipulator to set the fill to end flag on a Box widget or subclasses. More...
 
class  FontCache
 Cache storage for requested fonts. More...
 
class  FontDestroy
 A functor to destroy a TTF_Font. More...
 
struct  FontMetrics
 The size metrics that pertain to a particular font. More...
 
struct  FontName
 A structure to pass a Font name to a Widget through a manipulator. More...
 
class  Frame
 
struct  FrameColor
 
class  FrameElements
 Encapsulation of the visual elements of a Frame. More...
 
class  FrameLayoutManager
 
struct  FrameSettings
 
class  Gauge
 Display a numeric value as a graphic indicator. More...
 
class  GeoPosition
 An abstraction of a geographic position. More...
 
class  Grid
 
class  GridLayout
 
class  GridOverlay
 Draw grid lines to annotate the MapProjection. More...
 
struct  IconImage
 The information required to create an Icon from the Entypo Font. More...
 
struct  Id
 A type to specify an Id value. More...
 
struct  IdPath
 A path of objects by Id. More...
 
class  Image
 
class  ImageButton
 
class  ImageButtonLayoutManager
 
class  ImageKey
 ImageKey More...
 
class  ImageLabel
 
class  ImageRepository
 A cache of texture data structures that may be shared by other widgets to render textures. More...
 
class  ImageStore
 
class  ImageView
 Display an image texture. More...
 
class  InputParser
 Parse command line arguments. More...
 
struct  InternalSpace
 A manipulator to specify the internal spacing between children along the primary axis. More...
 
class  Keyboard
 A touch keyboard. More...
 
class  KeyboardPlugin
 Encapsulate the KeyboardSpec specification and build function. More...
 
struct  KeySpec
 
class  LayoutHint
 
class  LayoutManager
 A pure virtual base class for layout managers. More...
 
class  LayoutManagerError
 An exception to indicate runtime error during layout. More...
 
class  LetterKey
 A key which produces a character of input. More...
 
class  Line
 An abstraction of a line defined by two end points. More...
 
class  LinearLayout
 
class  LinearScale
 A base class for Widgets that are base on a linear value input or output eg) Slider and Gauge. More...
 
class  Manager
 A Widget which manages contained Widgets. More...
 
class  MapProjection
 
struct  MenuButtonData
 Information to specify a Menu Button. More...
 
struct  MinimumOrthogonal
 A manipulator to specify the minimum orthogonal size of a Widget, if supported. More...
 
class  Node
 A class to define a polymorphic member in an N-Array tree. More...
 
class  NodeRangeError
 
class  NodeTypeError
 
class  NumberPad
 A numeric keypad KeyboardPlugin. More...
 
class  Overlay
 A layout manager for to create overlays on the Container. More...
 
struct  OverlayImageSpec
 
class  Padding
 Abstraction of space consumed around an object for space, borders, etc. More...
 
class  Parent
 A type used to extract the parent from a Widget. More...
 
class  PartitionedLine
 Partition lines across discontinuities introduced by the current map projection. More...
 
class  PlacementLayout
 
struct  PointSize
 
class  Popup
 An undecorated window that is transient by nature. More...
 
class  PopupMenu
 A Menu that can be popped up by a CascadeButton. More...
 
class  PopupWindow
 A decorated transient Window. More...
 
class  Position
 A position in integer (x, y) co-ordinates. More...
 
struct  Protocol
 A convenience structure that composes Signal and Slot types from a protocol signature, and provides a Slot factory. More...
 
class  QUERTY
 A KeyboardPlugin for a QWERTY keyboard. More...
 
class  RadioBehavior
 
class  Rectangle
 A composite of a Position and a Size. More...
 
struct  RegexPattern
 
class  ReverseContainerView
 Provide a reverse view of a standard container type. More...
 
class  RoseLogicError
 Thrown when a structural logic error is detected at runtime. More...
 
class  RoseRuntimeError
 Thrown when a runtime error has occurred. More...
 
class  Row
 
class  SatelliteDataDisplay
 Display satellite orbital data. More...
 
class  SatelliteDataSet
 A class to manage a number of SatelliteDataDisplay objects. More...
 
struct  SatelliteMetaData
 
class  SatelliteModel
 
class  SatelliteObservation
 
struct  SatellitePassData
 
class  Screen
 An abstraction of the available display screen. More...
 
class  ScrollArea
 class ScrollArea brief A Container that provides scrolling to a single child. More...
 
struct  SemanticGesture
 The type of semantic gesture supported by a Widget. More...
 
class  Settings
 A settings database. More...
 
struct  SettingsUpdateProtocol
 
class  Signal
 The transmitter portion of a Signal-Slot transmitter receiver pair. More...
 
class  SimpleLayout
 A Simple layout manager. More...
 
class  Size
 A size in integer dimensions. More...
 
class  Slider
 An analog input Widget. More...
 
struct  Slot
 The receiver portion of a Signal-Slot transmitter receiver pair. More...
 
class  Sprite
 A sprite is a free roaming texture that is directed using Signals and Slots. More...
 
class  StackLayout
 
struct  StartOffset
 A manipulator to specify the an offset for the first child of a Container along the primary axis. More...
 
struct  State
 A type to specify a state. More...
 
class  SystemData
 Gather system data to transmit on Signal objects. More...
 
class  SystemMonitor
 A widget to display some system values to be monitored. More...
 
class  Tab
 A Tab Widget. More...
 
class  TabBody
 A TabBody manages a number of TabPages. More...
 
class  TabPage
 A TabPage manages a single Widget which displays the page contents. More...
 
class  TestWidget
 
class  Text
 Encapsulation of code for rendering Text. More...
 
class  TextButton
 
class  TextButtonLayoutManager
 
class  TextField
 An Widget to edit a small amount of text. More...
 
struct  TextFieldRegex
 
class  TextLabel
 
class  Theme
 A set of values that provide defaults forming a cohesive visual and operational theme. More...
 
class  TimeBox
 
class  TimeDateBox
 
class  TimerTick
 Transmit regular signals synchronized to the system clock. More...
 
struct  ToUpperCase
 
struct  TrackedSatellite
 
class  UnsavedDialog
 A Dialog specialized to guard the exit path. More...
 
class  Visual
 The properties common to all visual objects on the screen. More...
 
class  WebCache
 Fetch web resources caching them in the local filesystem following XDG specifications. More...
 
struct  WebCacheItem
 
class  WebFileCache
 A cache with a source on the World Wide Web, and local store on the filesystem. More...
 
class  Widget
 An element of the application user interface. More...
 
class  Window
 A Window is a visual abstraction of a number of related user interface objects. More...
 
class  XDGFilePaths
 A class to determine and provide searching of XDG standard files paths. More...
 

Typedefs

using MapPositionType = int
 
using EventCallback = std::function< bool()>
 Basic event callback with no argumetns.
 
using ScrollCallback = std::function< bool(Position< int > deltaPos)>
 Mouse scroll wheel callback. More...
 
using ButtonCallback = std::function< bool(bool pressed, uint button, uint clicks)>
 Mouse button callback. More...
 
using MouseMotionCallback = std::function< bool(bool pressed, uint state, Position< int > mousePosition, Position< int > relativePosition)>
 Mouse motion callback. More...
 
using ButtonDisplayCallback = std::function< void(ButtonDisplayState buttonDisplayState)>
 Button display state callback. More...
 
using ButtonStateChangeCallback = std::function< void(ButtonStateChange buttonStateChange)>
 Button state change callback. More...
 
using ButtonCommandCallback = std::function< void(ButtonStateChange buttonStateChange, uint commandId)>
 Button command callback. More...
 
using KeyboardShortcutCallback = std::function< void(uint32_t shortcutCode, bool state, uint repeat)>
 Keyboard shortcut callback. More...
 
using TextInputCallback = std::function< void(const std::string &text)>
 Text input callback. More...
 
using KeyboardFocusCallback = std::function< void(bool hasFocus)>
 Keyboard focus callback. More...
 
using KeyboardEventCallback = std::function< void(const SDL_KeyboardEvent &keyboardEvent)>
 
using GraphicsModelFrameProtocol = Protocol< uint32_t >
 Protocol for notifying objects that the application is about to start a new frame.
 
using FontPointer = std::shared_ptr< TTF_Font >
 Type for TTF smart pointer.
 
using FontCacheKey = std::pair< std::string, int >
 Type for TTF cache key.
 
using FontCacheStore = std::map< FontCacheKey, FontPointer >
 Type for TTF cache store.
 
using IdPathElement = std::pair< std::string, std::string >
 
using TickProtocol = Protocol< int >
 
using WebCacheProtocol = Protocol< uint32_t, long >
 
using CacheURI = std::string
 Type for a cache URI value.
 
using CacheObjectURI = std::string
 Type for a cache object URI value.
 
using GaugeValueLimits = std::array< float, 6 >
 Type of Gauge values.
 
using GaugeValueHues = std::array< uint32_t, 5 >
 Type of Gauge colors.
 
template<size_t N>
using KeySpec = std::array< uint32_t, N >
 A key specification of depth N.
 
template<size_t M, size_t N>
using KeySpecRow = std::array< KeySpec< N >, M >
 A row of KeySpec specifications.
 
using KSS = std::array< char, 5 >
 Type to help construct a KeySpec from a string.
 
template<size_t R, size_t M, size_t N>
using KeyboardSpec = std::array< std::array< KeySpec< N >, M >, R >
 Type for a full Keyboard specification.
 
using MenuDataList = std::vector< MenuButtonData >
 The MenuDataList type.
 
using TabHeader = Row
 The type to use as the TabHeader.
 
using FontSize = int
 Type specifier to pass a Font size to a Widget through a manipulator.
 
using ImageId = uint32_t
 An opaque type used to refer to a TextureData object in the cache.
 
using SignalToken = uint32_t
 A type definition for SignalToken used to identify the source of a Signal.
 
using LinearScaleSignalType = std::pair< float, SignalToken >
 Type definition for the LinearScale Signal type.
 

Enumerations

enum  MapProjectionType { MapProjectionType::Mercator, MapProjectionType::StationMercator, MapProjectionType::StationAzimuthal }
 
enum  MapDepiction { MapDepiction::Terrain, MapDepiction::Countries }
 
enum  MapIllumination { MapIllumination::Day, MapIllumination::Night }
 
enum  MapSize {
  MapSize::Small, MapSize::Medium, MapSize::Large, MapSize::ExtraLarge,
  Last
}
 
enum  MapOverLayImage : size_t { Sun, Moon, Count }
 
enum  EphemerisFile : size_t {
  ClearSkyMoon, ClearSkyAll, CTAmateur, CTCube,
  CTVisual
}
 
enum  ProjectionType { Mercator, StationMercator, StationAzmuthal }
 
enum  MapDataType : size_t {
  TerrainDay = 0, TerrainNight = 1, CountriesDay = 0x2, CountriesNight = 0x3,
  MapCount
}
 Map type ins order with the Night map after and one greater than the Day map.
 
enum  AnimationEnable { Disable, Enable }
 An enumeration to enable or disable animation.
 
enum  ButtonDisplayState { ButtonDisplayState::Inactive, ButtonDisplayState::Active, ButtonDisplayState::PressedActive, ButtonDisplayState::PressedInactive }
 The visible state a button is in. More...
 
enum  ButtonStateChange { ButtonStateChange::Pushed, ButtonStateChange::Off, ButtonStateChange::On }
 
enum  UseBorder {
  None, BevelOut, BevelIn, NotchOut,
  NotchIn, None, None, None,
  None, BevelOut, BevelOut, BevelOut,
  BevelIn, BevelIn, BevelIn, NotchOut,
  NotchOut, NotchOut, NotchIn, NotchIn,
  NotchIn
}
 The type of border to draw. More...
 
enum  FrameColorType { InactiveColor, AnimateColor }
 
enum  ImageId : int {
  NoImage, Compass, Heart, HeartEmpty,
  Cancel, Help, Info, Check,
  Alert, Lock, LockOpen, UpBold,
  UpOpenBig, DownBold, DownOpenBig, Left,
  Right, ToEnd, Back, LevelDown,
  OneDot, TwoDots, ThreeDots, UpDir,
  DownDir, LeftDir, RightDir, Keyboard,
  Globe, Network, Rocket, Location,
  Camera, ScaleNeedleUp, ScaleNeedleDown, ScaleNeedleLeft,
  ScaleNeedleRight, IconTarget, BevelOutSquareCorners, BevelInSquareCorners,
  NotchOutSquareCorners, NotchInSquareCorners, BevelOutRoundCorners, BevelInRoundCorners,
  NotchOutRoundCorners, NotchInRoundCorners, RoundCornerTrim, CenterRoundBaseColor,
  CenterRoundInvertColor, CenterRoundRedColor, CenterRoundGreenColor, CenterRoundBlueColor,
  CenterRoundYellowColor, CenterSquareBaseColor, CenterSquareInvertColor, DynamicIdStart
}
 
enum  ButtonType {
  ButtonType::Label, ButtonType::PushButton, ToggleButton, NormalButton,
  CancelButton, OkButton, ToggleButton, ToggleButton,
  ToggleButton, RadioButton, TabButton, MenuCascade
}
 The button type. More...
 
enum  ThemeColor : size_t {
  Base, Top, Bottom, Left,
  Right, Invert, Text, Red,
  Green, Yellow, RedText, GreenText,
  YellowText
}
 
enum  RendererFlags : uint32_t { RENDERER_SOFTWARE = static_cast<uint32_t>(SDL_RENDERER_SOFTWARE), RENDERER_ACCELERATED = static_cast<uint32_t>(SDL_RENDERER_ACCELERATED), RENDERER_PRESENTVSYNC = static_cast<uint32_t>(SDL_RENDERER_PRESENTVSYNC), RENDERER_TARGETTEXTURE = static_cast<uint32_t>(SDL_RENDERER_TARGETTEXTURE) }
 Flags used when creating a rendering context. More...
 
enum  Orientation {
  Horizontal, Vertical, Orientation::Unset, Orientation::Horizontal,
  Orientation::Vertical, Orientation::Both
}
 Possible values for Widget orientation. More...
 
enum  BorderStyle {
  BorderStyle::Unset, None, BevelOut, BevelIn,
  NotchOut, NotchIn, BorderStyle::Unset, BorderStyle::None,
  BorderStyle::Bevel, BorderStyle::BevelIn, BorderStyle::Notch, BorderStyle::TabTop,
  BorderStyle::TabLeft, BorderStyle::TabPage
}
 The types of border supported. More...
 
enum  CornerStyle {
  CornerStyle::Unset, CornerStyle::Square, CornerStyle::Round, CornerStyle::Unset,
  CornerStyle::Square, CornerStyle::Round
}
 Types of corners supported. More...
 
enum  DataType : int {
  Unset, Char, Int, Real,
  String
}
 Encode expected data types.
 
enum  SignalTokenValues : uint32_t {
  DialogOk, DialogSave, DialogCancel, DialogClose,
  ExitDialogOk, ExitDialogCancel, RadioUndetermined, FirstUserSignalToken
}
 These are the signal tokens used by built-in Widgets that transmit Signals with SignalTokens. More...
 
enum  ActionButtonType { ActionButtonOk, ActionButtonCancel, ActionButtonClose, ActionButtonSave }
 Types of Dialog action buttons. More...
 
enum  ButtonSetState : bool { ButtonOff = false, ButtonOn = true }
 A type alias for bool to set the button state. More...
 
enum  ButtonType {
  ButtonType::Label, ButtonType::PushButton, ToggleButton, NormalButton,
  CancelButton, OkButton, ToggleButton, ToggleButton,
  ToggleButton, RadioButton, TabButton, MenuCascade
}
 
enum  CacheError : uint32_t {
  CacheErrorNone = 0, CacheErrorNotFound = 1, CacheErrorWrite = 2, CacheErrorRead = 3,
  CacheErrorOffset = 10
}
 Error values return by the cache. More...
 
enum  CascadeButtonType { CascadeButtonType::Unset, CascadeButtonType::CascadeDown, CascadeButtonType::CascadeRight }
 The type of CascadeButton. More...
 
enum  Gradient {
  None, Gradient::DarkToLight, Gradient::LightToDark, Gradient::GreenToRed,
  Gradient::RedToGreen, Gradient::GreenYellowRed, Gradient::RedYellowGreen
}
 
enum  Modality { NotModal, Ephemeral, Modal }
 The Modality of a transient Window, a Popup or derivative. More...
 
enum  Manip { Manip::Parent }
 Widget manipulators without arguments. More...
 
enum  Orientation {
  Horizontal, Vertical, Orientation::Unset, Orientation::Horizontal,
  Orientation::Vertical, Orientation::Both
}
 
enum  RoseImageId : size_t {
  RoseImageInvalid = 0, IconCancel, IconHelp, IconInfo,
  IconCheck, IconAlert, IconLock, IconUpBold,
  IconUpOpenBig, IconLeft, IconRight, IconLeftDir,
  IconRightDir, IconUpDir, IconDownDir, IconToEnd,
  IconBack, IconLevelDown, IconLevelUp, Icon1Dot,
  Icon2Dots, Icon3Dots, IconKeyboard, IconGlobe,
  IconNetwork, IconRocket, IconLocation, IconCompass,
  IconCamera, ScaleNeedleUp, ScaleNeedleUp, ScaleNeedleDown,
  ScaleNeedleDown, ScaleNeedleLeft, ScaleNeedleLeft, ScaleNeedleRight,
  ScaleNeedleRight, IconTarget, IconTarget, IconTargetRed,
  IconTargetGreen, IconTargetYellow, BevelOutRoundCorners, BevelOutRoundCorners,
  BevelInRoundCorners, BevelInRoundCorners, NotchOutRoundCorners, NotchOutRoundCorners,
  NotchInRoundCorners, NotchInRoundCorners, CenterRoundBaseColor, CenterRoundBaseColor,
  CenterRoundInvertColor, CenterRoundInvertColor, CenterRoundRedColor, CenterRoundRedColor,
  CenterRoundGreenColor, CenterRoundGreenColor, CenterRoundBlueColor, CenterRoundBlueColor,
  CenterRoundYellowColor, CenterRoundYellowColor, BevelOutSquareCorners, BevelOutSquareCorners,
  BevelInSquareCorners, BevelInSquareCorners, NotchOutSquareCorners, NotchOutSquareCorners,
  NotchInSquareCorners, NotchInSquareCorners, CenterSquareBaseColor, CenterSquareBaseColor,
  CenterSquareInvertColor, CenterSquareInvertColor
}
 Identifiers for Textures created by the Rose object and available from the Rose ImageRepository. More...
 
enum  UseBorder {
  None, BevelOut, BevelIn, NotchOut,
  NotchIn, None, None, None,
  None, BevelOut, BevelOut, BevelOut,
  BevelIn, BevelIn, BevelIn, NotchOut,
  NotchOut, NotchOut, NotchIn, NotchIn,
  NotchIn
}
 
enum  HorizontalAlignment { HorizontalAlignment::Unset, HorizontalAlignment::Center, HorizontalAlignment::Left, HorizontalAlignment::Right }
 Horizontal alignment values. More...
 
enum  VerticalAlignment { VerticalAlignment::Unset, VerticalAlignment::Center, VerticalAlignment::Top, VerticalAlignment::Bottom }
 Vertical alignment values. More...
 
enum  LabelHorizontalAlignment { LabelHorizontalAlignment::Unset, LabelHorizontalAlignment::Center, LabelHorizontalAlignment::Left, LabelHorizontalAlignment::Right }
 Label text horizontal alignment. More...
 
enum  LabelVerticalAlignment {
  LabelVerticalAlignment::Unset, LabelVerticalAlignment::Center, LabelVerticalAlignment::Top, LabelVerticalAlignment::Bottom,
  LabelVerticalAlignment::Baseline
}
 
enum  BorderStyle {
  BorderStyle::Unset, None, BevelOut, BevelIn,
  NotchOut, NotchIn, BorderStyle::Unset, BorderStyle::None,
  BorderStyle::Bevel, BorderStyle::BevelIn, BorderStyle::Notch, BorderStyle::TabTop,
  BorderStyle::TabLeft, BorderStyle::TabPage
}
 
enum  CornerStyle {
  CornerStyle::Unset, CornerStyle::Square, CornerStyle::Round, CornerStyle::Unset,
  CornerStyle::Square, CornerStyle::Round
}
 
enum  DrawBackground { DrawBackground::Unset, DrawBackground::None, DrawBackground::Widget }
 Determine if the Widget should draw its own background, if supported. More...
 
enum  WidgetSize { VariableSize, FixedSize }
 An enumeration to encode how a widget size should be dealt with by a managing container. More...
 
enum  GaugeIndex : unsigned long {
  GaugeIndex::LowerBound = 0, GaugeIndex::LowWarning, GaugeIndex::LowNormal, GaugeIndex::HighNormal,
  GaugeIndex::HighWarning, GaugeIndex::UpperBound
}
 
enum  KeyboardMode { KeyboardMode::LowerCase, KeyboardMode::UpperCase, KeyboardMode::Numbers, KeyboardMode::Symbols }
 Keyboard modes (cases) More...
 
enum  LinearScaleIndicator { RoundThumb, SquareThumb, SingleChannel, DualChannel }
 
enum  CpuTimeIndex : std::size_t {
  USER = 0, NICE, SYSTEM, IDLE,
  IOWAIT, IRQ, SOFTIRQ, STEAL,
  GUEST, GUEST_NICE, ARRAY_SIZE
}
 

Functions

void solveSphere (double A, double b, double cc, double sc, double &cap, double &Bp)
 
double MoonPhase ()
 Calculate the current phase of the moon in days between [0..2*M_PI]. More...
 
GeoPosition projected (GeoPosition location, double angDist, double bearing)
 
double range (GeoPosition p0, GeoPosition p1)
 
std::tuple< bool, double, double > xyToAzLatLong (int x, int y, const Size &mapSize, const GeoPosition &location, double siny, double cosy)
 Transform a Mercator map pixel into an Azimuthal map latitude and longitude in radians. More...
 
std::tuple< double, double > subSolar ()
 Compute the sub-solar geographic coordinates, used in plotting the solar ilumination. More...
 
int pixel (SDL_Renderer *renderer, Sint16 x, Sint16 y)
 Draw pixel in currently set color. More...
 
int pixelRGBAWeight (SDL_Renderer *renderer, Sint16 x, Sint16 y, Uint8 r, Uint8 g, Uint8 b, Uint8 a, Uint32 weight)
 Draw pixel with blending enabled and using alpha weight on color. More...
 
int pixelColor (SDL_Renderer *renderer, Sint16 x, Sint16 y, Uint32 color)
 Draw pixel with blending enabled if a<255. More...
 
int pixelRGBA (SDL_Renderer *renderer, Sint16 x, Sint16 y, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
 Draw pixel with blending enabled if a<255. More...
 
int hline (SDL_Renderer *renderer, Sint16 x1, Sint16 x2, Sint16 y)
 Draw horizontal line in currently set color. More...
 
int hlineColor (SDL_Renderer *renderer, Sint16 x1, Sint16 x2, Sint16 y, Uint32 color)
 Draw horizontal line with blending. More...
 
int hlineRGBA (SDL_Renderer *renderer, Sint16 x1, Sint16 x2, Sint16 y, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
 Draw horizontal line with blending. More...
 
int vline (SDL_Renderer *renderer, Sint16 x, Sint16 y1, Sint16 y2)
 Draw vertical line in currently set color. More...
 
int vlineColor (SDL_Renderer *renderer, Sint16 x, Sint16 y1, Sint16 y2, Uint32 color)
 Draw vertical line with blending. More...
 
int vlineRGBA (SDL_Renderer *renderer, Sint16 x, Sint16 y1, Sint16 y2, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
 Draw vertical line with blending. More...
 
int rectangleColor (SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint32 color)
 Draw rectangle with blending. More...
 
int rectangleRGBA (SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
 Draw rectangle with blending. More...
 
int roundedRectangleColor (SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 rad, Uint32 color)
 Draw rounded-corner rectangle with blending. More...
 
int roundedRectangleRGBA (SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 rad, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
 Draw rounded-corner rectangle with blending. More...
 
int roundedBoxColor (SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 rad, Uint32 color)
 Draw rounded-corner box (filled rectangle) with blending. More...
 
int roundedBoxRGBA (SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 rad, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
 Draw rounded-corner box (filled rectangle) with blending. More...
 
int boxColor (SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint32 color)
 Draw box (filled rectangle) with blending. More...
 
int boxRGBA (SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
 Draw box (filled rectangle) with blending. More...
 
int line (SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2)
 Draw line with alpha blending using the currently set color. More...
 
int lineColor (SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint32 color)
 Draw line with alpha blending. More...
 
int lineRGBA (SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
 Draw line with alpha blending. More...
 
int _aalineRGBA (SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint8 r, Uint8 g, Uint8 b, Uint8 a, int draw_endpoint)
 Internal function to draw anti-aliased line with alpha blending and endpoint control. More...
 
int aalineColor (SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint32 color)
 Draw anti-aliased line with alpha blending. More...
 
int aalineRGBA (SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
 Draw anti-aliased line with alpha blending. More...
 
int circleColor (SDL_Renderer *renderer, Sint16 x, Sint16 y, Sint16 rad, Uint32 color)
 Draw circle with blending. More...
 
int circleRGBA (SDL_Renderer *renderer, Sint16 x, Sint16 y, Sint16 rad, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
 Draw circle with blending. More...
 
int arcColor (SDL_Renderer *renderer, Sint16 x, Sint16 y, Sint16 rad, Sint16 start, Sint16 end, Uint32 color)
 Arc with blending. More...
 
int arcRGBA (SDL_Renderer *renderer, Sint16 x, Sint16 y, Sint16 rad, Sint16 start, Sint16 end, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
 Arc with blending. More...
 
int aacircleColor (SDL_Renderer *renderer, Sint16 x, Sint16 y, Sint16 rad, Uint32 color)
 Draw anti-aliased circle with blending. More...
 
int aacircleRGBA (SDL_Renderer *renderer, Sint16 x, Sint16 y, Sint16 rad, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
 Draw anti-aliased circle with blending. More...
 
int _drawQuadrants (SDL_Renderer *renderer, Sint16 x, Sint16 y, Sint16 dx, Sint16 dy, Sint32 f)
 Internal function to draw pixels or lines in 4 quadrants. More...
 
int _ellipseRGBA (SDL_Renderer *renderer, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint8 r, Uint8 g, Uint8 b, Uint8 a, Sint32 f)
 
int ellipseColor (SDL_Renderer *renderer, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint32 color)
 Draw ellipse with blending. More...
 
int ellipseRGBA (SDL_Renderer *renderer, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
 Draw ellipse with blending. More...
 
int filledCircleColor (SDL_Renderer *renderer, Sint16 x, Sint16 y, Sint16 rad, Uint32 color)
 Draw filled circle with blending. More...
 
int filledCircleRGBA (SDL_Renderer *renderer, Sint16 x, Sint16 y, Sint16 rad, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
 Draw filled circle with blending. More...
 
int aaellipseColor (SDL_Renderer *renderer, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint32 color)
 Draw anti-aliased ellipse with blending. More...
 
int aaellipseRGBA (SDL_Renderer *renderer, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
 Draw anti-aliased ellipse with blending. More...
 
int filledEllipseColor (SDL_Renderer *renderer, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint32 color)
 Draw filled ellipse with blending. More...
 
int filledEllipseRGBA (SDL_Renderer *renderer, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
 Draw filled ellipse with blending. More...
 
int _pieRGBA (SDL_Renderer *renderer, Sint16 x, Sint16 y, Sint16 rad, Sint16 start, Sint16 end, Uint8 r, Uint8 g, Uint8 b, Uint8 a, Uint8 filled)
 Internal float (low-speed) pie-calc implementation by drawing polygons. More...
 
int pieColor (SDL_Renderer *renderer, Sint16 x, Sint16 y, Sint16 rad, Sint16 start, Sint16 end, Uint32 color)
 Draw pie (outline) with alpha blending. More...
 
int pieRGBA (SDL_Renderer *renderer, Sint16 x, Sint16 y, Sint16 rad, Sint16 start, Sint16 end, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
 Draw pie (outline) with alpha blending. More...
 
int filledPieColor (SDL_Renderer *renderer, Sint16 x, Sint16 y, Sint16 rad, Sint16 start, Sint16 end, Uint32 color)
 Draw filled pie with alpha blending. More...
 
int filledPieRGBA (SDL_Renderer *renderer, Sint16 x, Sint16 y, Sint16 rad, Sint16 start, Sint16 end, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
 Draw filled pie with alpha blending. More...
 
int trigonColor (SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 x3, Sint16 y3, Uint32 color)
 Draw trigon (triangle outline) with alpha blending. More...
 
int trigonRGBA (SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 x3, Sint16 y3, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
 Draw trigon (triangle outline) with alpha blending. More...
 
int aatrigonColor (SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 x3, Sint16 y3, Uint32 color)
 Draw anti-aliased trigon (triangle outline) with alpha blending. More...
 
int aatrigonRGBA (SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 x3, Sint16 y3, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
 Draw anti-aliased trigon (triangle outline) with alpha blending. More...
 
int filledTrigonColor (SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 x3, Sint16 y3, Uint32 color)
 Draw filled trigon (triangle) with alpha blending. More...
 
int filledTrigonRGBA (SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Sint16 x3, Sint16 y3, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
 Draw filled trigon (triangle) with alpha blending. More...
 
int polygonColor (SDL_Renderer *renderer, const Sint16 *vx, const Sint16 *vy, int n, Uint32 color)
 Draw polygon with alpha blending. More...
 
int polygon (SDL_Renderer *renderer, const Sint16 *vx, const Sint16 *vy, int n)
 Draw polygon with the currently set color and blend mode. More...
 
int polygonRGBA (SDL_Renderer *renderer, const Sint16 *vx, const Sint16 *vy, int n, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
 Draw polygon with alpha blending. More...
 
int aapolygonColor (SDL_Renderer *renderer, const Sint16 *vx, const Sint16 *vy, int n, Uint32 color)
 Draw anti-aliased polygon with alpha blending. More...
 
int aapolygonRGBA (SDL_Renderer *renderer, const Sint16 *vx, const Sint16 *vy, int n, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
 Draw anti-aliased polygon with alpha blending. More...
 
int _gfxPrimitivesCompareInt (const void *a, const void *b)
 Internal helper qsort callback functions used in filled polygon drawing. More...
 
int filledPolygonRGBAMT (SDL_Renderer *renderer, const Sint16 *vx, const Sint16 *vy, int n, Uint8 r, Uint8 g, Uint8 b, Uint8 a, int **polyInts, int *polyAllocated)
 Draw filled polygon with alpha blending (multi-threaded capable). More...
 
int filledPolygonColor (SDL_Renderer *renderer, const Sint16 *vx, const Sint16 *vy, int n, Uint32 color)
 Draw filled polygon with alpha blending. More...
 
int filledPolygonRGBA (SDL_Renderer *renderer, const Sint16 *vx, const Sint16 *vy, int n, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
 Draw filled polygon with alpha blending. More...
 
int _HLineTextured (SDL_Renderer *renderer, Sint16 x1, Sint16 x2, Sint16 y, SDL_Texture *texture, int texture_w, int texture_h, int texture_dx, int texture_dy)
 Internal function to draw a textured horizontal line. More...
 
int texturedPolygonMT (SDL_Renderer *renderer, const Sint16 *vx, const Sint16 *vy, int n, SDL_Surface *texture, int texture_dx, int texture_dy, int **polyInts, int *polyAllocated)
 Draws a polygon filled with the given texture (Multi-Threading Capable). More...
 
int texturedPolygon (SDL_Renderer *renderer, const Sint16 *vx, const Sint16 *vy, int n, SDL_Surface *texture, int texture_dx, int texture_dy)
 Draws a polygon filled with the given texture. More...
 
double _evaluateBezier (double *data, int ndata, double t)
 Internal function to calculate bezier interpolator of data array with ndata values at position 't'. More...
 
int bezierColor (SDL_Renderer *renderer, const Sint16 *vx, const Sint16 *vy, int n, int s, Uint32 color)
 Draw a bezier curve with alpha blending. More...
 
int bezierRGBA (SDL_Renderer *renderer, const Sint16 *vx, const Sint16 *vy, int n, int s, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
 Draw a bezier curve with alpha blending. More...
 
int thickLineColor (SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint8 width, Uint32 color)
 Draw a thick line with alpha blending. More...
 
int thickLineRGBA (SDL_Renderer *renderer, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint8 width, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
 Draw a thick line with alpha blending. More...
 
void gfxPrimitivesSetFont (const void *fontdata, Uint32 cw, Uint32 ch)
 
void gfxPrimitivesSetFontRotation (Uint32 rotation)
 
int characterColor (SDL_Renderer *renderer, Sint16 x, Sint16 y, char c, Uint32 color)
 
int characterRGBA (SDL_Renderer *renderer, Sint16 x, Sint16 y, char c, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
 
int stringColor (SDL_Renderer *renderer, Sint16 x, Sint16 y, const char *s, Uint32 color)
 
int stringRGBA (SDL_Renderer *renderer, Sint16 x, Sint16 y, const char *s, Uint8 r, Uint8 g, Uint8 b, Uint8 a)
 
template<class Curve , typename ... Args>
std::unique_ptr< Curve > curve (Args ... args)
 
auto textSizeUTF8 (FontPointer &fontPointer, const std::string &text)
 Get the size of a UTF8 string. More...
 
std::tuple< int, int, int, int, int > getGlyphMetrics (FontPointer &font, char glyph)
 
auto getFontMetrics (FontPointer &font)
 Get the font metrics of the current font. More...
 
auto fetchFont (FontCache &fontCache, const std::string &fontName, int fontSize)
 Fetch a font. More...
 
ImageId toImageId (int id)
 
int fmImageId (ImageId id)
 
void copyFullTexture (gm::Context &renderer, gm::Texture &src, gm::Texture &dst)
 
gm::Surface createBlankSurface (int size)
 
std::optional< int > getHintValue (const Visual::ValueMap &map, LayoutHint::GridLayoutHint hint)
 
template<typename I >
IdPath parsePathIdString (I inputString)
 
std::array< char, 8 > utf8 (int c)
 
template<typename I = int>
constexpr I WINDOWPOS_UNDEFINED_DISPLAY (uint display=0)
 
template<typename I = int>
constexpr I WINDOWPOS_CENTERED_DISPLAY (uint display=0)
 
template<typename U , typename C >
bool oneFlagOf (U flag, C container)
 
template<typename Arg , typename... Args>
std::string StringCompositor (Arg &&arg, Args &&... args)
 Composite a pack of arguments that are streamable to a string. More...
 
template<class Layout , typename ... Args>
std::unique_ptr< LayoutmakeLayout (Args ... args)
 
template<class WidgetClass , typename ... Args>
std::shared_ptr< WidgetClass > wdg (Args ... args)
 Create a Widget. More...
 
template<typename EnumClassType >
bool unset (EnumClassType value)
 Determine if an enumerated value is unset. More...
 
constexpr auto indexValue (const GaugeIndex &g)
 
GaugeIndexoperator++ (GaugeIndex &gaugeIndex)
 GaugeIndex pre-increment operator. More...
 
GaugeIndex operator+ (const GaugeIndex &gaugeIndex, unsigned long increment)
 Add an unsigned integer to a GaugeIndex. More...
 
template<size_t N>
constexpr auto makeKeySpec (const char *values) noexcept
 
template<class I , typename Arg , typename ... Args>
constexpr I makeKeySpecInit (I first, I last, Arg arg, Args ... args) noexcept
 
template<size_t N, typename ... Args>
constexpr auto makeKeySpec (Args ... args) noexcept
 

Detailed Description

ToDo: There is an issue that the initial scroll interaction is lost if the click/press lands on a Widget and not a Container (by user observation).

Typedef Documentation

◆ ButtonCallback

using rose::ButtonCallback = typedef std::function<bool(bool pressed, uint button, uint clicks)>

Mouse button callback.

Parameters
pressedTrue when a button has been pressed, false when released.
buttonA cumulative mask of mouse button state.
clicksThe number of multiple clicks reported by the SDL API.

◆ ButtonCommandCallback

using rose::ButtonCommandCallback = typedef std::function<void(ButtonStateChange buttonStateChange, uint commandId)>

Button command callback.

Parameters
buttonStateChangeIndicates the cange in state of the button.
commandIdIdentifies the button command function to the receiver.

◆ ButtonDisplayCallback

using rose::ButtonDisplayCallback = typedef std::function<void(ButtonDisplayState buttonDisplayState)>

Button display state callback.

Called when interaction events change the display state of a button which indicate to the user the evolution of the state of the button.

Parameters
buttonDisplayStateA ButtonDisplayState value indicating how the button should be displayed.

◆ ButtonStateChangeCallback

using rose::ButtonStateChangeCallback = typedef std::function<void(ButtonStateChange buttonStateChange)>

Button state change callback.

Parameters
buttonStateChangeIndicates the change in state of the button.

◆ KeyboardFocusCallback

using rose::KeyboardFocusCallback = typedef std::function<void(bool hasFocus)>

Keyboard focus callback.

Parameters
hasFocusTrue if Widget is gaining keyboard focus, false if loosing it.

◆ KeyboardShortcutCallback

using rose::KeyboardShortcutCallback = typedef std::function<void(uint32_t shortcutCode, bool state, uint repeat)>

Keyboard shortcut callback.

Called when a registered ALt-Key is pressed

Parameters
shortcutCodeThe shortcut code defined by the widget bound to the action.
stateTrue if the key is pressed, false if released.

◆ MouseMotionCallback

using rose::MouseMotionCallback = typedef std::function<bool(bool pressed, uint state, Position<int> mousePosition, Position<int> relativePosition)>

Mouse motion callback.

Parameters
pressedTrue if a mouse button is pressed.
stateA cumulative mask of mouse button state.
mousePostionThe position of the mouse pointer on the Screen.
relativePostionThe mouse position relative the the last reported position.

◆ ScrollCallback

using rose::ScrollCallback = typedef std::function<bool(Position<int> deltaPos)>

Mouse scroll wheel callback.

Parameters
deltaPosThe change in position indicated by scroll wheel motion.

◆ TextInputCallback

using rose::TextInputCallback = typedef std::function<void(const std::string& text)>

Text input callback.

Parameters
textThe keyboard input.

Enumeration Type Documentation

◆ ButtonDisplayState

The visible state a button is in.

Enumerator
Inactive 

Button is inactive (not pushed, toggled off, etc).

Active 

Button is active (pushed, toggled on, etc).

PressedActive 

User pressed the button in the Active state.

PressedInactive 

User pressed the button in the Inactive state.

◆ ButtonStateChange

Enumerator
Pushed 

Push button has been pushed.

Off 

Toggle button changed to off.

On 

Toggle button changed to on.

◆ GaugeIndex

enum rose::GaugeIndex : unsigned long
strong
Enumerator
LowerBound 

Index to the minimum displayable value and LowEmergency color.

LowWarning 

The bottom of the warning band value and and LowWarning color.

LowNormal 

The bottom of the normal band value and Normal color.

HighNormal 

The top of the normal band value and HighWarning color.

HighWarning 

The top of the warning band value and HighEmergency color.

UpperBound 

Index to the maximum displayable value.

◆ KeyboardMode

enum rose::KeyboardMode
strong

Keyboard modes (cases)

Enumerator
LowerCase 

Lower case letters.

UpperCase 

Upper case letters.

Numbers 

Numbers and symbols.

Symbols 

Numbers and more symbols.

◆ MapDepiction

enum rose::MapDepiction
strong
Enumerator
Terrain 

The terrain map.

Countries 

The countries map.

◆ MapIllumination

enum rose::MapIllumination
strong
Enumerator
Day 

The Day map.

Night 

The Night map.

◆ MapProjectionType

Enumerator
Mercator 

Standard Mercator split a the International Date Line.

StationMercator 

Mercator split so the Station location is centred.

StationAzimuthal 

Azimuthal with the Station location centered on the left hemisphere.

◆ MapSize

enum rose::MapSize
strong
Enumerator
Small 

Small 660 x 330.

Medium 

Medium 1320 x 660.

Large 

Large 1980 x 990.

ExtraLarge 

ExtraLarger 2640 x 1320.

◆ RendererFlags

enum rose::RendererFlags : uint32_t

Flags used when creating a rendering context.

Enumerator
RENDERER_SOFTWARE 

The renderer is a software fallback.

RENDERER_ACCELERATED 

The renderer uses hardware acceleration.

RENDERER_PRESENTVSYNC 

Present is synchronized with the refresh rate.

RENDERER_TARGETTEXTURE 

The renderer supports rendering to texture.

Function Documentation

◆ _aalineRGBA()

int rose::_aalineRGBA ( SDL_Renderer *  renderer,
Sint16  x1,
Sint16  y1,
Sint16  x2,
Sint16  y2,
Uint8  r,
Uint8  g,
Uint8  b,
Uint8  a,
int  draw_endpoint 
)

Internal function to draw anti-aliased line with alpha blending and endpoint control.

This implementation of the Wu antialiasing code is based on Mike Abrash's DDJ article which was reprinted as Chapter 42 of his Graphics Programming Black Book, but has been optimized to work with SDL and utilizes 32-bit fixed-point arithmetic by A. Schiffler. The endpoint control allows the supression to draw the last pixel useful for rendering continous aa-lines with alpha<255.

Parameters
rendererThe renderer to draw on.
x1X coordinate of the first point of the aa-line.
y1Y coordinate of the first point of the aa-line.
x2X coordinate of the second point of the aa-line.
y2Y coordinate of the second point of the aa-line.
rThe red value of the aa-line to draw.
gThe green value of the aa-line to draw.
bThe blue value of the aa-line to draw.
aThe alpha value of the aa-line to draw.
draw_endpointFlag indicating if the endpoint should be drawn; draw if non-zero.
Returns
Returns 0 on success, -1 on failure.

◆ _drawQuadrants()

int rose::_drawQuadrants ( SDL_Renderer *  renderer,
Sint16  x,
Sint16  y,
Sint16  dx,
Sint16  dy,
Sint32  f 
)

Internal function to draw pixels or lines in 4 quadrants.

Parameters
rendererThe renderer to draw on.
xX coordinate of the center of the quadrant.
yY coordinate of the center of the quadrant.
dxX offset in pixels of the corners of the quadrant.
dyY offset in pixels of the corners of the quadrant.
fFlag indicating if the quadrant should be filled (1) or not (0).
Returns
Returns 0 on success, -1 on failure.

◆ _evaluateBezier()

double rose::_evaluateBezier ( double *  data,
int  ndata,
double  t 
)

Internal function to calculate bezier interpolator of data array with ndata values at position 't'.

Parameters
dataArray of values.
ndataSize of array.
tPosition for which to calculate interpolated value. t should be between [0, ndata].
Returns
Interpolated value at position t, value[0] when t<0, value[n-1] when t>n.

◆ _gfxPrimitivesCompareInt()

int rose::_gfxPrimitivesCompareInt ( const void *  a,
const void *  b 
)

Internal helper qsort callback functions used in filled polygon drawing.

Parameters
aThe surface to draw on.
bVertex array containing X coordinates of the points of the polygon.
Returns
Returns 0 if a==b, a negative number if a<b or a positive number if a>b.

◆ _HLineTextured()

int rose::_HLineTextured ( SDL_Renderer *  renderer,
Sint16  x1,
Sint16  x2,
Sint16  y,
SDL_Texture *  texture,
int  texture_w,
int  texture_h,
int  texture_dx,
int  texture_dy 
)

Internal function to draw a textured horizontal line.

Parameters
rendererThe renderer to draw on.
x1X coordinate of the first point (i.e. left) of the line.
x2X coordinate of the second point (i.e. right) of the line.
yY coordinate of the points of the line.
textureThe texture to retrieve color information from.
texture_wThe width of the texture.
texture_hThe height of the texture.
texture_dxThe X offset for the texture lookup.
texture_dyThe Y offset for the textured lookup.
Returns
Returns 0 on success, -1 on failure.

◆ _pieRGBA()

int rose::_pieRGBA ( SDL_Renderer *  renderer,
Sint16  x,
Sint16  y,
Sint16  rad,
Sint16  start,
Sint16  end,
Uint8  r,
Uint8  g,
Uint8  b,
Uint8  a,
Uint8  filled 
)

Internal float (low-speed) pie-calc implementation by drawing polygons.

Note: Determines vertex array and uses polygon or filledPolygon drawing routines to render.

Parameters
rendererThe renderer to draw on.
xX coordinate of the center of the pie.
yY coordinate of the center of the pie.
radRadius in pixels of the pie.
startStarting radius in degrees of the pie.
endEnding radius in degrees of the pie.
rThe red value of the pie to draw.
gThe green value of the pie to draw.
bThe blue value of the pie to draw.
aThe alpha value of the pie to draw.
filledFlag indicating if the pie should be filled (=1) or not (=0).
Returns
Returns 0 on success, -1 on failure.

◆ aacircleColor()

int rose::aacircleColor ( SDL_Renderer *  renderer,
Sint16  x,
Sint16  y,
Sint16  rad,
Uint32  color 
)

Draw anti-aliased circle with blending.

Parameters
rendererThe renderer to draw on.
xX coordinate of the center of the aa-circle.
yY coordinate of the center of the aa-circle.
radRadius in pixels of the aa-circle.
colorThe color value of the aa-circle to draw (0xRRGGBBAA).
Returns
Returns 0 on success, -1 on failure.

◆ aacircleRGBA()

int rose::aacircleRGBA ( SDL_Renderer *  renderer,
Sint16  x,
Sint16  y,
Sint16  rad,
Uint8  r,
Uint8  g,
Uint8  b,
Uint8  a 
)

Draw anti-aliased circle with blending.

Parameters
rendererThe renderer to draw on.
xX coordinate of the center of the aa-circle.
yY coordinate of the center of the aa-circle.
radRadius in pixels of the aa-circle.
rThe red value of the aa-circle to draw.
gThe green value of the aa-circle to draw.
bThe blue value of the aa-circle to draw.
aThe alpha value of the aa-circle to draw.
Returns
Returns 0 on success, -1 on failure.

◆ aaellipseColor()

int rose::aaellipseColor ( SDL_Renderer *  renderer,
Sint16  x,
Sint16  y,
Sint16  rx,
Sint16  ry,
Uint32  color 
)

Draw anti-aliased ellipse with blending.

Parameters
rendererThe renderer to draw on.
xX coordinate of the center of the aa-ellipse.
yY coordinate of the center of the aa-ellipse.
rxHorizontal radius in pixels of the aa-ellipse.
ryVertical radius in pixels of the aa-ellipse.
colorThe color value of the aa-ellipse to draw (0xRRGGBBAA).
Returns
Returns 0 on success, -1 on failure.

◆ aaellipseRGBA()

int rose::aaellipseRGBA ( SDL_Renderer *  renderer,
Sint16  x,
Sint16  y,
Sint16  rx,
Sint16  ry,
Uint8  r,
Uint8  g,
Uint8  b,
Uint8  a 
)

Draw anti-aliased ellipse with blending.

Parameters
rendererThe renderer to draw on.
xX coordinate of the center of the aa-ellipse.
yY coordinate of the center of the aa-ellipse.
rxHorizontal radius in pixels of the aa-ellipse.
ryVertical radius in pixels of the aa-ellipse.
rThe red value of the aa-ellipse to draw.
gThe green value of the aa-ellipse to draw.
bThe blue value of the aa-ellipse to draw.
aThe alpha value of the aa-ellipse to draw.
Returns
Returns 0 on success, -1 on failure.

◆ aalineColor()

int rose::aalineColor ( SDL_Renderer *  renderer,
Sint16  x1,
Sint16  y1,
Sint16  x2,
Sint16  y2,
Uint32  color 
)

Draw anti-aliased line with alpha blending.

Parameters
rendererThe renderer to draw on.
x1X coordinate of the first point of the aa-line.
y1Y coordinate of the first point of the aa-line.
x2X coordinate of the second point of the aa-line.
y2Y coordinate of the second point of the aa-line.
colorThe color value of the aa-line to draw (0xRRGGBBAA).
Returns
Returns 0 on success, -1 on failure.

◆ aalineRGBA()

int rose::aalineRGBA ( SDL_Renderer *  renderer,
Sint16  x1,
Sint16  y1,
Sint16  x2,
Sint16  y2,
Uint8  r,
Uint8  g,
Uint8  b,
Uint8  a 
)

Draw anti-aliased line with alpha blending.

Parameters
rendererThe renderer to draw on.
x1X coordinate of the first point of the aa-line.
y1Y coordinate of the first point of the aa-line.
x2X coordinate of the second point of the aa-line.
y2Y coordinate of the second point of the aa-line.
rThe red value of the aa-line to draw.
gThe green value of the aa-line to draw.
bThe blue value of the aa-line to draw.
aThe alpha value of the aa-line to draw.
Returns
Returns 0 on success, -1 on failure.

◆ aapolygonColor()

int rose::aapolygonColor ( SDL_Renderer *  renderer,
const Sint16 *  vx,
const Sint16 *  vy,
int  n,
Uint32  color 
)

Draw anti-aliased polygon with alpha blending.

Parameters
rendererThe renderer to draw on.
vxVertex array containing X coordinates of the points of the aa-polygon.
vyVertex array containing Y coordinates of the points of the aa-polygon.
nNumber of points in the vertex array. Minimum number is 3.
colorThe color value of the aa-polygon to draw (0xRRGGBBAA).
Returns
Returns 0 on success, -1 on failure.

◆ aapolygonRGBA()

int rose::aapolygonRGBA ( SDL_Renderer *  renderer,
const Sint16 *  vx,
const Sint16 *  vy,
int  n,
Uint8  r,
Uint8  g,
Uint8  b,
Uint8  a 
)

Draw anti-aliased polygon with alpha blending.

Parameters
rendererThe renderer to draw on.
vxVertex array containing X coordinates of the points of the aa-polygon.
vyVertex array containing Y coordinates of the points of the aa-polygon.
nNumber of points in the vertex array. Minimum number is 3.
rThe red value of the aa-polygon to draw.
gThe green value of the aa-polygon to draw.
bThe blue value of the aa-polygon to draw.
aThe alpha value of the aa-polygon to draw.
Returns
Returns 0 on success, -1 on failure.

◆ aatrigonColor()

int rose::aatrigonColor ( SDL_Renderer *  renderer,
Sint16  x1,
Sint16  y1,
Sint16  x2,
Sint16  y2,
Sint16  x3,
Sint16  y3,
Uint32  color 
)

Draw anti-aliased trigon (triangle outline) with alpha blending.

Note: Creates vertex array and uses aapolygon routine to render.

Parameters
rendererThe renderer to draw on.
x1X coordinate of the first point of the aa-trigon.
y1Y coordinate of the first point of the aa-trigon.
x2X coordinate of the second point of the aa-trigon.
y2Y coordinate of the second point of the aa-trigon.
x3X coordinate of the third point of the aa-trigon.
y3Y coordinate of the third point of the aa-trigon.
colorThe color value of the aa-trigon to draw (0xRRGGBBAA).
Returns
Returns 0 on success, -1 on failure.

◆ aatrigonRGBA()

int rose::aatrigonRGBA ( SDL_Renderer *  renderer,
Sint16  x1,
Sint16  y1,
Sint16  x2,
Sint16  y2,
Sint16  x3,
Sint16  y3,
Uint8  r,
Uint8  g,
Uint8  b,
Uint8  a 
)

Draw anti-aliased trigon (triangle outline) with alpha blending.

Parameters
rendererThe renderer to draw on.
x1X coordinate of the first point of the aa-trigon.
y1Y coordinate of the first point of the aa-trigon.
x2X coordinate of the second point of the aa-trigon.
y2Y coordinate of the second point of the aa-trigon.
x3X coordinate of the third point of the aa-trigon.
y3Y coordinate of the third point of the aa-trigon.
rThe red value of the aa-trigon to draw.
gThe green value of the aa-trigon to draw.
bThe blue value of the aa-trigon to draw.
aThe alpha value of the aa-trigon to draw.
Returns
Returns 0 on success, -1 on failure.

◆ arcColor()

int rose::arcColor ( SDL_Renderer *  renderer,
Sint16  x,
Sint16  y,
Sint16  rad,
Sint16  start,
Sint16  end,
Uint32  color 
)

Arc with blending.

Parameters
rendererThe renderer to draw on.
xX coordinate of the center of the arc.
yY coordinate of the center of the arc.
radRadius in pixels of the arc.
startStarting radius in degrees of the arc. 0 degrees is down, increasing counterclockwise.
endEnding radius in degrees of the arc. 0 degrees is down, increasing counterclockwise.
colorThe color value of the arc to draw (0xRRGGBBAA).
Returns
Returns 0 on success, -1 on failure.

◆ arcRGBA()

int rose::arcRGBA ( SDL_Renderer *  renderer,
Sint16  x,
Sint16  y,
Sint16  rad,
Sint16  start,
Sint16  end,
Uint8  r,
Uint8  g,
Uint8  b,
Uint8  a 
)

Arc with blending.

Parameters
rendererThe renderer to draw on.
xX coordinate of the center of the arc.
yY coordinate of the center of the arc.
radRadius in pixels of the arc.
startStarting radius in degrees of the arc. 0 degrees is down, increasing counterclockwise.
endEnding radius in degrees of the arc. 0 degrees is down, increasing counterclockwise.
rThe red value of the arc to draw.
gThe green value of the arc to draw.
bThe blue value of the arc to draw.
aThe alpha value of the arc to draw.
Returns
Returns 0 on success, -1 on failure.

◆ bezierColor()

int rose::bezierColor ( SDL_Renderer *  renderer,
const Sint16 *  vx,
const Sint16 *  vy,
int  n,
int  s,
Uint32  color 
)

Draw a bezier curve with alpha blending.

Parameters
rendererThe renderer to draw on.
vxVertex array containing X coordinates of the points of the bezier curve.
vyVertex array containing Y coordinates of the points of the bezier curve.
nNumber of points in the vertex array. Minimum number is 3.
sNumber of steps for the interpolation. Minimum number is 2.
colorThe color value of the bezier curve to draw (0xRRGGBBAA).
Returns
Returns 0 on success, -1 on failure.

◆ bezierRGBA()

int rose::bezierRGBA ( SDL_Renderer *  renderer,
const Sint16 *  vx,
const Sint16 *  vy,
int  n,
int  s,
Uint8  r,
Uint8  g,
Uint8  b,
Uint8  a 
)

Draw a bezier curve with alpha blending.

Parameters
rendererThe renderer to draw on.
vxVertex array containing X coordinates of the points of the bezier curve.
vyVertex array containing Y coordinates of the points of the bezier curve.
nNumber of points in the vertex array. Minimum number is 3.
sNumber of steps for the interpolation. Minimum number is 2.
rThe red value of the bezier curve to draw.
gThe green value of the bezier curve to draw.
bThe blue value of the bezier curve to draw.
aThe alpha value of the bezier curve to draw.
Returns
Returns 0 on success, -1 on failure.

◆ boxColor()

int rose::boxColor ( SDL_Renderer *  renderer,
Sint16  x1,
Sint16  y1,
Sint16  x2,
Sint16  y2,
Uint32  color 
)

Draw box (filled rectangle) with blending.

Parameters
rendererThe renderer to draw on.
x1X coordinate of the first point (i.e. top right) of the box.
y1Y coordinate of the first point (i.e. top right) of the box.
x2X coordinate of the second point (i.e. bottom left) of the box.
y2Y coordinate of the second point (i.e. bottom left) of the box.
colorThe color value of the box to draw (0xRRGGBBAA).
Returns
Returns 0 on success, -1 on failure.

◆ boxRGBA()

int rose::boxRGBA ( SDL_Renderer *  renderer,
Sint16  x1,
Sint16  y1,
Sint16  x2,
Sint16  y2,
Uint8  r,
Uint8  g,
Uint8  b,
Uint8  a 
)

Draw box (filled rectangle) with blending.

Parameters
rendererThe renderer to draw on.
x1X coordinate of the first point (i.e. top right) of the box.
y1Y coordinate of the first point (i.e. top right) of the box.
x2X coordinate of the second point (i.e. bottom left) of the box.
y2Y coordinate of the second point (i.e. bottom left) of the box.
rThe red value of the box to draw.
gThe green value of the box to draw.
bThe blue value of the box to draw.
aThe alpha value of the box to draw.
Returns
Returns 0 on success, -1 on failure.

◆ circleColor()

int rose::circleColor ( SDL_Renderer *  renderer,
Sint16  x,
Sint16  y,
Sint16  rad,
Uint32  color 
)

Draw circle with blending.

Parameters
rendererThe renderer to draw on.
xX coordinate of the center of the circle.
yY coordinate of the center of the circle.
radRadius in pixels of the circle.
colorThe color value of the circle to draw (0xRRGGBBAA).
Returns
Returns 0 on success, -1 on failure.

◆ circleRGBA()

int rose::circleRGBA ( SDL_Renderer *  renderer,
Sint16  x,
Sint16  y,
Sint16  rad,
Uint8  r,
Uint8  g,
Uint8  b,
Uint8  a 
)

Draw circle with blending.

Parameters
rendererThe renderer to draw on.
xX coordinate of the center of the circle.
yY coordinate of the center of the circle.
radRadius in pixels of the circle.
rThe red value of the circle to draw.
gThe green value of the circle to draw.
bThe blue value of the circle to draw.
aThe alpha value of the circle to draw.
Returns
Returns 0 on success, -1 on failure.

◆ ellipseColor()

int rose::ellipseColor ( SDL_Renderer *  renderer,
Sint16  x,
Sint16  y,
Sint16  rx,
Sint16  ry,
Uint32  color 
)

Draw ellipse with blending.

Parameters
rendererThe renderer to draw on.
xX coordinate of the center of the ellipse.
yY coordinate of the center of the ellipse.
rxHorizontal radius in pixels of the ellipse.
ryVertical radius in pixels of the ellipse.
colorThe color value of the ellipse to draw (0xRRGGBBAA).
Returns
Returns 0 on success, -1 on failure.

◆ ellipseRGBA()

int rose::ellipseRGBA ( SDL_Renderer *  renderer,
Sint16  x,
Sint16  y,
Sint16  rx,
Sint16  ry,
Uint8  r,
Uint8  g,
Uint8  b,
Uint8  a 
)

Draw ellipse with blending.

Parameters
rendererThe renderer to draw on.
xX coordinate of the center of the ellipse.
yY coordinate of the center of the ellipse.
rxHorizontal radius in pixels of the ellipse.
ryVertical radius in pixels of the ellipse.
rThe red value of the ellipse to draw.
gThe green value of the ellipse to draw.
bThe blue value of the ellipse to draw.
aThe alpha value of the ellipse to draw.
Returns
Returns 0 on success, -1 on failure.

◆ fetchFont()

auto rose::fetchFont ( FontCache fontCache,
const std::string &  fontName,
int  fontSize 
)
inline

Fetch a font.

If the font at the size requested is in the cache, the cached value is returned. If the font can't be found the default font "FreeSans" is tried. If that can't be found and exception is thrown.

Parameters
fontCacheThe FontCache.
fontNameThe name of the font.
fontSizeThe point size of the font in pixels.
Returns
The font.

◆ filledCircleColor()

int rose::filledCircleColor ( SDL_Renderer *  renderer,
Sint16  x,
Sint16  y,
Sint16  rad,
Uint32  color 
)

Draw filled circle with blending.

Parameters
rendererThe renderer to draw on.
xX coordinate of the center of the filled circle.
yY coordinate of the center of the filled circle.
radRadius in pixels of the filled circle.
colorThe color value of the filled circle to draw (0xRRGGBBAA).
Returns
Returns 0 on success, -1 on failure.

◆ filledCircleRGBA()

int rose::filledCircleRGBA ( SDL_Renderer *  renderer,
Sint16  x,
Sint16  y,
Sint16  rad,
Uint8  r,
Uint8  g,
Uint8  b,
Uint8  a 
)

Draw filled circle with blending.

Parameters
rendererThe renderer to draw on.
xX coordinate of the center of the filled circle.
yY coordinate of the center of the filled circle.
radRadius in pixels of the filled circle.
rThe red value of the filled circle to draw.
gThe green value of the filled circle to draw.
bThe blue value of the filled circle to draw.
aThe alpha value of the filled circle to draw.
Returns
Returns 0 on success, -1 on failure.

◆ filledEllipseColor()

int rose::filledEllipseColor ( SDL_Renderer *  renderer,
Sint16  x,
Sint16  y,
Sint16  rx,
Sint16  ry,
Uint32  color 
)

Draw filled ellipse with blending.

Parameters
rendererThe renderer to draw on.
xX coordinate of the center of the filled ellipse.
yY coordinate of the center of the filled ellipse.
rxHorizontal radius in pixels of the filled ellipse.
ryVertical radius in pixels of the filled ellipse.
colorThe color value of the filled ellipse to draw (0xRRGGBBAA).
Returns
Returns 0 on success, -1 on failure.

◆ filledEllipseRGBA()

int rose::filledEllipseRGBA ( SDL_Renderer *  renderer,
Sint16  x,
Sint16  y,
Sint16  rx,
Sint16  ry,
Uint8  r,
Uint8  g,
Uint8  b,
Uint8  a 
)

Draw filled ellipse with blending.

Parameters
rendererThe renderer to draw on.
xX coordinate of the center of the filled ellipse.
yY coordinate of the center of the filled ellipse.
rxHorizontal radius in pixels of the filled ellipse.
ryVertical radius in pixels of the filled ellipse.
rThe red value of the filled ellipse to draw.
gThe green value of the filled ellipse to draw.
bThe blue value of the filled ellipse to draw.
aThe alpha value of the filled ellipse to draw.
Returns
Returns 0 on success, -1 on failure.

◆ filledPieColor()

int rose::filledPieColor ( SDL_Renderer *  renderer,
Sint16  x,
Sint16  y,
Sint16  rad,
Sint16  start,
Sint16  end,
Uint32  color 
)

Draw filled pie with alpha blending.

Parameters
rendererThe renderer to draw on.
xX coordinate of the center of the filled pie.
yY coordinate of the center of the filled pie.
radRadius in pixels of the filled pie.
startStarting radius in degrees of the filled pie.
endEnding radius in degrees of the filled pie.
colorThe color value of the filled pie to draw (0xRRGGBBAA).
Returns
Returns 0 on success, -1 on failure.

◆ filledPieRGBA()

int rose::filledPieRGBA ( SDL_Renderer *  renderer,
Sint16  x,
Sint16  y,
Sint16  rad,
Sint16  start,
Sint16  end,
Uint8  r,
Uint8  g,
Uint8  b,
Uint8  a 
)

Draw filled pie with alpha blending.

Parameters
rendererThe renderer to draw on.
xX coordinate of the center of the filled pie.
yY coordinate of the center of the filled pie.
radRadius in pixels of the filled pie.
startStarting radius in degrees of the filled pie.
endEnding radius in degrees of the filled pie.
rThe red value of the filled pie to draw.
gThe green value of the filled pie to draw.
bThe blue value of the filled pie to draw.
aThe alpha value of the filled pie to draw.
Returns
Returns 0 on success, -1 on failure.

◆ filledPolygonColor()

int rose::filledPolygonColor ( SDL_Renderer *  renderer,
const Sint16 *  vx,
const Sint16 *  vy,
int  n,
Uint32  color 
)

Draw filled polygon with alpha blending.

Parameters
rendererThe renderer to draw on.
vxVertex array containing X coordinates of the points of the filled polygon.
vyVertex array containing Y coordinates of the points of the filled polygon.
nNumber of points in the vertex array. Minimum number is 3.
colorThe color value of the filled polygon to draw (0xRRGGBBAA).
Returns
Returns 0 on success, -1 on failure.

◆ filledPolygonRGBA()

int rose::filledPolygonRGBA ( SDL_Renderer *  renderer,
const Sint16 *  vx,
const Sint16 *  vy,
int  n,
Uint8  r,
Uint8  g,
Uint8  b,
Uint8  a 
)

Draw filled polygon with alpha blending.

Parameters
rendererThe renderer to draw on.
vxVertex array containing X coordinates of the points of the filled polygon.
vyVertex array containing Y coordinates of the points of the filled polygon.
nNumber of points in the vertex array. Minimum number is 3.
rThe red value of the filled polygon to draw.
gThe green value of the filled polygon to draw.
bThe blue value of the filed polygon to draw.
aThe alpha value of the filled polygon to draw.
Returns
Returns 0 on success, -1 on failure.

◆ filledPolygonRGBAMT()

int rose::filledPolygonRGBAMT ( SDL_Renderer *  renderer,
const Sint16 *  vx,
const Sint16 *  vy,
int  n,
Uint8  r,
Uint8  g,
Uint8  b,
Uint8  a,
int **  polyInts,
int *  polyAllocated 
)

Draw filled polygon with alpha blending (multi-threaded capable).

Note: The last two parameters are optional; but are required for multithreaded operation.

Parameters
rendererThe renderer to draw on.
vxVertex array containing X coordinates of the points of the filled polygon.
vyVertex array containing Y coordinates of the points of the filled polygon.
nNumber of points in the vertex array. Minimum number is 3.
rThe red value of the filled polygon to draw.
gThe green value of the filled polygon to draw.
bThe blue value of the filled polygon to draw.
aThe alpha value of the filled polygon to draw.
polyIntsPreallocated, temporary vertex array used for sorting vertices. Required for multithreaded operation; set to nullptr otherwise.
polyAllocatedFlag indicating if temporary vertex array was allocated. Required for multithreaded operation; set to nullptr otherwise.
Returns
Returns 0 on success, -1 on failure.

◆ filledTrigonColor()

int rose::filledTrigonColor ( SDL_Renderer *  renderer,
Sint16  x1,
Sint16  y1,
Sint16  x2,
Sint16  y2,
Sint16  x3,
Sint16  y3,
Uint32  color 
)

Draw filled trigon (triangle) with alpha blending.

Note: Creates vertex array and uses aapolygon routine to render.

Parameters
rendererThe renderer to draw on.
x1X coordinate of the first point of the filled trigon.
y1Y coordinate of the first point of the filled trigon.
x2X coordinate of the second point of the filled trigon.
y2Y coordinate of the second point of the filled trigon.
x3X coordinate of the third point of the filled trigon.
y3Y coordinate of the third point of the filled trigon.
colorThe color value of the filled trigon to draw (0xRRGGBBAA).
Returns
Returns 0 on success, -1 on failure.

◆ filledTrigonRGBA()

int rose::filledTrigonRGBA ( SDL_Renderer *  renderer,
Sint16  x1,
Sint16  y1,
Sint16  x2,
Sint16  y2,
Sint16  x3,
Sint16  y3,
Uint8  r,
Uint8  g,
Uint8  b,
Uint8  a 
)

Draw filled trigon (triangle) with alpha blending.

Note: Creates vertex array and uses aapolygon routine to render.

Parameters
rendererThe renderer to draw on.
x1X coordinate of the first point of the filled trigon.
y1Y coordinate of the first point of the filled trigon.
x2X coordinate of the second point of the filled trigon.
y2Y coordinate of the second point of the filled trigon.
x3X coordinate of the third point of the filled trigon.
y3Y coordinate of the third point of the filled trigon.
rThe red value of the filled trigon to draw.
gThe green value of the filled trigon to draw.
bThe blue value of the filled trigon to draw.
aThe alpha value of the filled trigon to draw.
Returns
Returns 0 on success, -1 on failure.

◆ getFontMetrics()

auto rose::getFontMetrics ( FontPointer font)
inline

Get the font metrics of the current font.

See TTF_FontHeight et al.

Returns
a std::tuple with font height, font ascent, font descent, and font line skip.

◆ hline()

int rose::hline ( SDL_Renderer *  renderer,
Sint16  x1,
Sint16  x2,
Sint16  y 
)

Draw horizontal line in currently set color.

Parameters
rendererThe renderer to draw on.
x1X coordinate of the first point (i.e. left) of the line.
x2X coordinate of the second point (i.e. right) of the line.
yY coordinate of the points of the line.
Returns
Returns 0 on success, -1 on failure.

◆ hlineColor()

int rose::hlineColor ( SDL_Renderer *  renderer,
Sint16  x1,
Sint16  x2,
Sint16  y,
Uint32  color 
)

Draw horizontal line with blending.

Parameters
rendererThe renderer to draw on.
x1X coordinate of the first point (i.e. left) of the line.
x2X coordinate of the second point (i.e. right) of the line.
yY coordinate of the points of the line.
colorThe color value of the line to draw (0xRRGGBBAA).
Returns
Returns 0 on success, -1 on failure.

◆ hlineRGBA()

int rose::hlineRGBA ( SDL_Renderer *  renderer,
Sint16  x1,
Sint16  x2,
Sint16  y,
Uint8  r,
Uint8  g,
Uint8  b,
Uint8  a 
)

Draw horizontal line with blending.

Parameters
rendererThe renderer to draw on.
x1X coordinate of the first point (i.e. left) of the line.
x2X coordinate of the second point (i.e. right) of the line.
yY coordinate of the points of the line.
rThe red value of the line to draw.
gThe green value of the line to draw.
bThe blue value of the line to draw.
aThe alpha value of the line to draw.
Returns
Returns 0 on success, -1 on failure.

◆ line()

int rose::line ( SDL_Renderer *  renderer,
Sint16  x1,
Sint16  y1,
Sint16  x2,
Sint16  y2 
)

Draw line with alpha blending using the currently set color.

Parameters
rendererThe renderer to draw on.
x1X coordinate of the first point of the line.
y1Y coordinate of the first point of the line.
x2X coordinate of the second point of the line.
y2Y coordinate of the second point of the line.
Returns
Returns 0 on success, -1 on failure.

◆ lineColor()

int rose::lineColor ( SDL_Renderer *  renderer,
Sint16  x1,
Sint16  y1,
Sint16  x2,
Sint16  y2,
Uint32  color 
)

Draw line with alpha blending.

Parameters
rendererThe renderer to draw on.
x1X coordinate of the first point of the line.
y1Y coordinate of the first point of the line.
x2X coordinate of the second point of the line.
y2Y coordinate of the seond point of the line.
colorThe color value of the line to draw (0xRRGGBBAA).
Returns
Returns 0 on success, -1 on failure.

◆ lineRGBA()

int rose::lineRGBA ( SDL_Renderer *  renderer,
Sint16  x1,
Sint16  y1,
Sint16  x2,
Sint16  y2,
Uint8  r,
Uint8  g,
Uint8  b,
Uint8  a 
)

Draw line with alpha blending.

Parameters
rendererThe renderer to draw on.
x1X coordinate of the first point of the line.
y1Y coordinate of the first point of the line.
x2X coordinate of the second point of the line.
y2Y coordinate of the second point of the line.
rThe red value of the line to draw.
gThe green value of the line to draw.
bThe blue value of the line to draw.
aThe alpha value of the line to draw.
Returns
Returns 0 on success, -1 on failure.

◆ MoonPhase()

double rose::MoonPhase ( )
inline

Calculate the current phase of the moon in days between [0..2*M_PI].

Returns
The moon phase.

◆ operator+()

GaugeIndex rose::operator+ ( const GaugeIndex gaugeIndex,
unsigned long  increment 
)
inline

Add an unsigned integer to a GaugeIndex.

Throws std::domain_error if the resultant value is outside the define range.

Parameters
gaugeIndexThe GaugeIndex to add to.
incrementThe amount to increment it by.
Returns
The GaugeIndex that results from the increment.

◆ operator++()

GaugeIndex& rose::operator++ ( GaugeIndex gaugeIndex)
inline

GaugeIndex pre-increment operator.

Throws std::domain_error if the resultant value is outside the define range.

Parameters
gaugeIndexThe GaugeIndex to increment.
Returns
A reference to the GaugeIndex.

◆ pieColor()

int rose::pieColor ( SDL_Renderer *  renderer,
Sint16  x,
Sint16  y,
Sint16  rad,
Sint16  start,
Sint16  end,
Uint32  color 
)

Draw pie (outline) with alpha blending.

Parameters
rendererThe renderer to draw on.
xX coordinate of the center of the pie.
yY coordinate of the center of the pie.
radRadius in pixels of the pie.
startStarting radius in degrees of the pie.
endEnding radius in degrees of the pie.
colorThe color value of the pie to draw (0xRRGGBBAA).
Returns
Returns 0 on success, -1 on failure.

◆ pieRGBA()

int rose::pieRGBA ( SDL_Renderer *  renderer,
Sint16  x,
Sint16  y,
Sint16  rad,
Sint16  start,
Sint16  end,
Uint8  r,
Uint8  g,
Uint8  b,
Uint8  a 
)

Draw pie (outline) with alpha blending.

Parameters
rendererThe renderer to draw on.
xX coordinate of the center of the pie.
yY coordinate of the center of the pie.
radRadius in pixels of the pie.
startStarting radius in degrees of the pie.
endEnding radius in degrees of the pie.
rThe red value of the pie to draw.
gThe green value of the pie to draw.
bThe blue value of the pie to draw.
aThe alpha value of the pie to draw.
Returns
Returns 0 on success, -1 on failure.

◆ pixel()

int rose::pixel ( SDL_Renderer *  renderer,
Sint16  x,
Sint16  y 
)

Draw pixel in currently set color.

Parameters
rendererThe renderer to draw on.
xX (horizontal) coordinate of the pixel.
yY (vertical) coordinate of the pixel.
Returns
Returns 0 on success, -1 on failure.

◆ pixelColor()

int rose::pixelColor ( SDL_Renderer *  renderer,
Sint16  x,
Sint16  y,
Uint32  color 
)

Draw pixel with blending enabled if a<255.

Parameters
rendererThe renderer to draw on.
xX (horizontal) coordinate of the pixel.
yY (vertical) coordinate of the pixel.
colorThe color value of the pixel to draw (0xRRGGBBAA).
Returns
Returns 0 on success, -1 on failure.

◆ pixelRGBA()

int rose::pixelRGBA ( SDL_Renderer *  renderer,
Sint16  x,
Sint16  y,
Uint8  r,
Uint8  g,
Uint8  b,
Uint8  a 
)

Draw pixel with blending enabled if a<255.

Parameters
rendererThe renderer to draw on.
xX (horizontal) coordinate of the pixel.
yY (vertical) coordinate of the pixel.
rThe red color value of the pixel to draw.
gThe green color value of the pixel to draw.
bThe blue color value of the pixel to draw.
aThe alpha value of the pixel to draw.
Returns
Returns 0 on success, -1 on failure.

◆ pixelRGBAWeight()

int rose::pixelRGBAWeight ( SDL_Renderer *  renderer,
Sint16  x,
Sint16  y,
Uint8  r,
Uint8  g,
Uint8  b,
Uint8  a,
Uint32  weight 
)

Draw pixel with blending enabled and using alpha weight on color.

Parameters
rendererThe renderer to draw on.
xThe horizontal coordinate of the pixel.
yThe vertical position of the pixel.
rThe red color value of the pixel to draw.
gThe green color value of the pixel to draw.
bThe blue color value of the pixel to draw.
aThe alpha value of the pixel to draw.
weightThe weight multiplied into the alpha value of the pixel.
Returns
Returns 0 on success, -1 on failure.

◆ polygon()

int rose::polygon ( SDL_Renderer *  renderer,
const Sint16 *  vx,
const Sint16 *  vy,
int  n 
)

Draw polygon with the currently set color and blend mode.

Parameters
rendererThe renderer to draw on.
vxVertex array containing X coordinates of the points of the polygon.
vyVertex array containing Y coordinates of the points of the polygon.
nNumber of points in the vertex array. Minimum number is 3.
Returns
Returns 0 on success, -1 on failure.

◆ polygonColor()

int rose::polygonColor ( SDL_Renderer *  renderer,
const Sint16 *  vx,
const Sint16 *  vy,
int  n,
Uint32  color 
)

Draw polygon with alpha blending.

Parameters
rendererThe renderer to draw on.
vxVertex array containing X coordinates of the points of the polygon.
vyVertex array containing Y coordinates of the points of the polygon.
nNumber of points in the vertex array. Minimum number is 3.
colorThe color value of the polygon to draw (0xRRGGBBAA).
Returns
Returns 0 on success, -1 on failure.

◆ polygonRGBA()

int rose::polygonRGBA ( SDL_Renderer *  renderer,
const Sint16 *  vx,
const Sint16 *  vy,
int  n,
Uint8  r,
Uint8  g,
Uint8  b,
Uint8  a 
)

Draw polygon with alpha blending.

Parameters
rendererThe renderer to draw on.
vxVertex array containing X coordinates of the points of the polygon.
vyVertex array containing Y coordinates of the points of the polygon.
nNumber of points in the vertex array. Minimum number is 3.
rThe red value of the polygon to draw.
gThe green value of the polygon to draw.
bThe blue value of the polygon to draw.
aThe alpha value of the polygon to draw.
Returns
Returns 0 on success, -1 on failure.

◆ rectangleColor()

int rose::rectangleColor ( SDL_Renderer *  renderer,
Sint16  x1,
Sint16  y1,
Sint16  x2,
Sint16  y2,
Uint32  color 
)

Draw rectangle with blending.

Parameters
rendererThe renderer to draw on.
x1X coordinate of the first point (i.e. top right) of the rectangle.
y1Y coordinate of the first point (i.e. top right) of the rectangle.
x2X coordinate of the second point (i.e. bottom left) of the rectangle.
y2Y coordinate of the second point (i.e. bottom left) of the rectangle.
colorThe color value of the rectangle to draw (0xRRGGBBAA).
Returns
Returns 0 on success, -1 on failure.

◆ rectangleRGBA()

int rose::rectangleRGBA ( SDL_Renderer *  renderer,
Sint16  x1,
Sint16  y1,
Sint16  x2,
Sint16  y2,
Uint8  r,
Uint8  g,
Uint8  b,
Uint8  a 
)

Draw rectangle with blending.

Parameters
rendererThe renderer to draw on.
x1X coordinate of the first point (i.e. top right) of the rectangle.
y1Y coordinate of the first point (i.e. top right) of the rectangle.
x2X coordinate of the second point (i.e. bottom left) of the rectangle.
y2Y coordinate of the second point (i.e. bottom left) of the rectangle.
rThe red value of the rectangle to draw.
gThe green value of the rectangle to draw.
bThe blue value of the rectangle to draw.
aThe alpha value of the rectangle to draw.
Returns
Returns 0 on success, -1 on failure.

◆ roundedBoxColor()

int rose::roundedBoxColor ( SDL_Renderer *  renderer,
Sint16  x1,
Sint16  y1,
Sint16  x2,
Sint16  y2,
Sint16  rad,
Uint32  color 
)

Draw rounded-corner box (filled rectangle) with blending.

Parameters
rendererThe renderer to draw on.
x1X coordinate of the first point (i.e. top right) of the box.
y1Y coordinate of the first point (i.e. top right) of the box.
x2X coordinate of the second point (i.e. bottom left) of the box.
y2Y coordinate of the second point (i.e. bottom left) of the box.
radThe radius of the corner arcs of the box.
colorThe color value of the box to draw (0xRRGGBBAA).
Returns
Returns 0 on success, -1 on failure.

◆ roundedBoxRGBA()

int rose::roundedBoxRGBA ( SDL_Renderer *  renderer,
Sint16  x1,
Sint16  y1,
Sint16  x2,
Sint16  y2,
Sint16  rad,
Uint8  r,
Uint8  g,
Uint8  b,
Uint8  a 
)

Draw rounded-corner box (filled rectangle) with blending.

Parameters
rendererThe renderer to draw on.
x1X coordinate of the first point (i.e. top right) of the box.
y1Y coordinate of the first point (i.e. top right) of the box.
x2X coordinate of the second point (i.e. bottom left) of the box.
y2Y coordinate of the second point (i.e. bottom left) of the box.
radThe radius of the corner arcs of the box.
rThe red value of the box to draw.
gThe green value of the box to draw.
bThe blue value of the box to draw.
aThe alpha value of the box to draw.
Returns
Returns 0 on success, -1 on failure.

◆ roundedRectangleColor()

int rose::roundedRectangleColor ( SDL_Renderer *  renderer,
Sint16  x1,
Sint16  y1,
Sint16  x2,
Sint16  y2,
Sint16  rad,
Uint32  color 
)

Draw rounded-corner rectangle with blending.

Parameters
rendererThe renderer to draw on.
x1X coordinate of the first point (i.e. top right) of the rectangle.
y1Y coordinate of the first point (i.e. top right) of the rectangle.
x2X coordinate of the second point (i.e. bottom left) of the rectangle.
y2Y coordinate of the second point (i.e. bottom left) of the rectangle.
radThe radius of the corner arc.
colorThe color value of the rectangle to draw (0xRRGGBBAA).
Returns
Returns 0 on success, -1 on failure.

◆ roundedRectangleRGBA()

int rose::roundedRectangleRGBA ( SDL_Renderer *  renderer,
Sint16  x1,
Sint16  y1,
Sint16  x2,
Sint16  y2,
Sint16  rad,
Uint8  r,
Uint8  g,
Uint8  b,
Uint8  a 
)

Draw rounded-corner rectangle with blending.

Parameters
rendererThe renderer to draw on.
x1X coordinate of the first point (i.e. top right) of the rectangle.
y1Y coordinate of the first point (i.e. top right) of the rectangle.
x2X coordinate of the second point (i.e. bottom left) of the rectangle.
y2Y coordinate of the second point (i.e. bottom left) of the rectangle.
radThe radius of the corner arc.
rThe red value of the rectangle to draw.
gThe green value of the rectangle to draw.
bThe blue value of the rectangle to draw.
aThe alpha value of the rectangle to draw.
Returns
Returns 0 on success, -1 on failure.

◆ StringCompositor()

template<typename Arg , typename... Args>
std::string rose::StringCompositor ( Arg &&  arg,
Args &&...  args 
)

Composite a pack of arguments that are streamable to a string.

Template Parameters
ArgFirst argument type
ArgsRest of the argument types
Parameters
argFirst argument
argsRest of the arguments
Returns
The composited string

◆ subSolar()

std::tuple<double, double> rose::subSolar ( )

Compute the sub-solar geographic coordinates, used in plotting the solar ilumination.

Returns
a tuple with the latitude, longitude in radians

◆ textSizeUTF8()

auto rose::textSizeUTF8 ( FontPointer fontPointer,
const std::string &  text 
)
inline

Get the size of a UTF8 string.

Parameters
fontPointerThe font to use.
textThe string
Returns
A std::tuple<int,int> with the width and height of the text.

◆ texturedPolygon()

int rose::texturedPolygon ( SDL_Renderer *  renderer,
const Sint16 *  vx,
const Sint16 *  vy,
int  n,
SDL_Surface *  texture,
int  texture_dx,
int  texture_dy 
)

Draws a polygon filled with the given texture.

This standard version is calling multithreaded versions with nullptr cache parameters.

Parameters
rendererThe renderer to draw on.
vxarray of x vector components
vyarray of x vector components
nthe amount of vectors in the vx and vy array
texturethe sdl surface to use to fill the polygon
texture_dxthe offset of the texture relative to the screeen. if you move the polygon 10 pixels to the left and want the texture to apear the same you need to increase the texture_dx value
texture_dysee texture_dx
Returns
Returns 0 on success, -1 on failure.

◆ texturedPolygonMT()

int rose::texturedPolygonMT ( SDL_Renderer *  renderer,
const Sint16 *  vx,
const Sint16 *  vy,
int  n,
SDL_Surface *  texture,
int  texture_dx,
int  texture_dy,
int **  polyInts,
int *  polyAllocated 
)

Draws a polygon filled with the given texture (Multi-Threading Capable).

Parameters
rendererThe renderer to draw on.
vxarray of x vector components
vyarray of x vector components
nthe amount of vectors in the vx and vy array
texturethe sdl surface to use to fill the polygon
texture_dxthe offset of the texture relative to the screeen. If you move the polygon 10 pixels to the left and want the texture to apear the same you need to increase the texture_dx value
texture_dysee texture_dx
polyIntsPreallocated temp array storage for vertex sorting (used for multi-threaded operation)
polyAllocatedFlag indicating oif the temp array was allocated (used for multi-threaded operation)
Returns
Returns 0 on success, -1 on failure.

◆ thickLineColor()

int rose::thickLineColor ( SDL_Renderer *  renderer,
Sint16  x1,
Sint16  y1,
Sint16  x2,
Sint16  y2,
Uint8  width,
Uint32  color 
)

Draw a thick line with alpha blending.

Parameters
rendererThe renderer to draw on.
x1X coordinate of the first point of the line.
y1Y coordinate of the first point of the line.
x2X coordinate of the second point of the line.
y2Y coordinate of the second point of the line.
widthWidth of the line in pixels. Must be >0.
colorThe color value of the line to draw (0xRRGGBBAA).
Returns
Returns 0 on success, -1 on failure.

◆ thickLineRGBA()

int rose::thickLineRGBA ( SDL_Renderer *  renderer,
Sint16  x1,
Sint16  y1,
Sint16  x2,
Sint16  y2,
Uint8  width,
Uint8  r,
Uint8  g,
Uint8  b,
Uint8  a 
)

Draw a thick line with alpha blending.

Parameters
rendererThe renderer to draw on.
x1X coordinate of the first point of the line.
y1Y coordinate of the first point of the line.
x2X coordinate of the second point of the line.
y2Y coordinate of the second point of the line.
widthWidth of the line in pixels. Must be >0.
rThe red value of the character to draw.
gThe green value of the character to draw.
bThe blue value of the character to draw.
aThe alpha value of the character to draw.
Returns
Returns 0 on success, -1 on failure.

◆ trigonColor()

int rose::trigonColor ( SDL_Renderer *  renderer,
Sint16  x1,
Sint16  y1,
Sint16  x2,
Sint16  y2,
Sint16  x3,
Sint16  y3,
Uint32  color 
)

Draw trigon (triangle outline) with alpha blending.

Note: Creates vertex array and uses polygon routine to render.

Parameters
rendererThe renderer to draw on.
x1X coordinate of the first point of the trigon.
y1Y coordinate of the first point of the trigon.
x2X coordinate of the second point of the trigon.
y2Y coordinate of the second point of the trigon.
x3X coordinate of the third point of the trigon.
y3Y coordinate of the third point of the trigon.
colorThe color value of the trigon to draw (0xRRGGBBAA).
Returns
Returns 0 on success, -1 on failure.

◆ trigonRGBA()

int rose::trigonRGBA ( SDL_Renderer *  renderer,
Sint16  x1,
Sint16  y1,
Sint16  x2,
Sint16  y2,
Sint16  x3,
Sint16  y3,
Uint8  r,
Uint8  g,
Uint8  b,
Uint8  a 
)

Draw trigon (triangle outline) with alpha blending.

Parameters
rendererThe renderer to draw on.
x1X coordinate of the first point of the trigon.
y1Y coordinate of the first point of the trigon.
x2X coordinate of the second point of the trigon.
y2Y coordinate of the second point of the trigon.
x3X coordinate of the third point of the trigon.
y3Y coordinate of the third point of the trigon.
rThe red value of the trigon to draw.
gThe green value of the trigon to draw.
bThe blue value of the trigon to draw.
aThe alpha value of the trigon to draw.
Returns
Returns 0 on success, -1 on failure.

◆ vline()

int rose::vline ( SDL_Renderer *  renderer,
Sint16  x,
Sint16  y1,
Sint16  y2 
)

Draw vertical line in currently set color.

Parameters
rendererThe renderer to draw on.
xX coordinate of points of the line.
y1Y coordinate of the first point (i.e. top) of the line.
y2Y coordinate of the second point (i.e. bottom) of the line.
Returns
Returns 0 on success, -1 on failure.

◆ vlineColor()

int rose::vlineColor ( SDL_Renderer *  renderer,
Sint16  x,
Sint16  y1,
Sint16  y2,
Uint32  color 
)

Draw vertical line with blending.

Parameters
rendererThe renderer to draw on.
xX coordinate of the points of the line.
y1Y coordinate of the first point (i.e. top) of the line.
y2Y coordinate of the second point (i.e. bottom) of the line.
colorThe color value of the line to draw (0xRRGGBBAA).
Returns
Returns 0 on success, -1 on failure.

◆ vlineRGBA()

int rose::vlineRGBA ( SDL_Renderer *  renderer,
Sint16  x,
Sint16  y1,
Sint16  y2,
Uint8  r,
Uint8  g,
Uint8  b,
Uint8  a 
)

Draw vertical line with blending.

Parameters
rendererThe renderer to draw on.
xX coordinate of the points of the line.
y1Y coordinate of the first point (i.e. top) of the line.
y2Y coordinate of the second point (i.e. bottom) of the line.
rThe red value of the line to draw.
gThe green value of the line to draw.
bThe blue value of the line to draw.
aThe alpha value of the line to draw.
Returns
Returns 0 on success, -1 on failure.

◆ wdg()

template<class WidgetClass , typename ... Args>
std::shared_ptr<WidgetClass> rose::wdg ( Args ...  args)
inline

Create a Widget.

Template Parameters
WidgetClassThe type of the Widget to create.
ArgsThe parameter pack type.
Parameters
argsThe creation arguments parameter pack.
Returns
A std::shared_ptr to the Widget or null.

◆ xyToAzLatLong()

std::tuple<bool, double, double> rose::xyToAzLatLong ( int  x,
int  y,
const Size mapSize,
const GeoPosition location,
double  siny,
double  cosy 
)

Transform a Mercator map pixel into an Azimuthal map latitude and longitude in radians.

Parameters
xThe map x pixel location 0 on the left
yThe map y pixel location 0 at the top
mapSizethe width (x) and height (y) of the map in pixels
locationthe longitude (x) and latitude (y) of the center of the projection
sinypre-computed sine of the latitude
cosypre-computed cosine of the latitude
Returns
[valid, latitude, longitude ], valid if the pixel is on the Earth, latitude -PI..+PI West to East, longitude +PI/2..-PI/2 North to South