Blender V5.3
paint_image_2d.cc File Reference
#include <algorithm>
#include <cstring>
#include "MEM_guardedalloc.h"
#include "DNA_brush_types.h"
#include "DNA_scene_types.h"
#include "DNA_space_types.h"
#include "BLI_bitmap.hh"
#include "BLI_listbase.hh"
#include "BLI_math_color_blend.hh"
#include "BLI_math_color_c.hh"
#include "BLI_stack_c.hh"
#include "BLI_task_c.hh"
#include "BKE_brush.hh"
#include "BKE_colorband.hh"
#include "BKE_context.hh"
#include "BKE_image.hh"
#include "BKE_image_gpu.hh"
#include "BKE_paint.hh"
#include "BKE_paint_types.hh"
#include "BKE_report.hh"
#include "DEG_depsgraph.hh"
#include "ED_paint.hh"
#include "ED_screen.hh"
#include "IMB_colormanagement.hh"
#include "IMB_imbuf.hh"
#include "IMB_imbuf_types.hh"
#include "WM_api.hh"
#include "WM_types.hh"
#include "UI_view2d.hh"
#include "../paint_intern.hh"

Go to the source code of this file.

Classes

struct  blender::BrushPainterCache
struct  blender::BrushPainter
struct  blender::ImagePaintRegion
struct  blender::ImagePaintTile
struct  blender::ImagePaintState
struct  blender::Paint2DForeachData

Namespaces

namespace  blender
 BMesh Iterators.

Enumerations

enum  blender::ImagePaintTileState { blender::PAINT2D_TILE_UNINITIALIZED = 0 , blender::PAINT2D_TILE_MISSING , blender::PAINT2D_TILE_READY }

Functions

static BrushPainter * blender::brush_painter_2d_new (Scene *scene, const Paint *paint, Brush *brush, bool invert)
static void blender::brush_painter_2d_require_imbuf (Brush *brush, ImagePaintTile *tile, bool is_float, bool is_data, bool is_srgb, const ColorSpace *byte_colorspace, bool invert)
static void blender::brush_painter_cache_2d_free (BrushPainterCache *cache)
static void blender::brush_imbuf_tex_co (const rctf *mapping, int x, int y, float texco[3])
static ushort * blender::brush_painter_mask_ibuf_new (BrushPainter *painter, const int size)
static void blender::brush_painter_mask_imbuf_update (BrushPainter *painter, ImagePaintTile *tile, const ushort *tex_mask_old, int origx, int origy, int w, int h, int xt, int yt, const int diameter)
static void blender::brush_painter_mask_imbuf_partial_update (BrushPainter *painter, ImagePaintTile *tile, const float pos[2], const int diameter)
static ImBuf * blender::brush_painter_imbuf_new (BrushPainter *painter, ImagePaintTile *tile, const int size, float pressure, float distance)
static void blender::brush_painter_imbuf_update (BrushPainter *painter, ImagePaintTile *tile, ImBuf *oldtexibuf, int origx, int origy, int w, int h, int xt, int yt)
static void blender::brush_painter_imbuf_partial_update (BrushPainter *painter, ImagePaintTile *tile, const float pos[2], const int diameter)
static void blender::brush_painter_2d_tex_mapping (ImagePaintState *s, ImagePaintTile *tile, const int diameter, const float pos[2], const float mouse[2], int mapmode, rctf *r_mapping)
static void blender::brush_painter_2d_refresh_cache (ImagePaintState *s, BrushPainter *painter, ImagePaintTile *tile, const float pos[2], const float mouse[2], float pressure, float distance, float size)
static bool blender::paint_2d_ensure_tile_canvas (ImagePaintState *s, int i)
static void blender::paint_2d_ibuf_rgb_get (ImBuf *ibuf, int x, int y, float r_rgb[4])
static void blender::paint_2d_ibuf_rgb_set (ImBuf *ibuf, int x, int y, const bool is_torus, const float rgb[4])
static void blender::paint_2d_ibuf_tile_convert (ImBuf *ibuf, int *x, int *y, short paint_tile)
static float blender::paint_2d_ibuf_add_if (ImBuf *ibuf, int x, int y, float *outrgb, short paint_tile, float w)
static void blender::paint_2d_lift_soften (ImagePaintState *s, ImagePaintTile *tile, ImBuf *ibuf, ImBuf *ibufb, const int *pos, const short paint_tile)
static void blender::paint_2d_set_region (ImagePaintRegion *region, int destx, int desty, int srcx, int srcy, int width, int height)
static int blender::paint_2d_torus_split_region (ImagePaintRegion region[4], ImBuf *dbuf, const ImBuf *sbuf, short paint_tile)
static void blender::paint_2d_lift_smear (const ImBuf *ibuf, ImBuf *ibufb, int *pos, short paint_tile)
static ImBuf * blender::paint_2d_lift_clone (ImBuf *ibuf, ImBuf *ibufb, const int *pos)
static void blender::paint_2d_convert_brushco (ImBuf *ibufb, const float pos[2], int ipos[2])
static void blender::paint_2d_do_making_brush (ImagePaintState *s, ImagePaintTile *tile, ImagePaintRegion *region, uint8_t *canvas_byte_data, float *canvas_float_data, ImBuf *frombuf, float mask_max, short blend, int tilex, int tiley, int tilew, int tileh)
static void blender::paint_2d_op_foreach_do (void *__restrict data_v, const int iter, const TaskParallelTLS *__restrict)
static int blender::paint_2d_op (void *state, ImagePaintTile *tile, const float lastpos[2], const float pos[2])
static int blender::paint_2d_canvas_set (ImagePaintState *s, const Paint *paint)
static void blender::paint_2d_canvas_free (ImagePaintState *s)
static void blender::paint_2d_transform_mouse (View2D *v2d, const float in[2], float out[2])
static bool blender::is_inside_tile (const int size[2], const float pos[2], const float brush[2])
static void blender::paint_2d_uv_to_coord (ImagePaintTile *tile, const float uv[2], float coord[2])
void blender::paint_2d_stroke (void *ps, const float prev_mval[2], const float mval[2], const bool eraser, float pressure, float distance, float base_size)
void * blender::paint_2d_new_stroke (bContext *C, wmOperator *op, const BrushStrokeMode mode)
void blender::paint_2d_redraw (const bContext *C, void *ps, bool final)
void blender::paint_2d_stroke_done (void *ps, wmPaintCursor *cursor)
static void blender::paint_2d_fill_add_pixel_byte (const int x_px, const int y_px, ImBuf *ibuf, BLI_Stack *stack, BLI_bitmap *touched, const float color[4], float threshold_sq)
static void blender::paint_2d_fill_add_pixel_float (const int x_px, const int y_px, ImBuf *ibuf, BLI_Stack *stack, BLI_bitmap *touched, const float color[4], float threshold_sq)
static ImageUser * blender::paint_2d_get_tile_iuser (ImagePaintState *s, int tile_number)
void blender::paint_2d_bucket_fill (const bContext *C, const float color[3], Brush *br, const float mouse_init[2], const float mouse_final[2], void *ps)
void blender::paint_2d_gradient_fill (const bContext *C, Brush *br, const float mouse_init[2], const float mouse_final[2], void *ps)