Welcome to libmypaint’s documentation!

Contents:

libmypaint API reference

struct
#include <mypaint-brush-settings.h>

Public Members

const gchar *MyPaintBrushInputInfo::cname
float MyPaintBrushInputInfo::hard_min
float MyPaintBrushInputInfo::soft_min
float MyPaintBrushInputInfo::normal
float MyPaintBrushInputInfo::soft_max
float MyPaintBrushInputInfo::hard_max
const gchar *MyPaintBrushInputInfo::name
const gchar *MyPaintBrushInputInfo::tooltip
struct
#include <mypaint-brush-settings.h>

Public Members

const gchar *MyPaintBrushSettingInfo::cname
const gchar *MyPaintBrushSettingInfo::name
gboolean MyPaintBrushSettingInfo::constant
float MyPaintBrushSettingInfo::min
float MyPaintBrushSettingInfo::def
float MyPaintBrushSettingInfo::max
const gchar *MyPaintBrushSettingInfo::tooltip
struct
#include <mypaint-rectangle.h>

Public Members

int MyPaintRectangle::x
int MyPaintRectangle::y
int MyPaintRectangle::width
int MyPaintRectangle::height
struct
#include <mypaint-surface.h>

MyPaintSurface:

Abstract surface type for the MyPaint brush engine. The surface interface lets the brush engine specify dabs to render, and to pick color.

Public Members

MyPaintSurfaceDrawDabFunction MyPaintSurface::draw_dab
MyPaintSurfaceGetColorFunction MyPaintSurface::get_color
MyPaintSurfaceBeginAtomicFunction MyPaintSurface::begin_atomic
MyPaintSurfaceEndAtomicFunction MyPaintSurface::end_atomic
MyPaintSurfaceDestroyFunction MyPaintSurface::destroy
MyPaintSurfaceSavePngFunction MyPaintSurface::save_png
int MyPaintSurface::refcount
struct
#include <mypaint-tiled-surface.h>

MyPaintTiledSurface:

Interface and convenience class for implementing a MyPaintSurface backed by a tile store.

The size of the surface is infinite, and consumers need just implement two vfuncs.

Public Members

MyPaintSurface MyPaintTiledSurface::parent
MyPaintTileRequestStartFunction MyPaintTiledSurface::tile_request_start
MyPaintTileRequestEndFunction MyPaintTiledSurface::tile_request_end
gboolean MyPaintTiledSurface::surface_do_symmetry
float MyPaintTiledSurface::surface_center_x
struct OperationQueue *MyPaintTiledSurface::operation_queue
MyPaintRectangle MyPaintTiledSurface::dirty_bbox
gboolean MyPaintTiledSurface::threadsafe_tile_requests
int MyPaintTiledSurface::tile_size
struct
#include <mypaint-tiled-surface.h>

Public Members

int MyPaintTileRequest::tx
int MyPaintTileRequest::ty
gboolean MyPaintTileRequest::readonly
guint16 *MyPaintTileRequest::buffer
gpointer MyPaintTileRequest::context
int MyPaintTileRequest::thread_id
int MyPaintTileRequest::mipmap_level
file mypaint-gegl-surface.h
#include <gegl.h>#include <mypaint-config.h>#include <glib/mypaint-gegl-glib.h>#include <mypaint-tiled-surface.h>

Typedefs

typedef typedefG_BEGIN_DECLS struct MyPaintGeglTiledSurface MyPaintGeglTiledSurface

Functions

GeglBuffer *mypaint_gegl_tiled_surface_get_buffer(MyPaintGeglTiledSurface *self)
void mypaint_gegl_tiled_surface_set_buffer(MyPaintGeglTiledSurface *self, GeglBuffer *buffer)
MyPaintSurface *mypaint_gegl_tiled_surface_interface(MyPaintGeglTiledSurface *self)
MyPaintGeglTiledSurface *mypaint_gegl_tiled_surface_new(void)
file mypaint-brush.h
#include <mypaint-config.h>#include <glib-object.h>

Defines

MYPAINT_TYPE_BRUSH
MYPAINT_VALUE_HOLDS_BRUSH(value)
MYPAINT_TYPE_SURFACE
MYPAINT_VALUE_HOLDS_SURFACE(value)
MYPAINT_TYPE_FIXED_TILED_SURFACE
MYPAINT_VALUE_HOLDS_FIXED_TILED_SURFACE(value)
MYPAINT_TYPE_RECTANGLE
MYPAINT_VALUE_HOLDS_RECTANGLE(value)

Functions

GType mypaint_brush_get_type(void)
GType mypaint_surface_get_type(void)
GType mypaint_fixed_tiled_surface_get_type(void)
GType mypaint_rectangle_get_type(void)
file mypaint-brush.h
#include <mypaint-config.h>#include <mypaint-surface.h>#include <mypaint-brush-settings.h>

Typedefs

typedef typedefG_BEGIN_DECLS struct MyPaintBrush MyPaintBrush

Functions

MyPaintBrush *mypaint_brush_new(void)
void mypaint_brush_unref(MyPaintBrush *self)
void mypaint_brush_ref(MyPaintBrush *self)
void mypaint_brush_reset(MyPaintBrush *self)
void mypaint_brush_new_stroke(MyPaintBrush *self)
int mypaint_brush_stroke_to(MyPaintBrush *self, MyPaintSurface *surface, float x, float y, float pressure, float xtilt, float ytilt, double dtime)
void mypaint_brush_set_base_value(MyPaintBrush *self, MyPaintBrushSetting id, float value)
float mypaint_brush_get_base_value(MyPaintBrush *self, MyPaintBrushSetting id)
gboolean mypaint_brush_is_constant(MyPaintBrush *self, MyPaintBrushSetting id)
int mypaint_brush_get_inputs_used_n(MyPaintBrush *self, MyPaintBrushSetting id)
void mypaint_brush_set_mapping_n(MyPaintBrush *self, MyPaintBrushSetting id, MyPaintBrushInput input, int n)
int mypaint_brush_get_mapping_n(MyPaintBrush *self, MyPaintBrushSetting id, MyPaintBrushInput input)
void mypaint_brush_set_mapping_point(MyPaintBrush *self, MyPaintBrushSetting id, MyPaintBrushInput input, int index, float x, float y)
void mypaint_brush_get_mapping_point(MyPaintBrush *self, MyPaintBrushSetting id, MyPaintBrushInput input, int index, float *x, float *y)
float mypaint_brush_get_state(MyPaintBrush *self, MyPaintBrushState i)
void mypaint_brush_set_state(MyPaintBrush *self, MyPaintBrushState i, float value)
double mypaint_brush_get_total_stroke_painting_time(MyPaintBrush *self)
void mypaint_brush_set_print_inputs(MyPaintBrush *self, gboolean enabled)
void mypaint_brush_from_defaults(MyPaintBrush *self)
gboolean mypaint_brush_from_string(MyPaintBrush *self, const char *string)
file mypaint-gegl-glib.h
#include <mypaint-config.h>#include <glib-object.h>

Defines

MYPAINT_GEGL_TYPE_TILED_SURFACE
MYPAINT_GEGL_VALUE_HOLDS_TILED_SURFACE(value)

Functions

GType mypaint_gegl_tiled_surface_get_type(void)
file mypaint-brush-settings-gen.h

Enums

enum type MyPaintBrushInput

Values:

enum type MyPaintBrushSetting

Values:

enum type MyPaintBrushState

Values:

file mypaint-brush-settings.h
#include <mypaint-config.h>#include <mypaint-glib-compat.h>#include <mypaint-brush-settings-gen.h>

Functions

const MyPaintBrushSettingInfo *mypaint_brush_setting_info(MyPaintBrushSetting id)
const gchar *mypaint_brush_setting_info_get_name(const MyPaintBrushSettingInfo *self)
const gchar *mypaint_brush_setting_info_get_tooltip(const MyPaintBrushSettingInfo *self)
MyPaintBrushSetting mypaint_brush_setting_from_cname(const char *cname)
const MyPaintBrushInputInfo *mypaint_brush_input_info(MyPaintBrushInput id)
const gchar *mypaint_brush_input_info_get_name(const MyPaintBrushInputInfo *self)
const gchar *mypaint_brush_input_info_get_tooltip(const MyPaintBrushInputInfo *self)
MyPaintBrushInput mypaint_brush_input_from_cname(const char *cname)
file mypaint-config.h

Defines

MYPAINT_TILE_SIZE
MYPAINT_MAX_THREADS
MYPAINT_MAX_MIPMAP_LEVEL
file mypaint-fixed-tiled-surface.h
#include <mypaint-config.h>#include <mypaint-glib-compat.h>#include <mypaint-tiled-surface.h>

Typedefs

typedef typedefG_BEGIN_DECLS struct MyPaintFixedTiledSurface MyPaintFixedTiledSurface

MyPaintFixedTiledSurface:

Simple MyPaintTiledSurface subclass that implements a fixed sized MyPaintSurface. Only intended for testing and trivial use-cases, and to serve as an example of how to implement a tiled surface subclass.

Functions

MyPaintFixedTiledSurface *mypaint_fixed_tiled_surface_new(int width, int height)
int mypaint_fixed_tiled_surface_get_width(MyPaintFixedTiledSurface *self)
int mypaint_fixed_tiled_surface_get_height(MyPaintFixedTiledSurface *self)
MyPaintSurface *mypaint_fixed_tiled_surface_interface(MyPaintFixedTiledSurface *self)
file mypaint-glib-compat.h
#include <mypaint-config.h>

Defines

G_BEGIN_DECLS
G_END_DECLS
FALSE
TRUE

Typedefs

typedef
typedef
typedef
typedef
typedef
file mypaint-mapping.h
#include <mypaint-config.h>#include <mypaint-glib-compat.h>

Typedefs

typedef typedefG_BEGIN_DECLS struct MyPaintMapping MyPaintMapping

Functions

MyPaintMapping *mypaint_mapping_new(int inputs_)
void mypaint_mapping_free(MyPaintMapping *self)
float mypaint_mapping_get_base_value(MyPaintMapping *self)
void mypaint_mapping_set_base_value(MyPaintMapping *self, float value)
void mypaint_mapping_set_n(MyPaintMapping *self, int input, int n)
int mypaint_mapping_get_n(MyPaintMapping *self, int input)
void mypaint_mapping_set_point(MyPaintMapping *self, int input, int index, float x, float y)
void mypaint_mapping_get_point(MyPaintMapping *self, int input, int index, float *x, float *y)
gboolean mypaint_mapping_is_constant(MyPaintMapping *self)
int mypaint_mapping_get_inputs_used_n(MyPaintMapping *self)
float mypaint_mapping_calculate(MyPaintMapping *self, float *data)
float mypaint_mapping_calculate_single_input(MyPaintMapping *self, float input)
file mypaint-rectangle.h
#include <mypaint-config.h>#include <mypaint-glib-compat.h>

Functions

void mypaint_rectangle_expand_to_include_point(MyPaintRectangle *r, int x, int y)
MyPaintRectangle *mypaint_rectangle_copy(MyPaintRectangle *self)
file mypaint-surface.h
#include <mypaint-config.h>#include <mypaint-rectangle.h>

Typedefs

typedef typedefG_BEGIN_DECLS struct MyPaintSurface MyPaintSurface
typedef
typedef
typedef
typedef
typedef
typedef

Functions

int mypaint_surface_draw_dab(MyPaintSurface *self, float x, float y, float radius, float color_r, float color_g, float color_b, float opaque, float hardness, float alpha_eraser, float aspect_ratio, float angle, float lock_alpha, float colorize)

mypaint_surface_draw_dab:

Draw a dab onto the surface.

void mypaint_surface_get_color(MyPaintSurface *self, float x, float y, float radius, float *color_r, float *color_g, float *color_b, float *color_a)
float mypaint_surface_get_alpha(MyPaintSurface *self, float x, float y, float radius)
void mypaint_surface_save_png(MyPaintSurface *self, const char *path, int x, int y, int width, int height)
void mypaint_surface_begin_atomic(MyPaintSurface *self)
void mypaint_surface_end_atomic(MyPaintSurface *self, MyPaintRectangle *roi)
void mypaint_surface_init(MyPaintSurface *self)
void mypaint_surface_ref(MyPaintSurface *self)
void mypaint_surface_unref(MyPaintSurface *self)
file mypaint-tiled-surface.h
#include <stdint.h>#include <mypaint-surface.h>#include <mypaint-config.h>

Typedefs

typedef typedefG_BEGIN_DECLS struct MyPaintTiledSurface MyPaintTiledSurface
typedef
typedef
typedef

Functions

void mypaint_tile_request_init(MyPaintTileRequest *data, int level, int tx, int ty, gboolean readonly)
void mypaint_tiled_surface_init(MyPaintTiledSurface *self, MyPaintTileRequestStartFunction tile_request_start, MyPaintTileRequestEndFunction tile_request_end)
void mypaint_tiled_surface_destroy(MyPaintTiledSurface *self)
void mypaint_tiled_surface_set_symmetry_state(MyPaintTiledSurface *self, gboolean active, float center_x)
float mypaint_tiled_surface_get_alpha(MyPaintTiledSurface *self, float x, float y, float radius)
void mypaint_tiled_surface_tile_request_start(MyPaintTiledSurface *self, MyPaintTileRequest *request)
void mypaint_tiled_surface_tile_request_end(MyPaintTiledSurface *self, MyPaintTileRequest *request)
void mypaint_tiled_surface_begin_atomic(MyPaintTiledSurface *self)
void mypaint_tiled_surface_end_atomic(MyPaintTiledSurface *self, MyPaintRectangle *roi)
file mypaint-benchmark.h

Functions

void mypaint_benchmark_start(const char *name)
int mypaint_benchmark_end(void)
file mypaint-test-surface.h
#include <mypaint-surface.h>#include <mypaint-glib-compat.h>

Functions

int mypaint_test_surface_run(int argc, char **argv, MyPaintTestsSurfaceFactory surface_factory, gchar *title, gpointer user_data)

Variables

G_BEGIN_DECLS typedef MyPaintSurface*(* MyPaintTestsSurfaceFactory) (gpointer user_data)
file mypaint-utils-stroke-player.h
#include <mypaint-brush.h>#include <mypaint-surface.h>

Typedefs

typedef

Functions

MyPaintUtilsStrokePlayer *mypaint_utils_stroke_player_new(void)
void mypaint_utils_stroke_player_free(MyPaintUtilsStrokePlayer *self)
void mypaint_utils_stroke_player_set_brush(MyPaintUtilsStrokePlayer *self, MyPaintBrush *brush)
void mypaint_utils_stroke_player_set_surface(MyPaintUtilsStrokePlayer *self, MyPaintSurface *surface)
void mypaint_utils_stroke_player_set_source_data(MyPaintUtilsStrokePlayer *self, const char *data)
gboolean mypaint_utils_stroke_player_iterate(MyPaintUtilsStrokePlayer *self)
void mypaint_utils_stroke_player_reset(MyPaintUtilsStrokePlayer *self)
void mypaint_utils_stroke_player_run_sync(MyPaintUtilsStrokePlayer *self)
void mypaint_utils_stroke_player_set_transactions_on_stroke_to(MyPaintUtilsStrokePlayer *self, gboolean value)
void mypaint_utils_stroke_player_set_scale(MyPaintUtilsStrokePlayer *self, float scale)
dir /builddir/build/BUILD/libmypaint-1.3.0/gegl
dir /builddir/build/BUILD/libmypaint-1.3.0/glib
dir /builddir/build/BUILD/libmypaint-1.3.0/tests

Indices and tables