Update RingRayLib - raylib.c - Add Function : Image GenImageGradientV(int width, int height, Color top, Color bottom)
@@ -3500,6 +3500,33 @@ RING_FUNC(ring_GenImageColor)
}
}
+
+RING_FUNC(ring_GenImageGradientV)
+{
+ if ( RING_API_PARACOUNT != 4 ) {
+ RING_API_ERROR(RING_API_MISS4PARA);
+ 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 = GenImageGradientV( (int ) RING_API_GETNUMBER(1), (int ) RING_API_GETNUMBER(2),* (Color *) RING_API_GETCPOINTER(3,"Color"),* (Color *) RING_API_GETCPOINTER(4,"Color"));
+ if (RING_API_ISCPOINTERNOTASSIGNED(3))
+ ring_state_free(((VM *) pPointer)->pRingState,RING_API_GETCPOINTER(3,"Color"));
+ if (RING_API_ISCPOINTERNOTASSIGNED(4))
+ ring_state_free(((VM *) pPointer)->pRingState,RING_API_GETCPOINTER(4,"Color"));
+ RING_API_RETMANAGEDCPOINTER(pValue,"Image",ring_state_free);
+ }
+}
+
RING_API void ringlib_init(RingState *pRingState)
{
ring_vm_funcregister("initwindow",ring_InitWindow);
@@ -3714,4 +3741,5 @@ RING_API void ringlib_init(RingState *pRingState)
ring_vm_funcregister("imagecolorbrightness",ring_ImageColorBrightness);
ring_vm_funcregister("imagecolorreplace",ring_ImageColorReplace);
ring_vm_funcregister("genimagecolor",ring_GenImageColor);
+ ring_vm_funcregister("genimagegradientv",ring_GenImageGradientV);
}
