Update RingRayLib - raylib.c - Add Function : void DrawRectanglePro(Rectangle rec, Vector2 origin, float rotation, Color color)
@@ -2104,6 +2104,26 @@ RING_FUNC(ring_DrawRectangleRec)
ring_state_free(((VM *) pPointer)->pRingState,RING_API_GETCPOINTER(2,"Color"));
}
+
+RING_FUNC(ring_DrawRectanglePro)
+{
+ if ( RING_API_PARACOUNT != 4 ) {
+ RING_API_ERROR(RING_API_MISS4PARA);
+ return ;
+ }
+ if ( ! RING_API_ISNUMBER(3) ) {
+ RING_API_ERROR(RING_API_BADPARATYPE);
+ return ;
+ }
+ DrawRectanglePro(* (Rectangle *) RING_API_GETCPOINTER(1,"Rectangle"),* (Vector2 *) RING_API_GETCPOINTER(2,"Vector2"), (float ) RING_API_GETNUMBER(3),* (Color *) RING_API_GETCPOINTER(4,"Color"));
+ if (RING_API_ISCPOINTERNOTASSIGNED(1))
+ ring_state_free(((VM *) pPointer)->pRingState,RING_API_GETCPOINTER(1,"Rectangle"));
+ if (RING_API_ISCPOINTERNOTASSIGNED(2))
+ ring_state_free(((VM *) pPointer)->pRingState,RING_API_GETCPOINTER(2,"Vector2"));
+ if (RING_API_ISCPOINTERNOTASSIGNED(4))
+ ring_state_free(((VM *) pPointer)->pRingState,RING_API_GETCPOINTER(4,"Color"));
+}
+
RING_API void ringlib_init(RingState *pRingState)
{
ring_vm_funcregister("initwindow",ring_InitWindow);
@@ -2247,4 +2267,5 @@ RING_API void ringlib_init(RingState *pRingState)
ring_vm_funcregister("drawrectangle",ring_DrawRectangle);
ring_vm_funcregister("drawrectanglev",ring_DrawRectangleV);
ring_vm_funcregister("drawrectanglerec",ring_DrawRectangleRec);
+ ring_vm_funcregister("drawrectanglepro",ring_DrawRectanglePro);
}
