diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2006-07-31 19:53:03 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2006-07-31 19:53:03 +0400 |
commit | e168d67b3205977777715f143554a15f259c0a40 (patch) | |
tree | 4f80d467e17004a7ec0084a449c0b8e6ec4b06cd /source/blender/imbuf/IMB_imbuf.h | |
parent | 6bc2ada6fcaa7eb50cd211450039f4912d5c6390 (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/imbuf/IMB_imbuf.h')
-rw-r--r-- | source/blender/imbuf/IMB_imbuf.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/source/blender/imbuf/IMB_imbuf.h b/source/blender/imbuf/IMB_imbuf.h index c55e353ee6c..5eaac146c4e 100644 --- a/source/blender/imbuf/IMB_imbuf.h +++ b/source/blender/imbuf/IMB_imbuf.h @@ -219,8 +219,33 @@ void IMB_freecmapImBuf(struct ImBuf * ibuf); * * @attention Defined in rectop.c */ + +typedef enum IMB_BlendMode { + IMB_BLEND_MIX = 0, + IMB_BLEND_ADD = 1, + IMB_BLEND_SUB = 2, + IMB_BLEND_MUL = 3, + IMB_BLEND_LIGHTEN = 4, + IMB_BLEND_DARKEN = 5, + + IMB_BLEND_COPY = 1000, + IMB_BLEND_COPY_RGB = 1001, + IMB_BLEND_COPY_ALPHA = 1002 +} IMB_BlendMode; + +unsigned int IMB_blend_color(unsigned int src1, unsigned int src2, int fac, + IMB_BlendMode mode); +void IMB_blend_color_float(float *dst, float *src1, float *src2, float fac, + IMB_BlendMode mode); + +void IMB_rectclip(struct ImBuf *dbuf, struct ImBuf *sbuf, int *destx, + int *desty, int *srcx, int *srcy, int *width, int *height); void IMB_rectcpy(struct ImBuf *drect, struct ImBuf *srect, int destx, int desty, int srcx, int srcy, int width, int height); +void IMB_rectblend(struct ImBuf *dbuf, struct ImBuf *sbuf, int destx, + int desty, int srcx, int srcy, int width, int height, IMB_BlendMode mode); +void IMB_rectblend_torus(struct ImBuf *dbuf, struct ImBuf *sbuf, int destx, + int desty, int srcx, int srcy, int width, int height, IMB_BlendMode mode); /** * Return the length (in frames) of the given @a anim. |