Changes

Jump to: navigation, search

User:Dhhodgin

692 bytes added, 17:11, 13 December 2009
blend() helper functions
=== blend() helper functions===
intersectblit_resize, filter_new_scanline, filter_bilinear coming soon  p.intersect = function intersect(sx1, sy1, sx2, sy2, dx1, dy1, dx2, dy2) { var sw = sx2 - sx1 + 1; var sh = sy2 - sy1 + 1; var dw = dx2 - dx1 + 1; var dh = dy2 - dy1 + 1; if (dx1 < sx1) { dw += dx1 - sx1; if (dw > sw) { dw = sw; } } else { var w = sw + sx1 - dx1; if (dw > w) { dw = w; } } if (dy1 < sy1) { dh += dy1 - sy1; if (dh > sh) { dh = sh; } } else { var h = sh + sy1 - dy1; if (dh > h) { dh = h; } } return !(dw <= 0 || dh <= 0); }; 
=== CONSTANTS ADDED ===
p.ALPHA_MASK = 0xff000000;
1
edit

Navigation menu