Update RingRayLib - raylib.c - Add Function : void ImageDrawText(Image *dst, Vector2 position, const char *text, int fontSize, Color color)
@@ -3263,6 +3263,32 @@ RING_FUNC(ring_ImageDrawRectangleLines)
ring_state_free(((VM *) pPointer)->pRingState,RING_API_GETCPOINTER(4,"Color"));
}
+
+RING_FUNC(ring_ImageDrawText)
+{
+ if ( RING_API_PARACOUNT != 5 ) {
+ RING_API_ERROR(RING_API_BADPARACOUNT);
+ return ;
+ }
+ if ( ! RING_API_ISPOINTER(1) ) {
+ RING_API_ERROR(RING_API_BADPARATYPE);
+ return ;
+ }
+ if ( ! RING_API_ISSTRING(3) ) {
+ RING_API_ERROR(RING_API_BADPARATYPE);
+ return ;
+ }
+ if ( ! RING_API_ISNUMBER(4) ) {
+ RING_API_ERROR(RING_API_BADPARATYPE);
+ return ;
+ }
+ ImageDrawText((Image *) RING_API_GETCPOINTER(1,"Image"),* (Vector2 *) RING_API_GETCPOINTER(2,"Vector2"),RING_API_GETSTRING(3), (int ) RING_API_GETNUMBER(4),* (Color *) RING_API_GETCPOINTER(5,"Color"));
+ if (RING_API_ISCPOINTERNOTASSIGNED(2))
+ ring_state_free(((VM *) pPointer)->pRingState,RING_API_GETCPOINTER(2,"Vector2"));
+ if (RING_API_ISCPOINTERNOTASSIGNED(5))
+ ring_state_free(((VM *) pPointer)->pRingState,RING_API_GETCPOINTER(5,"Color"));
+}
+
RING_API void ringlib_init(RingState *pRingState)
{
ring_vm_funcregister("initwindow",ring_InitWindow);
@@ -3464,4 +3490,5 @@ RING_API void ringlib_init(RingState *pRingState)
ring_vm_funcregister("imagedraw",ring_ImageDraw);
ring_vm_funcregister("imagedrawrectangle",ring_ImageDrawRectangle);
ring_vm_funcregister("imagedrawrectanglelines",ring_ImageDrawRectangleLines);
+ ring_vm_funcregister("imagedrawtext",ring_ImageDrawText);
}
