MeshLib C Docs
Loading...
Searching...
No Matches
MRColor.h File Reference
#include <MRCMesh/MRVector4.h>
#include <MRCMisc/exports.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>

Go to the source code of this file.

Classes

struct  MR_Color
 Generated from class MR::Color. More...
 

Typedefs

typedef struct MR_NoInit MR_NoInit
 
typedef struct MR_Color MR_Color
 Generated from class MR::Color.
 

Functions

MRC_API MR_Color MR_Color_DefaultConstruct (void)
 Constructs an empty (default-constructed) instance.
 
MRC_API MR_ColorMR_Color_DefaultConstructArray (size_t num_elems)
 
MRC_API MR_Color MR_Color_Construct_1 (const MR_NoInit *_1)
 
MRC_API MR_Color MR_Color_Construct_4_int32_t (int32_t r, int32_t g, int32_t b, int32_t a)
 Generated from a constructor of class MR::Color.
 
MRC_API MR_Color MR_Color_Construct_3_int32_t (int32_t r, int32_t g, int32_t b)
 Generated from a constructor of class MR::Color.
 
MRC_API MR_Color MR_Color_Construct_4_float (float r, float g, float b, float a)
 Generated from a constructor of class MR::Color.
 
MRC_API MR_Color MR_Color_Construct_3_float (float r, float g, float b)
 Generated from a constructor of class MR::Color.
 
MRC_API MR_Color MR_Color_Construct_int32_t (const MR_Vector4i *vec)
 
MRC_API MR_Color MR_Color_Construct_float (const MR_Vector4f *vec)
 
MRC_API MR_Vector4i MR_Color_ConvertTo_MR_Vector4i (const MR_Color *_this)
 
MRC_API MR_Vector4f MR_Color_ConvertTo_MR_Vector4f (const MR_Color *_this)
 
MRC_API uint32_t MR_Color_getUInt32 (const MR_Color *_this)
 
MRC_API MR_Color MR_Color_white (void)
 Generated from a method of class MR::Color named white.
 
MRC_API MR_Color MR_Color_black (void)
 Generated from a method of class MR::Color named black.
 
MRC_API MR_Color MR_Color_gray (void)
 Generated from a method of class MR::Color named gray.
 
MRC_API MR_Color MR_Color_red (void)
 Generated from a method of class MR::Color named red.
 
MRC_API MR_Color MR_Color_green (void)
 Generated from a method of class MR::Color named green.
 
MRC_API MR_Color MR_Color_blue (void)
 Generated from a method of class MR::Color named blue.
 
MRC_API MR_Color MR_Color_yellow (void)
 Generated from a method of class MR::Color named yellow.
 
MRC_API MR_Color MR_Color_brown (void)
 Generated from a method of class MR::Color named brown.
 
MRC_API MR_Color MR_Color_purple (void)
 Generated from a method of class MR::Color named purple.
 
MRC_API MR_Color MR_Color_transparent (void)
 Generated from a method of class MR::Color named transparent.
 
MRC_API uint8_t MR_Color_valToUint8_int32_t (int32_t val)
 Generated from a method of class MR::Color named valToUint8<int32_t>.
 
MRC_API uint8_t MR_Color_valToUint8_float (float val)
 Generated from a method of class MR::Color named valToUint8<float>.
 
MRC_API const uint8_t * MR_Color_index_const (const MR_Color *_this, int32_t e)
 
MRC_API uint8_t * MR_Color_index (MR_Color *_this, int32_t e)
 
MRC_API MR_ColorMR_Color_add_assign (MR_Color *_this, const MR_Color *other)
 
MRC_API MR_ColorMR_Color_sub_assign (MR_Color *_this, const MR_Color *other)
 
MRC_API MR_ColorMR_Color_mul_assign (MR_Color *_this, float m)
 
MRC_API MR_ColorMR_Color_div_assign (MR_Color *_this, float m)
 
MRC_API MR_Color MR_Color_scaledAlpha (const MR_Color *_this, float m)
 
MRC_API bool MR_equal_MR_Color (const MR_Color *a, const MR_Color *b)
 
MRC_API bool MR_not_equal_MR_Color (const MR_Color *a, const MR_Color *b)
 
MRC_API MR_Color MR_add_MR_Color (const MR_Color *a, const MR_Color *b)
 
MRC_API MR_Color MR_sub_MR_Color (const MR_Color *a, const MR_Color *b)
 
MRC_API MR_Color MR_mul_float_MR_Color (float a, const MR_Color *b)
 
MRC_API MR_Color MR_mul_MR_Color_float (const MR_Color *b, float a)
 
MRC_API MR_Color MR_div_MR_Color_float (const MR_Color *b, float a)
 
MRC_API MR_Color MR_blend (const MR_Color *front, const MR_Color *back)
 

Typedef Documentation

◆ MR_Color

typedef struct MR_Color MR_Color

Generated from class MR::Color.

◆ MR_NoInit

typedef struct MR_NoInit MR_NoInit

Function Documentation

◆ MR_add_MR_Color()

MRC_API MR_Color MR_add_MR_Color ( const MR_Color * a,
const MR_Color * b )

Generated from function MR::operator+. Parameter a can not be null. It is a single object. Parameter b can not be null. It is a single object.

◆ MR_blend()

MRC_API MR_Color MR_blend ( const MR_Color * front,
const MR_Color * back )

Blend two colors together

Note
This operation is not commutative Generated from function MR::blend. Parameter front can not be null. It is a single object. Parameter back can not be null. It is a single object.

◆ MR_Color_add_assign()

MRC_API MR_Color * MR_Color_add_assign ( MR_Color * _this,
const MR_Color * other )

Generated from a method of class MR::Color named operator+=. Parameter _this can not be null. It is a single object. Parameter other can not be null. It is a single object. The returned pointer will never be null. It is non-owning, do NOT destroy it.

◆ MR_Color_black()

MRC_API MR_Color MR_Color_black ( void )

Generated from a method of class MR::Color named black.

◆ MR_Color_blue()

MRC_API MR_Color MR_Color_blue ( void )

Generated from a method of class MR::Color named blue.

◆ MR_Color_brown()

MRC_API MR_Color MR_Color_brown ( void )

Generated from a method of class MR::Color named brown.

◆ MR_Color_Construct_1()

MRC_API MR_Color MR_Color_Construct_1 ( const MR_NoInit * _1)

Generated from a constructor of class MR::Color. Parameter _1 can not be null. It is a single object.

◆ MR_Color_Construct_3_float()

MRC_API MR_Color MR_Color_Construct_3_float ( float r,
float g,
float b )

Generated from a constructor of class MR::Color.

◆ MR_Color_Construct_3_int32_t()

MRC_API MR_Color MR_Color_Construct_3_int32_t ( int32_t r,
int32_t g,
int32_t b )

Generated from a constructor of class MR::Color.

◆ MR_Color_Construct_4_float()

MRC_API MR_Color MR_Color_Construct_4_float ( float r,
float g,
float b,
float a )

Generated from a constructor of class MR::Color.

◆ MR_Color_Construct_4_int32_t()

MRC_API MR_Color MR_Color_Construct_4_int32_t ( int32_t r,
int32_t g,
int32_t b,
int32_t a )

Generated from a constructor of class MR::Color.

◆ MR_Color_Construct_float()

MRC_API MR_Color MR_Color_Construct_float ( const MR_Vector4f * vec)

Generated from a constructor of class MR::Color. Parameter vec can not be null. It is a single object.

◆ MR_Color_Construct_int32_t()

MRC_API MR_Color MR_Color_Construct_int32_t ( const MR_Vector4i * vec)

Generated from a constructor of class MR::Color. Parameter vec can not be null. It is a single object.

◆ MR_Color_ConvertTo_MR_Vector4f()

MRC_API MR_Vector4f MR_Color_ConvertTo_MR_Vector4f ( const MR_Color * _this)

Generated from a conversion operator of class MR::Color to type MR::Vector4f. Parameter _this can not be null. It is a single object.

◆ MR_Color_ConvertTo_MR_Vector4i()

MRC_API MR_Vector4i MR_Color_ConvertTo_MR_Vector4i ( const MR_Color * _this)

Generated from a conversion operator of class MR::Color to type MR::Vector4i. Parameter _this can not be null. It is a single object.

◆ MR_Color_DefaultConstruct()

MRC_API MR_Color MR_Color_DefaultConstruct ( void )

Constructs an empty (default-constructed) instance.

◆ MR_Color_DefaultConstructArray()

MRC_API MR_Color * MR_Color_DefaultConstructArray ( size_t num_elems)

Constructs an array of empty (default-constructed) instances, of the specified size. Will never return null. The array must be destroyed using MR_Color_DestroyArray(). Use MR_Color_OffsetMutablePtr() and MR_Color_OffsetPtr() to access the array elements.

◆ MR_Color_div_assign()

MRC_API MR_Color * MR_Color_div_assign ( MR_Color * _this,
float m )

Generated from a method of class MR::Color named operator/=. Parameter _this can not be null. It is a single object. The returned pointer will never be null. It is non-owning, do NOT destroy it.

◆ MR_Color_getUInt32()

MRC_API uint32_t MR_Color_getUInt32 ( const MR_Color * _this)

Generated from a method of class MR::Color named getUInt32. Parameter _this can not be null. It is a single object.

◆ MR_Color_gray()

MRC_API MR_Color MR_Color_gray ( void )

Generated from a method of class MR::Color named gray.

◆ MR_Color_green()

MRC_API MR_Color MR_Color_green ( void )

Generated from a method of class MR::Color named green.

◆ MR_Color_index()

MRC_API uint8_t * MR_Color_index ( MR_Color * _this,
int32_t e )

Generated from a method of class MR::Color named operator[]. Parameter _this can not be null. It is a single object. The returned pointer will never be null. It is non-owning, do NOT destroy it.

◆ MR_Color_index_const()

MRC_API const uint8_t * MR_Color_index_const ( const MR_Color * _this,
int32_t e )

Generated from a method of class MR::Color named operator[]. Parameter _this can not be null. It is a single object. The returned pointer will never be null. It is non-owning, do NOT destroy it.

◆ MR_Color_mul_assign()

MRC_API MR_Color * MR_Color_mul_assign ( MR_Color * _this,
float m )

Generated from a method of class MR::Color named operator*=. Parameter _this can not be null. It is a single object. The returned pointer will never be null. It is non-owning, do NOT destroy it.

◆ MR_Color_purple()

MRC_API MR_Color MR_Color_purple ( void )

Generated from a method of class MR::Color named purple.

◆ MR_Color_red()

MRC_API MR_Color MR_Color_red ( void )

Generated from a method of class MR::Color named red.

◆ MR_Color_scaledAlpha()

MRC_API MR_Color MR_Color_scaledAlpha ( const MR_Color * _this,
float m )

Generated from a method of class MR::Color named scaledAlpha. Parameter _this can not be null. It is a single object.

◆ MR_Color_sub_assign()

MRC_API MR_Color * MR_Color_sub_assign ( MR_Color * _this,
const MR_Color * other )

Generated from a method of class MR::Color named operator-=. Parameter _this can not be null. It is a single object. Parameter other can not be null. It is a single object. The returned pointer will never be null. It is non-owning, do NOT destroy it.

◆ MR_Color_transparent()

MRC_API MR_Color MR_Color_transparent ( void )

Generated from a method of class MR::Color named transparent.

◆ MR_Color_valToUint8_float()

MRC_API uint8_t MR_Color_valToUint8_float ( float val)

Generated from a method of class MR::Color named valToUint8<float>.

◆ MR_Color_valToUint8_int32_t()

MRC_API uint8_t MR_Color_valToUint8_int32_t ( int32_t val)

Generated from a method of class MR::Color named valToUint8<int32_t>.

◆ MR_Color_white()

MRC_API MR_Color MR_Color_white ( void )

Generated from a method of class MR::Color named white.

◆ MR_Color_yellow()

MRC_API MR_Color MR_Color_yellow ( void )

Generated from a method of class MR::Color named yellow.

◆ MR_div_MR_Color_float()

MRC_API MR_Color MR_div_MR_Color_float ( const MR_Color * b,
float a )

Generated from function MR::operator/. Parameter b can not be null. It is a single object.

◆ MR_equal_MR_Color()

MRC_API bool MR_equal_MR_Color ( const MR_Color * a,
const MR_Color * b )

Generated from function MR::operator==. Parameter a can not be null. It is a single object. Parameter b can not be null. It is a single object.

◆ MR_mul_float_MR_Color()

MRC_API MR_Color MR_mul_float_MR_Color ( float a,
const MR_Color * b )

Generated from function MR::operator*. Parameter b can not be null. It is a single object.

◆ MR_mul_MR_Color_float()

MRC_API MR_Color MR_mul_MR_Color_float ( const MR_Color * b,
float a )

Generated from function MR::operator*. Parameter b can not be null. It is a single object.

◆ MR_not_equal_MR_Color()

MRC_API bool MR_not_equal_MR_Color ( const MR_Color * a,
const MR_Color * b )

Generated from function MR::operator!=. Parameter a can not be null. It is a single object. Parameter b can not be null. It is a single object.

◆ MR_sub_MR_Color()

MRC_API MR_Color MR_sub_MR_Color ( const MR_Color * a,
const MR_Color * b )

Generated from function MR::operator-. Parameter a can not be null. It is a single object. Parameter b can not be null. It is a single object.