Update RingRayLib - raylib.c - Add Function : Image GenImageGradientRadial(int width, int height, float density, Color inner, Color outer)
@@ -3554,6 +3554,37 @@ RING_FUNC(ring_GenImageGradientH)
}
}
+
+RING_FUNC(ring_GenImageGradientRadial)
+{
+ if ( RING_API_PARACOUNT != 5 ) {
+ RING_API_ERROR(RING_API_BADPARACOUNT);
+ 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 ;
+ }
+ if ( ! RING_API_ISNUMBER(3) ) {
+ RING_API_ERROR(RING_API_BADPARATYPE);
+ return ;
+ }
+ {
+ Image *pValue ;
+ pValue = (Image *) ring_state_malloc(((VM *) pPointer)->pRingState,sizeof(Image)) ;
+ *pValue = GenImageGradientRadial( (int ) RING_API_GETNUMBER(1), (int ) RING_API_GETNUMBER(2), (float ) RING_API_GETNUMBER(3),* (Color *) RING_API_GETCPOINTER(4,"Color"),* (Color *) RING_API_GETCPOINTER(5,"Color"));
+ if (RING_API_ISCPOINTERNOTASSIGNED(4))
+ ring_state_free(((VM *) pPointer)->pRingState,RING_API_GETCPOINTER(4,"Color"));
+ if (RING_API_ISCPOINTERNOTASSIGNED(5))
+ ring_state_free(((VM *) pPointer)->pRingState,RING_API_GETCPOINTER(5,"Color"));
+ RING_API_RETMANAGEDCPOINTER(pValue,"Image",ring_state_free);
+ }
+}
+
RING_API void ringlib_init(RingState *pRingState)
{
ring_vm_funcregister("initwindow",ring_InitWindow);
@@ -3770,4 +3801,5 @@ RING_API void ringlib_init(RingState *pRingState)
ring_vm_funcregister("genimagecolor",ring_GenImageColor);
ring_vm_funcregister("genimagegradientv",ring_GenImageGradientV);
ring_vm_funcregister("genimagegradienth",ring_GenImageGradientH);
+ ring_vm_funcregister("genimagegradientradial",ring_GenImageGradientRadial);
}
