pntr
Image manipulation library
Configuration

Macros

#define PNTR_IMPLEMENTATION
 
#define PNTR_PIXELFORMAT_RGBA
 
#define PNTR_PIXELFORMAT_ARGB
 
#define PNTR_ENABLE_DEFAULT_FONT
 
#define PNTR_ENABLE_TTF
 
#define PNTR_ENABLE_UTF8
 
#define PNTR_SAVE_IMAGE_TO_MEMORY
 
#define PNTR_LOAD_IMAGE_FROM_MEMORY
 
#define PNTR_ENABLE_MATH
 
#define PNTR_LOAD_FILE
 
#define PNTR_SAVE_FILE
 
#define PNTR_STB_IMAGE
 
#define PNTR_CUTE_PNG
 
#define PNTR_NO_ALPHABLEND
 
#define PNTR_NO_STDIO
 
#define PNTR_NO_LOAD_IMAGE
 
#define PNTR_NO_SAVE_IMAGE
 
#define PNTR_NO_CUTE_PNG_IMPLEMENTATION
 
#define PNTR_NO_STB_IMAGE_WRITE_IMPLEMENTATION
 
#define PNTR_NO_STB_IMAGE_IMPLEMENTATION
 
#define PNTR_NO_STB_TRUETYPE_IMPLEMENTATION
 
#define PNTR_NO_STB_TRUETYPE_IMPLEMENTATION
 

Detailed Description

Macro Definition Documentation

◆ PNTR_CUTE_PNG

#define PNTR_CUTE_PNG

When defined, will use cute_png.h for loading and saving.

While cute_png takes up less memory than stb_image, it doesn't support as many of the features.

See also
pntr_load_image()
pntr_save_image()
PNTR_STB_IMAGE
PNTR_SAVE_IMAGE_TO_MEMORY
PNTR_LOAD_IMAGE_FROM_MEMORY

◆ PNTR_ENABLE_DEFAULT_FONT

#define PNTR_ENABLE_DEFAULT_FONT

Enables support for pntr's default font. It's a small 8x8 font.

See also
pntr_load_font_default()

◆ PNTR_ENABLE_MATH

#define PNTR_ENABLE_MATH

When enabled, will use C's standard math.h library for math functions, rather than pntr's internally build in methods.

◆ PNTR_ENABLE_TTF

#define PNTR_ENABLE_TTF

Enables support for loading TrueType fonts with stb_truetype.h.

See also
pntr_load_font_ttf()
https://github.com/nothings/stb/blob/master/stb_truetype.h

◆ PNTR_ENABLE_UTF8

#define PNTR_ENABLE_UTF8

Enable UTF-8 character set support for font loading, and text rendering, with utf8.h.

Note
When this is enabled, there is an increase in font memory usage.
See also
https://github.com/sheredom/utf8.h

◆ PNTR_IMPLEMENTATION

#define PNTR_IMPLEMENTATION

Define PNTR_IMPLEMENTATION in one of your .c files before including pntr.h.

This will let pntr.h know where to implement its functions.

#define PNTR_IMPLEMENTATION
#include "pntr.h"
int main() {
return 0;
}

◆ PNTR_LOAD_FILE

#define PNTR_LOAD_FILE

Callback to use when loading a file. Must match the pntr_load_file() definition.

See also
pntr_load_file()
PNTR_NO_STDIO

◆ PNTR_LOAD_IMAGE_FROM_MEMORY

#define PNTR_LOAD_IMAGE_FROM_MEMORY

◆ PNTR_NO_ALPHABLEND

#define PNTR_NO_ALPHABLEND

Skips alpha blending when rendering images. Defining this will improve performance.

See also
pntr_color_alpha_blend()

◆ PNTR_NO_CUTE_PNG_IMPLEMENTATION

#define PNTR_NO_CUTE_PNG_IMPLEMENTATION

Skips defining CUTE_PNG_IMPLEMENTATION. Useful if you're using cute_png elsewhere.

◆ PNTR_NO_LOAD_IMAGE

#define PNTR_NO_LOAD_IMAGE

Will disable image loading.

See also
PNTR_LOAD_IMAGE_FROM_MEMORY

◆ PNTR_NO_SAVE_IMAGE

#define PNTR_NO_SAVE_IMAGE

Will disable image saving.

See also
PNTR_SAVE_IMAGE_TO_MEMORY

◆ PNTR_NO_STB_IMAGE_IMPLEMENTATION

#define PNTR_NO_STB_IMAGE_IMPLEMENTATION

Skips defining STB_IMAGE_IMPLEMENTATION. Useful if you're using stb_image elsewhere.

◆ PNTR_NO_STB_IMAGE_WRITE_IMPLEMENTATION

#define PNTR_NO_STB_IMAGE_WRITE_IMPLEMENTATION

Skips defining STB_IMAGE_WRITE_IMPLEMENTATION. Useful if you're using stb_image_write elsewhere.

◆ PNTR_NO_STB_TRUETYPE_IMPLEMENTATION [1/2]

#define PNTR_NO_STB_TRUETYPE_IMPLEMENTATION

Skips defining STB_TRUETYPE_IMPLEMENTATION. Useful if you're using stb_truetype elsewhere.

◆ PNTR_NO_STB_TRUETYPE_IMPLEMENTATION [2/2]

#define PNTR_NO_STB_TRUETYPE_IMPLEMENTATION

Skips defining STB_TRUETYPE_IMPLEMENTATION. Useful if you're using stb_truetype elsewhere.

◆ PNTR_NO_STDIO

#define PNTR_NO_STDIO

Will disable the default use of stdio.h for file saving/loading with PNTR_LOAD_FILE and PNTR_SAVE_FILE.

See also
PNTR_LOAD_FILE
PNTR_SAVE_FILE

◆ PNTR_PIXELFORMAT_ARGB

#define PNTR_PIXELFORMAT_ARGB

When defined, will use the ARGB pixel format.

See also
PNTR_PIXELFORMAT_ARGB8888

◆ PNTR_PIXELFORMAT_RGBA

#define PNTR_PIXELFORMAT_RGBA

When defined, will use the RGBA format.

See also
PNTR_PIXELFORMAT_RGBA8888

◆ PNTR_SAVE_FILE

#define PNTR_SAVE_FILE

Callback to use when saving a file. Must match the pntr_save_file() definition.

See also
pntr_save_file()
PNTR_NO_STDIO

◆ PNTR_SAVE_IMAGE_TO_MEMORY

#define PNTR_SAVE_IMAGE_TO_MEMORY

Callback to use when saving an image to memory. By default, will use stb_image_write.

See also
pntr_save_image_to_memory()
PNTR_STB_IMAGE
PNTR_CUTE_PNG
pntr_stb_image_save_image_to_memory()
pntr_cute_png_save_image_to_memory()

◆ PNTR_STB_IMAGE

#define PNTR_STB_IMAGE

When defined, will use stb_image.h for loading images, and stb_image_write.h for saving.

By default, stb_image will be used if a custom implementation isn't defined.

See also
pntr_load_image()
pntr_save_image()
PNTR_CUTE_PNG
PNTR_SAVE_IMAGE_TO_MEMORY
PNTR_LOAD_IMAGE_FROM_MEMORY