Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2006-07-31 19:53:03 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2006-07-31 19:53:03 +0400
commite168d67b3205977777715f143554a15f259c0a40 (patch)
tree4f80d467e17004a7ec0084a449c0b8e6ec4b06cd /source/blender/blenkernel/BKE_brush.h
parent6bc2ada6fcaa7eb50cd211450039f4912d5c6390 (diff)
ImagePaint Refactoring:
- ImagePaint now uses ImBuf directly, and the rect blending functions were moved into the imbuf module. - The brush spacing, timing and sampling was abstracted into brush.c, for later reuse in other paint modes. Float ImagePaint support. Textured Brushes: - Only the first texture channel is used now. - Options for size and offset should be added, but need to find some space in the panel, or add a second one ..
Diffstat (limited to 'source/blender/blenkernel/BKE_brush.h')
-rw-r--r--source/blender/blenkernel/BKE_brush.h27
1 files changed, 21 insertions, 6 deletions
diff --git a/source/blender/blenkernel/BKE_brush.h b/source/blender/blenkernel/BKE_brush.h
index 89c6a3adf2a..a55c8913c7f 100644
--- a/source/blender/blenkernel/BKE_brush.h
+++ b/source/blender/blenkernel/BKE_brush.h
@@ -36,22 +36,37 @@
struct ID;
struct Brush;
+struct ImBuf;
+/* datablock functions */
struct Brush *add_brush(char *name);
struct Brush *copy_brush(struct Brush *brush);
void make_local_brush(struct Brush *brush);
void free_brush(struct Brush *brush);
-/* implementation of blending modes for use by different paint modes */
-void brush_blend_rgb(char *outcol, char *col1, char *col2, int fac, short mode);
-
-/* functions for brush datablock browsing used by different paint panels */
+/* brush library operations used by different paint panels */
int brush_set_nr(struct Brush **current_brush, int nr);
int brush_delete(struct Brush **current_brush);
+void brush_check_exists(struct Brush **brush);
void brush_toggle_fake_user(struct Brush *brush);
-int brush_clone_image_delete(struct Brush *brush);
+int brush_texture_set_nr(struct Brush *brush, int nr);
+int brush_texture_delete(struct Brush *brush);
int brush_clone_image_set_nr(struct Brush *brush, int nr);
-void brush_check_exists(struct Brush **brush);
+int brush_clone_image_delete(struct Brush *brush);
+
+/* sampling */
+void brush_sample(struct Brush *brush, float *xy, float dist, float *rgb, float *alpha, short texonly);
+struct ImBuf *brush_imbuf_new(struct Brush *brush, short flt, short texonly, int size);
+
+/* painting */
+struct BrushPainter;
+typedef struct BrushPainter BrushPainter;
+typedef int (*BrushFunc)(void *user, struct ImBuf *ibuf, float *lastpos, float *pos);
+
+BrushPainter *brush_painter_new(struct Brush *brush);
+void brush_painter_require_imbuf(BrushPainter *painter, short flt, short texonly, int size);
+int brush_painter_paint(BrushPainter *painter, BrushFunc func, float *pos, double time, void *user);
+void brush_painter_free(BrushPainter *painter);
#endif