[Laszlo-checkins] r11093 - openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf

bargull@openlaszlo.org bargull at openlaszlo.org
Fri Sep 19 00:41:50 PDT 2008


Author: bargull
Date: 2008-09-19 00:41:47 -0700 (Fri, 19 Sep 2008)
New Revision: 11093

Modified:
   openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/LzSprite.as
Log:
Change 20080917-bargull-2fS by bargull at dell--p4--2-53 on 2008-09-17 15:58:00
    in /home/Admin/src/svn/openlaszlo/trunk
    for http://svn.openlaszlo.org/openlaszlo/trunk

Summary: round resource sizes

New Features:

Bugs Fixed: LPP-6135

Technical Reviewer: max
QA Reviewer: (pending)
Doc Reviewer: (pending)

Documentation:

Release Notes:

Details:
Call Math.round() to avoid fractional resource-dimensions.
    

Tests:
attached at bugreport



Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/LzSprite.as
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/LzSprite.as	2008-09-19 06:59:10 UTC (rev 11092)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/LzSprite.as	2008-09-19 07:41:47 UTC (rev 11093)
@@ -319,7 +319,6 @@
   */
 LzSprite.prototype.setMovieClip = function ( mc , mcID) {
     this.__LZmovieClipRef = mc;
-    //mc.tabIndex = tabindexcounter++;
     if (this.masked) {
       this.applyMask();
     }
@@ -378,8 +377,6 @@
         var instName = ("$m" + this.__LZsubUniqueNum );
     }
 
-    //mc.tabIndex = tabindexcounter++;
-
     //Debug.write('Sprite.depth', this.FIRST_SUBVIEW_DEPTH, childsprite.owner.sprite.__LZdepth, this.CLIPS_PER_SUBVIEW, this.FOREGROUND_DEPTH_OFFSET)
     var depth = this.FIRST_SUBVIEW_DEPTH + 
       (childsprite.__LZdepth * this.CLIPS_PER_SUBVIEW) + 
@@ -665,8 +662,8 @@
         this.resourceheight = rt.height;
     } else {
         // Get the true size by unscaling. Note: clip scale is in percent
-        this.resourcewidth = mc._width/(mc._xscale/100);
-        this.resourceheight = mc._height/(mc._yscale/100);
+        this.resourcewidth = Math.round(mc._width/(mc._xscale/100));
+        this.resourceheight = Math.round(mc._height/(mc._yscale/100));
     }
 
     if (! skipsend && ! this.__LZhaser) this.owner.resourceload({width: this.resourcewidth, height: this.resourceheight, resource: this.resource, skiponload: true});



More information about the Laszlo-checkins mailing list