The Fast Light Environment Kit


libflek_core Global Functions

absolute

inline int absolute(int x);

Returns the absolute value.

inline float absolute(float x);

Returns the absolute value.

inline double absolute(double x);

Returns the absolute value.

add

FImage* add(FImage *A, FImage *B, int xo=0, int yo=0, float o=1.0);

Add image B to image A in place. Image B can be offset by xo, yo. And the operation may have an opacity o.

void add(unsigned char* dest, const unsigned char* src, int opacity, int length, int dest_channels, int src_channels);

Add src to dest, where src and dest are an array of unsigned chars in RGBA order. opacity is an integer value from 0-255 that gives the src frame an overall opacity/transparency. length is the number of RGBA pixels to perform this operation on.

clamp_lower

inline int clamp_lower(int x, int Clamp);

Clamp a value to a lower bound.

Parameters
ValueThe value to clamp.
ClampThe lower bound.

clamp_upper

inline int clamp_upper(int Value, int Clamp);

Clamp a value to an upper bound.

Parameters
ValueThe value to clamp.
ClampThe upper bound.

cofsign

inline int cofsign(uint i, uint j);

For matrices - sign of cofactor. 1 if i+j is even, -1 if i+j is odd

composite

FImage* composite(FImage *A, FImage *B, int xo=0, int yo=0, float o=1.0);

Composite image B "over" image A in place. Image B can be offset by xo, yo. And the operation may have an opacity o.

void composite(unsigned char* dest, const unsigned char* src, int opacity, int length, int dest_channels, int src_channels);

Composite src "over" dest, where src and dest are an array of unsigned chars in RGBA order. opacity is an integer value from 0-255 that gives the src frame an overall opacity/transparency. length is the number of RGBA pixels to perform this operation on.

cube

inline int cube(int x);

Cube the number.

inline uint cube(uint x);

Cube the number.

inline float cube(float x);

Cube the number.

inline double cube(double x);

Cube the number.

darken_only

FImage* darken_only(FImage *A, FImage *B, int xo=0, int yo=0, float o=1.0);

Darken image A from Image B in place. Image B can be offset by xo, yo. And the operation may have an opacity o.

void darken_only(unsigned char* dest, const unsigned char* src, int opacity, int length, int dest_channels, int src_channels);

Use the minimum (darkest) value of src and dest, where src and dest are an array of unsigned chars in RGBA order. opacity is an integer value from 0-255 that gives the src frame an overall opacity/transparency. length is the number of RGBA pixels to perform this operation on.

deg2rad

inline float deg2rad(float deg);

Degrees to radians.

inline double deg2rad(double deg);

Degrees to radians.

difference

FImage* difference(FImage *A, FImage *B, int xo=0, int yo=0, float o=1.0);

Create a difference from images A and B in place. Image B can be offset by xo, yo. And the operation may have an opacity o.

void difference(unsigned char* dest, const unsigned char* src, int opacity, int length, int dest_channels, int src_channels);

The difference of src and dest, where src and dest are an array of unsigned chars in RGBA order. opacity is an integer value from 0-255 that gives the src frame an overall opacity/transparency. length is the number of RGBA pixels to perform this operation on.

divide

FImage* divide(FImage *A, FImage *B, int xo=0, int yo=0, float o=1.0);

Divide image A by Image B in place. Image B can be offset by xo, yo. And the operation may have an opacity o.

void divide(unsigned char* dest, const unsigned char* src, int opacity, int length, int dest_channels, int src_channels);

Divide dest by src, where src and dest are an array of unsigned chars in RGBA order. opacity is an integer value from 0-255 that gives the src frame an overall opacity/transparency. length is the number of RGBA pixels to perform this operation on.

is_even

inline bool is_even(int num);

Check if passed number is even.

inline bool is_even(uint num);

Check if passed number is even.

is_non_zero

inline bool is_non_zero(int num);

Check if passed number is non-zero.

inline bool is_non_zero(double num);

Check if passed number is non-zero. (Uses ZERO bounds).

is_odd

inline bool is_odd(int num);

Check if passed number is odd.

inline bool is_odd(uint num);

Check if passed number is odd.

lighten_only

FImage* lighten_only(FImage *A, FImage *B, int xo=0, int yo=0, float o=1.0);

Lighten image A from Image B in place. Image B can be offset by xo, yo. And the operation may have an opacity o.

void lighten_only(unsigned char* dest, const unsigned char* src, int opacity, int length, int dest_channels, int src_channels);

Use the maximum (lightest) value of src and dest, where src and dest are an array of unsigned chars in RGBA order. opacity is an integer value from 0-255 that gives the src frame an overall opacity/transparency. length is the number of RGBA pixels to perform this operation on.

lo_to_hi

void lo_to_hi(ulong *buffer, int len);

Convert an array of MSB longs to an array of LSB longs.

max

inline int max(int x, int y);

Maximum of two numbers.

inline uint max(uint x, uint y);

Maximum of two numbers.

inline float max(float x, float y);

Maximum of two numbers.

inline double max(double x, double y);

Maximum of two numbers.

inline unsigned char max(unsigned char x, unsigned char y);

Maximum of two unsigned chars.

min

inline int min(int x, int y);

Minimum of two numbers.

inline uint min(uint x, uint y);

Minimum of two numbers.

inline float min(float x, float y);

Minimum of two numbers.

inline double min(double x, double y);

Minimum of two numbers.

inline unsigned char min(unsigned char x, unsigned char y);

Minimum of two unsigned chars.

multiply

FImage* multiply(FImage *A, FImage *B, int xo=0, int yo=0, float o=1.0);

Multiply image A by Image B in place. Image B can be offset by xo, yo. And the operation may have an opacity o.

void multiply(unsigned char* dest, const unsigned char* src, int opacity, int length, int dest_channels, int src_channels);

Multiply dest by src, where src and dest are an array of unsigned chars in RGBA order. opacity is an integer value from 0-255 that gives the src frame an overall opacity/transparency. length is the number of RGBA pixels to perform this operation on.

overlay

FImage* overlay(FImage *A, FImage *B, int xo=0, int yo=0, float o=1.0);

Overlay image A by Image B in place. Image B can be offset by xo, yo. And the operation may have an opacity o.

void overlay(unsigned char* dest, const unsigned char* src, int opacity, int length, int dest_channels, int src_channels);

Overlay dest by src, where src and dest are an array of unsigned chars in RGBA order. opacity is an integer value from 0-255 that gives the src frame an overall opacity/transparency. length is the number of RGBA pixels to perform this operation on.

rad2deg

inline float rad2deg(float rad);

Radians to degrees.

inline double rad2deg(double rad);

Radians to degrees.

screen

FImage* screen(FImage *A, FImage *B, int xo=0, int yo=0, float o=1.0);

Screen image A by Image B in place. Image B can be offset by xo, yo. And the operation may have an opacity o.

void screen(unsigned char* dest, const unsigned char* src, int opacity, int length, int dest_channels, int src_channels);

Screen dest by src, where src and dest are an array of unsigned chars in RGBA order. opacity is an integer value from 0-255 that gives the src frame an overall opacity/transparency. length is the number of RGBA pixels to perform this operation on.

sign

inline int sign(int x);

Return the sign of a number. 1, 0, or -1.

inline float sign(float x);

Return the sign of a number. 1, 0, or -1.

inline double sign(double x);

Return the sign of a number. 1, 0, or -1.

sqr

inline int sqr(int x);

Square the number.

inline uint sqr(uint x);

Square the number.

inline float sqr(float x);

Square the number.

inline double sqr(double x);

Square the number.

subtract

FImage* subtract(FImage *A, FImage *B, int xo=0, int yo=0, float o=1.0);

Subtract image B from image A in place. Image B can be offset by xo, yo. And the operation may have an opacity o.

void subtract(unsigned char* dest, const unsigned char* src, int opacity, int length, int dest_channels, int src_channels);

Subtract src from dest, where src and dest are an array of unsigned chars in RGBA order. opacity is an integer value from 0-255 that gives the src frame an overall opacity/transparency. length is the number of RGBA pixels to perform this operation on.

swap

inline void swap(int& x, int& y);

Swap two numbers.

inline void swap(uint& x, uint& y);

Swap two numbers.

inline void swap(float& x, float& y);

Swap two numbers.

inline void swap(double& x, double& y);

Swap two numbers.


© 2000 the Flek Development team.
Generated by ScanDoc
Last Updated: Tue May 15 8:50:06 2001