Forge
fg Namespace Reference

Data Structures

class  ArgumentError
 
class  DimensionError
 
class  Error
 
class  Font
 Font object is essentially a resource handler for the specific font you want to use. More...
 
class  Histogram
 Bar graph to display data frequencey. More...
 
class  Image
 
class  Plot
 Line graph to display plots. More...
 
class  Plot3
 3d graph to display 3d line plots. More...
 
class  Surface
 3d graph to display plots. More...
 
class  TypeError
 
class  Window
 Window is where other objects such as Images, Plots etc. More...
 

Enumerations

enum  ErrorCode {
  FG_SUCCESS = 0, FG_ERR_SIZE = 1001, FG_ERR_INVALID_TYPE = 1002, FG_ERR_INVALID_ARG = 1003,
  FG_ERR_GL_ERROR = 2001, FG_ERR_FREETYPE_ERROR = 3001, FG_ERR_FILE_NOT_FOUND = 4001, FG_ERR_NOT_SUPPORTED = 5001,
  FG_ERR_NOT_CONFIGURED = 5002, FG_ERR_INTERNAL = 9001, FG_ERR_RUNTIME = 9002, FG_ERR_UNKNOWN = 9003
}
 
enum  ChannelFormat {
  FG_GRAYSCALE = 100, FG_RG = 200, FG_RGB = 300, FG_BGR = 301,
  FG_RGBA = 400, FG_BGRA = 401
}
 
enum  ColorMap {
  FG_DEFAULT_MAP = 0, FG_SPECTRUM_MAP = 1, FG_COLORS_MAP = 2, FG_RED_MAP = 3,
  FG_MOOD_MAP = 4, FG_HEAT_MAP = 5, FG_BLUE_MAP = 6
}
 Color maps. More...
 
enum  Color {
  FG_RED = 0xFF0000FF, FG_GREEN = 0x00FF00FF, FG_BLUE = 0x0000FFFF, FG_YELLOW = 0xFFFF00FF,
  FG_CYAN = 0x00FFFFFF, FG_MAGENTA = 0xFF00FFFF, FG_WHITE = 0xFFFFFFFF, FG_BLACK = 0x000000FF
}
 
enum  dtype {
  s8 = 0, u8 = 1, s32 = 2, u32 = 3,
  f32 = 4, s16 = 5, u16 = 6
}
 
enum  PlotType { FG_LINE = 0, FG_SCATTER = 1, FG_SURFACE = 2 }
 
enum  MarkerType {
  FG_NONE = 0, FG_POINT = 1, FG_CIRCLE = 2, FG_SQUARE = 3,
  FG_TRIANGLE = 4, FG_CROSS = 5, FG_PLUS = 6, FG_STAR = 7
}
 

Functions

template<typename T >
void copy (fg::Image &out, const T *dataPtr)
 
template<class Renderable , typename T >
void copy (Renderable &out, const T *dataPtr)
 
static void copy (fg::Image &out, const cl::Buffer &in, const cl::CommandQueue &queue)
 
template<class Renderable >
void copy (Renderable &out, const cl::Buffer &in, const cl::CommandQueue &queue)
 

Enumeration Type Documentation

◆ ChannelFormat

Enumerator
FG_GRAYSCALE 

Single channel.

FG_RG 

Three(Red, Green & Blue) channels.

FG_RGB 

Three(Red, Green & Blue) channels.

FG_BGR 

Three(Red, Green & Blue) channels.

FG_RGBA 

Four(Red, Green, Blue & Alpha) channels.

FG_BGRA 

Four(Red, Green, Blue & Alpha) channels.

◆ Color

enum Color
Enumerator
FG_RED 
FG_GREEN 
FG_BLUE 
FG_YELLOW 
FG_CYAN 
FG_MAGENTA 
FG_WHITE 
FG_BLACK 

◆ ColorMap

enum ColorMap

Color maps.

gfx_palette.png
Enumerator
FG_DEFAULT_MAP 

Default [0-255] grayscale colormap.

FG_SPECTRUM_MAP 

Spectrum color.

FG_COLORS_MAP 

Pure Colors.

FG_RED_MAP 

Red color map.

FG_MOOD_MAP 

Mood color map.

FG_HEAT_MAP 

Heat color map.

FG_BLUE_MAP 

Blue color map.

◆ dtype

enum dtype
Enumerator
s8 

Signed byte (8-bits)

u8 

Unsigned byte (8-bits)

s32 

Signed integer (32-bits)

u32 

Unsigned integer (32-bits)

f32 

Float (32-bits)

s16 

Signed integer (16-bits)

u16 

Unsigned integer (16-bits)

◆ ErrorCode

enum ErrorCode
Enumerator
FG_SUCCESS 

Fuction returned successfully.

FG_ERR_SIZE 

Invalid size argument.

FG_ERR_INVALID_TYPE 

Invalid type argument.

FG_ERR_INVALID_ARG 

Invalid argument.

FG_ERR_GL_ERROR 

OpenGL error.

FG_ERR_FREETYPE_ERROR 

Freetype library error.

FG_ERR_FILE_NOT_FOUND 

File IO errors.

FG_ERR_NOT_SUPPORTED 

Feature not supported.

FG_ERR_NOT_CONFIGURED 

Library configuration mismatch.

FG_ERR_INTERNAL 

Internal error.

FG_ERR_RUNTIME 

Runtime error.

FG_ERR_UNKNOWN 

Unkown error.

◆ MarkerType

enum MarkerType
Enumerator
FG_NONE 
FG_POINT 
FG_CIRCLE 
FG_SQUARE 
FG_TRIANGLE 
FG_CROSS 
FG_PLUS 
FG_STAR 

◆ PlotType

enum PlotType
Enumerator
FG_LINE 
FG_SCATTER 
FG_SURFACE 

Function Documentation

◆ copy() [1/4]

static void fg::copy ( fg::Image out,
const cl::Buffer &  in,
const cl::CommandQueue &  queue 
)
static

◆ copy() [2/4]

void copy ( fg::Image out,
const T *  dataPtr 
)

◆ copy() [3/4]

void copy ( Renderable &  out,
const T *  dataPtr 
)

◆ copy() [4/4]

void fg::copy ( Renderable &  out,
const cl::Buffer &  in,
const cl::CommandQueue &  queue 
)