7#ifndef KIS_MYPAINT_SURFACE_H
8#define KIS_MYPAINT_SURFACE_H
22#include <libmypaint/mypaint-brush.h>
23#include <libmypaint/mypaint-surface.h>
43 static int draw_dab(MyPaintSurface *self,
float x,
float y,
float radius,
44 float color_r,
float color_g,
float color_b,
float opaque,
float hardness,
45 float color_a,
float aspect_ratio,
float angle,
float lock_alpha,
48 static void get_color(MyPaintSurface *self,
float x,
float y,
float radius,
49 float * color_r,
float * color_g,
float * color_b,
float * color_a);
51 template <
typename channelType>
52 int drawDabImpl(MyPaintSurface *self,
float x,
float y,
float radius,
float color_r,
float color_g,
53 float color_b,
float opaque,
float hardness,
float color_a,
54 float aspect_ratio,
float angle,
float lock_alpha,
float colorize);
56 template <
typename channelType>
57 void getColorImpl(MyPaintSurface *self,
float x,
float y,
float radius,
58 float * color_r,
float * color_g,
float * color_b,
float * color_a);
62 float sn,
float cs,
float one_over_radius2,
float r_aa_start);
68 calculate_rr (
int xp,
int yp,
float x,
float y,
float aspect_ratio,
69 float sn,
float cs,
float one_over_radius2);
74 qreal
calculateOpacity(
float angle,
float hardness,
float opaque,
float x,
float y,
75 float xp,
float yp,
float aspect_ratio,
float radius);
KisPaintDeviceSP m_imageDevice
float calculate_alpha_for_rr(float rr, float hardness, float slope1, float slope2)
float calculate_rr_antialiased(int xp, int yp, float x, float y, float aspect_ratio, float sn, float cs, float one_over_radius2, float r_aa_start)
qreal calculateOpacity(float angle, float hardness, float opaque, float x, float y, float xp, float yp, float aspect_ratio, float radius)
MyPaintSurface * surface()
void getColorImpl(MyPaintSurface *self, float x, float y, float radius, float *color_r, float *color_g, float *color_b, float *color_a)
static void get_color(MyPaintSurface *self, float x, float y, float radius, float *color_r, float *color_g, float *color_b, float *color_a)
KisOverlayPaintDeviceWrapper m_precisePainterWrapper
KisFixedPaintDeviceSP m_maskDevice
KisFixedPaintDeviceSP m_blendDevice
QScopedPointer< KisPainter > m_tempPainter
QScopedPointer< KisPainter > m_backgroundPainter
static int draw_dab(MyPaintSurface *self, float x, float y, float radius, float color_r, float color_g, float color_b, float opaque, float hardness, float color_a, float aspect_ratio, float angle, float lock_alpha, float colorize)
KisMyPaintSurface(KisPainter *painter, KisPaintDeviceSP paintNode=nullptr, KisImageSP image=nullptr)
float calculate_rr(int xp, int yp, float x, float y, float aspect_ratio, float sn, float cs, float one_over_radius2)
MyPaintSurfaceInternal * m_surface
void paint(KoColor *color, KoColor *bgColor)
int drawDabImpl(MyPaintSurface *self, float x, float y, float radius, float color_r, float color_g, float color_b, float opaque, float hardness, float color_a, float aspect_ratio, float angle, float lock_alpha, float colorize)
enumChannelValueType
enum to define the value of the channel
KisMyPaintSurface * m_owner
KoChannelInfo::enumChannelValueType bitDepth