Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // { } -> { } means replacements, just in case.
- /// file: jeash/display/DisplayObject.hx
- // line ~63 {
- public var alpha:Float;
- // } -> {
- public var jeashAlpha:Float;
- public var alpha:Float;
- // }
- /* jeashAlpha is [going to be] 'combined' alpha, meaning that
- * values of all parent objects are taken into account */
- // line ~423, method jeashRender {
- if (inMask != null) {
- Lib.jeashDrawToSurface(gfx.jeashSurface, inMask, m, (parent != null ? parent.alpha : 1) * alpha);
- } else {
- Lib.jeashSetSurfaceTransform(gfx.jeashSurface, m);
- Lib.jeashSetSurfaceOpacity(gfx.jeashSurface, (parent != null ? parent.alpha : 1) * alpha);
- }
- // } -> {
- jeashAlpha = parent != null ? parent.jeashAlpha * alpha : alpha;
- if (inMask != null) {
- Lib.jeashDrawToSurface(gfx.jeashSurface, inMask, m, jeashAlpha);
- } else {
- Lib.jeashSetSurfaceTransform(gfx.jeashSurface, m);
- Lib.jeashSetSurfaceOpacity(gfx.jeashSurface, jeashAlpha);
- }
- // }
- /* Instead of using single-level alpha inheritance, a 'combined'
- * value is being calculated, and passed down the rendering pipeline,
- * since DisplayObjectContainer objects render children after themselves */
- /// file: jeash/display/Bitmap.hx
- // line ~120, method jeashRender {
- if (inMask != null) {
- Lib.jeashDrawToSurface(jeashGraphics.jeashSurface, inMask, m, (parent != null ? parent.alpha : 1) * alpha);
- } else {
- Lib.jeashSetSurfaceTransform(jeashGraphics.jeashSurface, m);
- Lib.jeashSetSurfaceOpacity(jeashGraphics.jeashSurface, (parent != null ? parent.alpha : 1) * alpha);
- }
- // } -> {
- jeashAlpha = parent != null ? parent.jeashAlpha * alpha : alpha;
- if (inMask != null) {
- Lib.jeashDrawToSurface(jeashGraphics.jeashSurface, inMask, m, jeashAlpha);
- } else {
- Lib.jeashSetSurfaceTransform(jeashGraphics.jeashSurface, m);
- Lib.jeashSetSurfaceOpacity(jeashGraphics.jeashSurface, jeashAlpha);
- }
- // }
- /* Pretty much duplicate of above. Could probably make an inline method */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement