Update RingRayLib - raylib.c - Add Function : void ImageAlphaCrop(Image *image, float threshold)
@@ -2958,6 +2958,24 @@ RING_FUNC(ring_ImageAlphaClear)
ring_state_free(((VM *) pPointer)->pRingState,RING_API_GETCPOINTER(2,"Color"));
}
+
+RING_FUNC(ring_ImageAlphaCrop)
+{
+ if ( RING_API_PARACOUNT != 2 ) {
+ RING_API_ERROR(RING_API_MISS2PARA);
+ return ;
+ }
+ if ( ! RING_API_ISPOINTER(1) ) {
+ RING_API_ERROR(RING_API_BADPARATYPE);
+ return ;
+ }
+ if ( ! RING_API_ISNUMBER(2) ) {
+ RING_API_ERROR(RING_API_BADPARATYPE);
+ return ;
+ }
+ ImageAlphaCrop((Image *) RING_API_GETCPOINTER(1,"Image"), (float ) RING_API_GETNUMBER(2));
+}
+
RING_API void ringlib_init(RingState *pRingState)
{
ring_vm_funcregister("initwindow",ring_InitWindow);
@@ -3145,4 +3163,5 @@ RING_API void ringlib_init(RingState *pRingState)
ring_vm_funcregister("imageformat",ring_ImageFormat);
ring_vm_funcregister("imagealphamask",ring_ImageAlphaMask);
ring_vm_funcregister("imagealphaclear",ring_ImageAlphaClear);
+ ring_vm_funcregister("imagealphacrop",ring_ImageAlphaCrop);
}
