Update RingRayLib - raylib.c - Add Function : void ImageDraw(Image *dst, Image src, Rectangle srcRec, Rectangle dstRec)
@@ -3203,6 +3203,26 @@ RING_FUNC(ring_ImageTextEx)
}
}
+
+RING_FUNC(ring_ImageDraw)
+{
+ if ( RING_API_PARACOUNT != 4 ) {
+ RING_API_ERROR(RING_API_MISS4PARA);
+ return ;
+ }
+ if ( ! RING_API_ISPOINTER(1) ) {
+ RING_API_ERROR(RING_API_BADPARATYPE);
+ return ;
+ }
+ ImageDraw((Image *) RING_API_GETCPOINTER(1,"Image"),* (Image *) RING_API_GETCPOINTER(2,"Image"),* (Rectangle *) RING_API_GETCPOINTER(3,"Rectangle"),* (Rectangle *) RING_API_GETCPOINTER(4,"Rectangle"));
+ if (RING_API_ISCPOINTERNOTASSIGNED(2))
+ ring_state_free(((VM *) pPointer)->pRingState,RING_API_GETCPOINTER(2,"Image"));
+ if (RING_API_ISCPOINTERNOTASSIGNED(3))
+ ring_state_free(((VM *) pPointer)->pRingState,RING_API_GETCPOINTER(3,"Rectangle"));
+ if (RING_API_ISCPOINTERNOTASSIGNED(4))
+ ring_state_free(((VM *) pPointer)->pRingState,RING_API_GETCPOINTER(4,"Rectangle"));
+}
+
RING_API void ringlib_init(RingState *pRingState)
{
ring_vm_funcregister("initwindow",ring_InitWindow);
@@ -3401,4 +3421,5 @@ RING_API void ringlib_init(RingState *pRingState)
ring_vm_funcregister("imageextractpalette",ring_ImageExtractPalette);
ring_vm_funcregister("imagetext",ring_ImageText);
ring_vm_funcregister("imagetextex",ring_ImageTextEx);
+ ring_vm_funcregister("imagedraw",ring_ImageDraw);
}
