These are a few examples of pntr in use.
void pntr_examples_alphamask() {
}
#define PNTR_BLUE
Definition: pntr.h:824
#define PNTR_DARKGREEN
Definition: pntr.h:812
#define PNTR_WHITE
Definition: pntr.h:872
#define PNTR_PURPLE
Definition: pntr.h:836
#define PNTR_RED
Definition: pntr.h:788
PNTR_API void pntr_unload_image(pntr_image *image)
Definition: pntr.h:1744
PNTR_API pntr_image * pntr_gen_image_gradient(int width, int height, pntr_color topLeft, pntr_color topRight, pntr_color bottomLeft, pntr_color bottomRight)
Definition: pntr.h:5197
PNTR_API pntr_image * pntr_gen_image_text(pntr_font *font, const char *text, pntr_color tint)
Definition: pntr.h:3836
PNTR_API bool pntr_save_image(pntr_image *image, const char *fileName)
Definition: pntr.h:4426
PNTR_API pntr_font * pntr_load_font_ttf(const char *fileName, int fontSize)
Definition: pntr.h:3938
PNTR_API void pntr_image_alpha_mask(pntr_image *image, pntr_image *alphaMask, int posX, int posY)
Definition: pntr.h:4661
PNTR_API pntr_vector pntr_measure_text_ex(pntr_font *font, const char *text, int textLength)
Definition: pntr.h:3774
PNTR_API void pntr_unload_font(pntr_font *font)
Definition: pntr.h:3530
int x
Definition: pntr.h:449
int y
Definition: pntr.h:454
void pntr_examples_fonts() {
pntr_font* bmFont =
pntr_load_font_bmf(
"resources/bmfont.png",
" abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.,!?-+/");
"\x7f !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~");
const char* text = "*** TTY Font Example ***";
const char* ttfText = "TTF Font Example";
}
#define PNTR_RAYWHITE
Definition: pntr.h:909
#define PNTR_DARKPURPLE
Definition: pntr.h:848
#define PNTR_BLACK
Definition: pntr.h:891
PNTR_API pntr_image * pntr_gen_image_color(int width, int height, pntr_color color)
Definition: pntr.h:1549
PNTR_API pntr_color pntr_get_color(unsigned int hexValue)
Definition: pntr.h:1832
PNTR_API void pntr_draw_text(pntr_image *dst, pntr_font *font, const char *text, int posX, int posY, pntr_color color)
Definition: pntr.h:3626
PNTR_API int pntr_measure_text(pntr_font *font, const char *text)
Definition: pntr.h:3761
PNTR_API void pntr_draw_image(pntr_image *dst, pntr_image *src, int posX, int posY)
Definition: pntr.h:2780
PNTR_API void pntr_draw_rectangle_fill(pntr_image *dst, int posX, int posY, int width, int height, pntr_color color)
Definition: pntr.h:2155
PNTR_API void pntr_draw_text_wrapped(pntr_image *dst, pntr_font *font, const char *text, int posX, int posY, int maxWidth, pntr_color tint)
Definition: pntr.h:3681
PNTR_API pntr_font * pntr_load_font_tty(const char *fileName, int glyphWidth, int glyphHeight, const char *characters)
Definition: pntr.h:3450
PNTR_API pntr_font * pntr_load_font_bmf(const char *fileName, const char *characters)
Definition: pntr.h:3314
PNTR_API pntr_font * pntr_load_font_default(void)
Definition: pntr.h:3869
PNTR_API void pntr_draw_rectangle(pntr_image *dst, int posX, int posY, int width, int height, pntr_color color)
Definition: pntr.h:2122
PNTR_API pntr_font * pntr_font_scale(pntr_font *font, float scaleX, float scaleY, pntr_filter filter)
Definition: pntr.h:3583
@ PNTR_FILTER_NEARESTNEIGHBOR
Definition: pntr.h:523
pntr_image * atlas
Definition: pntr.h:471
int width
Definition: pntr.h:413
void pntr_examples_image() {
pntr_draw_image_flipped(canvas, image, 240, 30, true, false, true);
}
PNTR_API pntr_image * pntr_load_image(const char *fileName)
Definition: pntr.h:2746
PNTR_API void pntr_draw_image_rec(pntr_image *dst, pntr_image *src, pntr_rectangle srcRect, int posX, int posY)
Definition: pntr.h:2815
PNTR_API pntr_image * pntr_image_resize(pntr_image *image, int newWidth, int newHeight, pntr_filter filter)
Definition: pntr.h:2980
int height
Definition: pntr.h:418
int x
Definition: pntr.h:380
int height
Definition: pntr.h:395
int y
Definition: pntr.h:385
int width
Definition: pntr.h:390
void pntr_examples_rotate() {
}
PNTR_API void pntr_draw_image_rotated(pntr_image *dst, pntr_image *src, int posX, int posY, float degrees, float offsetX, float offsetY, pntr_filter filter)
Definition: pntr.h:5006
void pntr_examples_shapes() {
pntr_draw_rectangle_thick(canvas, 10, 120, 50, 50, 5,
PNTR_RED);
pntr_draw_rectangle_thick(canvas, 20, 130, 50, 50, 5,
PNTR_GREEN);
pntr_draw_rectangle_thick(canvas, 30, 140, 50, 50, 5,
PNTR_BLUE);
250, 50,
300, 80,
pntr_draw_polygon_fill(canvas, points, 4,
PNTR_BLUE);
int radius = 40;
pntr_draw_arc_fill(canvas, 300, 120, radius, 90.0f, 180.0f, radius * 1.5f,
PNTR_ORANGE);
pntr_draw_arc(canvas, 300, 120, radius, 90.0f, 180.0f, radius *1.5f,
PNTR_RED);
}
#define PNTR_GREEN
Definition: pntr.h:800
#define PNTR_ORANGE
Definition: pntr.h:776
PNTR_API void pntr_draw_circle(pntr_image *dst, int centerX, int centerY, int radius, pntr_color color)
Definition: pntr.h:2241
PNTR_API void pntr_draw_triangle_fill(pntr_image *dst, int x1, int y1, int x2, int y2, int x3, int y3, pntr_color color)
Definition: pntr.h:2456
PNTR_API void pntr_draw_line(pntr_image *dst, int startPosX, int startPosY, int endPosX, int endPosY, pntr_color color)
Definition: pntr.h:1919
PNTR_API void pntr_draw_ellipse_fill(pntr_image *dst, int centerX, int centerY, int radiusX, int radiusY, pntr_color color)
Definition: pntr.h:2377
PNTR_API void pntr_draw_circle_fill(pntr_image *dst, int centerX, int centerY, int radius, pntr_color color)
Definition: pntr.h:2289
PNTR_API void pntr_draw_ellipse(pntr_image *dst, int centerX, int centerY, int radiusX, int radiusY, pntr_color color)
Definition: pntr.h:2327
unsigned char a
Definition: pntr.h:348