libmypaint
1.6.0
|
Extends MyPaintSurface with support for spectral ops and multiple bounding boxes. More...
#include <mypaint-surface.h>
Public Types | |
typedef 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. More... | |
typedef 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. More... | |
typedef void(* | MyPaintSurfaceEndAtomicFunction2) (MyPaintSurface2 *self, MyPaintRectangles *roi) |
Like MyPaintSurfaceEndAtomicFunction, but with support for multiple invalidation rectangles. More... | |
Public Member Functions | |
MyPaintSurface * | mypaint_surface2_to_surface (MyPaintSurface2 *self) |
Safely access the parent MyPaintSurface interface. More... | |
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. More... | |
void | mypaint_surface2_end_atomic (MyPaintSurface2 *self, MyPaintRectangles *roi) |
Call the surface's end_atomic_multi function. More... | |
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. More... | |
Extends MyPaintSurface with support for spectral ops and multiple bounding boxes.
This extends the regular MyPaintSurface with three new functions that support the use of spectral blending, for drawing dabs and getting color, and additionally supports using multiple invalidation rectangles when finalizing drawing operations.
The interface functions for MyPaintSurface can be called with instances of MyPaintSurface2 via the use of mypaint_surface2_to_surface (or just casting). Concrete implementations of MypaintSurface2 should support this.
typedef 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.
posterize | Posterization factor |
posterize_num | Number of posterization levels |
paint | Spectral mixing factor |
typedef void(* MyPaintSurfaceEndAtomicFunction2) (MyPaintSurface2 *self, MyPaintRectangles *roi) |
Like MyPaintSurfaceEndAtomicFunction, but with support for multiple invalidation rectangles.
typedef 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.
paint | Spectral mixing factor. To what extent spectral weighting will be used in place of straight averaging. Input value range: [0.0, 1.0] |
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.
See MyPaintSurfaceDrawDabFunction2 for details.
void mypaint_surface2_end_atomic | ( | MyPaintSurface2 * | self, |
MyPaintRectangles * | roi | ||
) |
Call the surface's end_atomic_multi function.
See MyPaintSurfaceEndAtomicFunction2 for details.
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.
See MyPaintSurfaceGetColorFunction2 for details.
MyPaintSurface * mypaint_surface2_to_surface | ( | MyPaintSurface2 * | self | ) |
Safely access the parent MyPaintSurface interface.
MyPaintSurfaceDrawDabFunction2 MyPaintSurface2::draw_dab_pigment |
MyPaintSurfaceEndAtomicFunction2 MyPaintSurface2::end_atomic_multi |
MyPaintSurfaceGetColorFunction2 MyPaintSurface2::get_color_pigment |
MyPaintSurface MyPaintSurface2::parent |
Parent interface.