Update RingRayLib - raylib.c - Add Function : Image GenImageColor(int width, int height, Color color)
@@ -3475,6 +3475,31 @@ RING_FUNC(ring_ImageColorReplace)
ring_state_free(((VM *) pPointer)->pRingState,RING_API_GETCPOINTER(3,"Color"));
}
+
+RING_FUNC(ring_GenImageColor)
+{
+ if ( RING_API_PARACOUNT != 3 ) {
+ RING_API_ERROR(RING_API_MISS3PARA);
+ return ;
+ }
+ if ( ! RING_API_ISNUMBER(1) ) {
+ RING_API_ERROR(RING_API_BADPARATYPE);
+ return ;
+ }
+ if ( ! RING_API_ISNUMBER(2) ) {
+ RING_API_ERROR(RING_API_BADPARATYPE);
+ return ;
+ }
+ {
+ Image *pValue ;
+ pValue = (Image *) ring_state_malloc(((VM *) pPointer)->pRingState,sizeof(Image)) ;
+ *pValue = GenImageColor( (int ) RING_API_GETNUMBER(1), (int ) RING_API_GETNUMBER(2),* (Color *) RING_API_GETCPOINTER(3,"Color"));
+ if (RING_API_ISCPOINTERNOTASSIGNED(3))
+ ring_state_free(((VM *) pPointer)->pRingState,RING_API_GETCPOINTER(3,"Color"));
+ RING_API_RETMANAGEDCPOINTER(pValue,"Image",ring_state_free);
+ }
+}
+
RING_API void ringlib_init(RingState *pRingState)
{
ring_vm_funcregister("initwindow",ring_InitWindow);
@@ -3688,4 +3713,5 @@ RING_API void ringlib_init(RingState *pRingState)
ring_vm_funcregister("imagecolorcontrast",ring_ImageColorContrast);
ring_vm_funcregister("imagecolorbrightness",ring_ImageColorBrightness);
ring_vm_funcregister("imagecolorreplace",ring_ImageColorReplace);
+ ring_vm_funcregister("genimagecolor",ring_GenImageColor);
}
