1 #ifndef MYPAINTSURFACE_H
2 #define MYPAINTSURFACE_H
46 float * color_r,
float * color_g,
float * color_b,
float * color_a
77 float color_r,
float color_g,
float color_b,
78 float opaque,
float hardness,
80 float aspect_ratio,
float angle,
180 MyPaintSurface*
self,
float x,
float y,
float radius,
float color_r,
float color_g,
float color_b,
float opaque,
181 float hardness,
float alpha_eraser,
float aspect_ratio,
float angle,
float lock_alpha,
float colorize);
190 MyPaintSurface*
self,
float x,
float y,
float radius,
float* color_r,
float* color_g,
float* color_b,
268 float color_r,
float color_g,
float color_b,
269 float opaque,
float hardness,
271 float aspect_ratio,
float angle,
293 float * color_r,
float * color_g,
float * color_b,
float * color_a,
347 MyPaintSurface2*
self,
float x,
float y,
float radius,
float* color_r,
float* color_g,
float* color_b,
348 float* color_a,
float paint);
367 MyPaintSurface2*
self,
float x,
float y,
float radius,
float color_r,
float color_g,
float color_b,
float opaque,
368 float hardness,
float alpha_eraser,
float aspect_ratio,
float angle,
float lock_alpha,
float colorize,
369 float posterize,
float posterize_num,
float paint);
#define G_END_DECLS
Definition: mypaint-glib-compat.h:14
#define G_BEGIN_DECLS
Definition: mypaint-glib-compat.h:13
void(* MyPaintSurfaceGetColorFunction)(MyPaintSurface *self, float x, float y, float radius, float *color_r, float *color_g, float *color_b, float *color_a)
Function used to retrieve the average color/alpha from a region of a surface.
Definition: mypaint-surface.h:42
Representation of a rectangle, integer values: (x, y, w, h)
Definition: mypaint-rectangle.h:33
Holds the size and location of a MyPaintRectangle array.
Definition: mypaint-rectangle.h:51
Extends MyPaintSurface with support for spectral ops and multiple bounding boxes.
Definition: mypaint-surface.h:321
MyPaintSurfaceEndAtomicFunction2 end_atomic_multi
See MyPaintSurfaceEndAtomicFunction2.
Definition: mypaint-surface.h:329
MyPaintSurface * mypaint_surface2_to_surface(MyPaintSurface2 *self)
Safely access the parent MyPaintSurface interface.
MyPaintSurfaceDrawDabFunction2 draw_dab_pigment
See MyPaintSurfaceDrawDabFunction2.
Definition: mypaint-surface.h:325
MyPaintSurface parent
Parent interface.
Definition: mypaint-surface.h:323
int(* MyPaintSurfaceDrawDabFunction2)(MyPaintSurface2 *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, float posterize, float posterize_num, float paint)
Like MyPaintSurfaceDrawDabFunction, but supporting posterization and spectral mixing.
Definition: mypaint-surface.h:264
void mypaint_surface2_end_atomic(MyPaintSurface2 *self, MyPaintRectangles *roi)
Call the surface's end_atomic_multi function.
void mypaint_surface2_get_color(MyPaintSurface2 *self, float x, float y, float radius, float *color_r, float *color_g, float *color_b, float *color_a, float paint)
Call the surface's get_color_pigment function.
void(* MyPaintSurfaceEndAtomicFunction2)(MyPaintSurface2 *self, MyPaintRectangles *roi)
Like MyPaintSurfaceEndAtomicFunction, but with support for multiple invalidation rectangles.
Definition: mypaint-surface.h:303
int mypaint_surface2_draw_dab(MyPaintSurface2 *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, float posterize, float posterize_num, float paint)
Call the surface's draw_dab_pigment function.
MyPaintSurfaceGetColorFunction2 get_color_pigment
See MyPaintSurfaceGetColorFunction2.
Definition: mypaint-surface.h:327
void(* MyPaintSurfaceGetColorFunction2)(MyPaintSurface2 *self, float x, float y, float radius, float *color_r, float *color_g, float *color_b, float *color_a, float paint)
Like MyPaintSurfaceGetColorFunction, but for spectral colors.
Definition: mypaint-surface.h:289
Abstract surface type for the MyPaint brush engine.
Definition: mypaint-surface.h:131
float mypaint_surface_get_alpha(MyPaintSurface *self, float x, float y, float radius)
Invoke MyPaintSurface::get_color and return the alpha component.
MyPaintSurfaceGetColorFunction get_color
Function for retrieving color data from the surface.
Definition: mypaint-surface.h:142
void mypaint_surface_unref(MyPaintSurface *self)
Decrease refcount by 1 and call destroy if it reaches 0.
void mypaint_surface_end_atomic(MyPaintSurface *self, MyPaintRectangle *roi)
Invoke MyPaintSurface::begin_atomic.
void mypaint_surface_ref(MyPaintSurface *self)
Increase refcount by 1.
MyPaintSurfaceSavePngFunction save_png
Save a region of the surface to a png file.
Definition: mypaint-surface.h:163
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)
Invoke MyPaintSurface::draw_dab.
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)
Invoke MyPaintSurface::get_color.
MyPaintSurfaceDestroyFunction destroy
Destroy the surface (free up all allocated resources).
Definition: mypaint-surface.h:158
void mypaint_surface_save_png(MyPaintSurface *self, const char *path, int x, int y, int width, int height)
Invoke MyPaintSurface::save_png.
void mypaint_surface_begin_atomic(MyPaintSurface *self)
Invoke MyPaintSurface::begin_atomic.
void(* MyPaintSurfaceSavePngFunction)(MyPaintSurface *self, const char *path, int x, int y, int width, int height)
Function for rendering a png file from a surface.
Definition: mypaint-surface.h:102
int refcount
Reference count - number of references to the struct.
Definition: mypaint-surface.h:170
MyPaintSurfaceDrawDabFunction draw_dab
Function for drawing a dab on the surface.
Definition: mypaint-surface.h:136
void mypaint_surface_init(MyPaintSurface *self)
Set refcount to 1.
void(* MyPaintSurfaceEndAtomicFunction)(MyPaintSurface *self, MyPaintRectangle *roi)
Finalize an atomic set of stroke operations, setting an invalidation rectangle.
Definition: mypaint-surface.h:122
MyPaintSurfaceEndAtomicFunction end_atomic
Finalize the operations run after a call to begin_atomic.
Definition: mypaint-surface.h:154
MyPaintSurfaceBeginAtomicFunction begin_atomic
Prepare the surface for a set of atomic stroke/dab operations.
Definition: mypaint-surface.h:148
int(* MyPaintSurfaceDrawDabFunction)(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)
Function used to draw a dab with the given properties on the surface.
Definition: mypaint-surface.h:73
void(* MyPaintSurfaceBeginAtomicFunction)(MyPaintSurface *self)
Prepare the surface for an atomic set of stroke operations.
Definition: mypaint-surface.h:112
void(* MyPaintSurfaceDestroyFunction)(MyPaintSurface *self)
Destructor for surface implementations.
Definition: mypaint-surface.h:91