diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2010-02-15 15:57:16 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2010-02-15 15:57:16 +0300 |
commit | 5e58daa0983ac7ed58dfde5df578bd5d01b306a3 (patch) | |
tree | a3b2ae66f1d61683f6665d235725dafe556e892d /source/blender/imbuf | |
parent | c864df6cfef875101f9b24650f0bac2d553c7d8a (diff) |
Fix #21078: image paint undo didn't work correct with wrap option, moved
wrapping code to paint_image.c so it can be used for the undo push.
Diffstat (limited to 'source/blender/imbuf')
-rw-r--r-- | source/blender/imbuf/IMB_imbuf.h | 2 | ||||
-rw-r--r-- | source/blender/imbuf/intern/rectop.c | 39 |
2 files changed, 0 insertions, 41 deletions
diff --git a/source/blender/imbuf/IMB_imbuf.h b/source/blender/imbuf/IMB_imbuf.h index 023881a9aed..a77ef54b0b6 100644 --- a/source/blender/imbuf/IMB_imbuf.h +++ b/source/blender/imbuf/IMB_imbuf.h @@ -243,8 +243,6 @@ 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. diff --git a/source/blender/imbuf/intern/rectop.c b/source/blender/imbuf/intern/rectop.c index f320763c80a..3202413a494 100644 --- a/source/blender/imbuf/intern/rectop.c +++ b/source/blender/imbuf/intern/rectop.c @@ -443,45 +443,6 @@ void IMB_rectblend(struct ImBuf *dbuf, struct ImBuf *sbuf, int destx, } } -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) -{ - int origw, origh, w, h; - - if (dbuf->x == 0 || dbuf->y == 0 || sbuf->x == 0 || sbuf->y == 0) - return; - - /* convert destination and source coordinates too be withing image */ - destx = destx % dbuf->x; - if (destx < 0) destx += dbuf->x; - desty = desty % dbuf->y; - if (desty < 0) desty += dbuf->y; - srcx = srcx % sbuf->x; - if (srcx < 0) srcx += sbuf->x; - srcy = srcy % sbuf->y; - if (srcy < 0) srcy += sbuf->y; - - /* clip width of blending area to destination imbuf, to avoid writing the - same pixel twice */ - origw = w = (width > dbuf->x)? dbuf->x: width; - origh = h = (height > dbuf->y)? dbuf->y: height; - - /* clip and blend */ - IMB_rectclip(dbuf, sbuf, &destx, &desty, &srcx, &srcy, &w, &h); - IMB_rectblend(dbuf, sbuf, destx, desty, srcx, srcy, w, h, mode); - - /* do 3 other rects if needed */ - if (w < origw) - IMB_rectblend(dbuf, sbuf, (destx+w)%dbuf->x, desty, (srcx+w)%sbuf->x, srcy, - origw-w, h, mode); - if (h < origh) - IMB_rectblend(dbuf, sbuf, destx, (desty+h)%dbuf->y, srcx, (srcy+h)%sbuf->y, - w, origh-h, mode); - if ((w < origw) && (h < origh)) - IMB_rectblend(dbuf, sbuf, (destx+w)%dbuf->x, (desty+h)%dbuf->y, - (srcx+w)%sbuf->x, (srcy+h)%sbuf->y, origw-w, origh-h, mode); -} - /* fill */ void IMB_rectfill(struct ImBuf *drect, float col[4]) |