merged
This commit is contained in:
commit
788147b8f2
16 changed files with 171 additions and 56 deletions
|
|
@ -62,6 +62,21 @@ void ARC_Renderer_InitBuffer(ARC_Renderer *renderer, uint32_t zIndex);
|
|||
*/
|
||||
void ARC_Renderer_RemoveBuffer(ARC_Renderer *renderer, uint32_t zIndex);
|
||||
|
||||
/**
|
||||
* @brief
|
||||
*
|
||||
* @param renderer
|
||||
* @param zIndex
|
||||
*/
|
||||
void ARC_Renderer_RenderBuffer(ARC_Renderer *renderer, uint32_t zIndex);
|
||||
|
||||
/**
|
||||
* @brief
|
||||
*
|
||||
* @param renderer
|
||||
*/
|
||||
void ARC_Renderer_RenderBuffers(ARC_Renderer *renderer);
|
||||
|
||||
/**
|
||||
* @brief
|
||||
*
|
||||
|
|
|
|||
|
|
@ -9,22 +9,47 @@ extern "C" {
|
|||
#include "arc/graphics/color.h"
|
||||
#include "arc/graphics/renderer.h"
|
||||
#include "arc/math/point.h"
|
||||
#include "arc/math/rectangle.h"
|
||||
#include "arc/std/string.h"
|
||||
|
||||
typedef struct ARC_Text ARC_Text;
|
||||
typedef struct ARC_Text {
|
||||
ARC_String *name;
|
||||
|
||||
int32_t fontSize;
|
||||
ARC_FRect bounds;
|
||||
|
||||
ARC_Color color;
|
||||
|
||||
void *backendData;
|
||||
} ARC_Text;
|
||||
|
||||
/**
|
||||
* @brief
|
||||
*/
|
||||
void ARC_Text_Create(ARC_Text **text, ARC_String *path, int32_t size, ARC_Color color);
|
||||
|
||||
void ARC_Text_Destroy(ARC_Text *font);
|
||||
/**
|
||||
* @brief
|
||||
*/
|
||||
void ARC_Text_Destroy(ARC_Text *text);
|
||||
|
||||
/**
|
||||
* @brief
|
||||
*/
|
||||
void ARC_Text_SetString(ARC_Text *text, ARC_Renderer *renderer, ARC_String *string);
|
||||
|
||||
/**
|
||||
* @brief
|
||||
*/
|
||||
void ARC_Text_Render(ARC_Text *text, ARC_Renderer *renderer);
|
||||
|
||||
/**
|
||||
* @brief
|
||||
*/
|
||||
void ARC_Text_SetPos(ARC_Text *text, ARC_Point pos);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif //ARC_STD_STRING_H_
|
||||
#endif //ARC_STD_STRING_H_
|
||||
|
|
|
|||
|
|
@ -25,6 +25,8 @@ typedef struct ARC_DCircle {
|
|||
double r;
|
||||
} ARC_DCircle;
|
||||
|
||||
void TEMP_Circle_Placeholder(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -27,8 +27,27 @@ typedef struct ARC_DPoint {
|
|||
double y;
|
||||
} ARC_DPoint;
|
||||
|
||||
typedef struct ARC_Rect ARC_Rect;
|
||||
typedef struct ARC_FRect ARC_FRect;
|
||||
|
||||
ARC_FPoint ARC_FPoint_Lerp(ARC_FPoint *start, ARC_FPoint *end, float t);
|
||||
|
||||
/**
|
||||
* @brief centers point on given bounds
|
||||
*
|
||||
* @param point ARC_Point to be centered
|
||||
* @param bounds ARC_Rect area to center point on
|
||||
*/
|
||||
void ARC_Point_CenterOn(ARC_Point *point, ARC_Rect bounds);
|
||||
|
||||
/**
|
||||
* @brief centers fpoint on given bounds
|
||||
*
|
||||
* @param point ARC_FPoint to be centered
|
||||
* @param bounds ARC_FRect area to center point on
|
||||
*/
|
||||
void ARC_FPoint_CenterOn(ARC_FPoint *point, ARC_FRect bounds);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -47,6 +47,22 @@ void ARC_Rect_CenterOn(ARC_Rect *rect, ARC_Rect bounds);
|
|||
*/
|
||||
void ARC_FRect_CenterOn(ARC_FRect *rect, ARC_FRect bounds);
|
||||
|
||||
/**
|
||||
* @brief centers rect on a given point
|
||||
*
|
||||
* @param rect ARC_Rect to be centered
|
||||
* @param bounds ARC_Point point to center rect on
|
||||
*/
|
||||
void ARC_Rect_CenterOnPoint(ARC_Rect *rect, ARC_Point center);
|
||||
|
||||
/**
|
||||
* @brief centers rect on a given point
|
||||
*
|
||||
* @param rect ARC_FRect to be centered
|
||||
* @param bounds ARC_FPoint point to center rect on
|
||||
*/
|
||||
void ARC_FRect_CenterOnPoint(ARC_FRect *rect, ARC_FPoint center);
|
||||
|
||||
/**
|
||||
* @brief casts Rect to FRect
|
||||
*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue