[ https://issues.apache.org/jira/browse/FLEX-29004?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13612149#comment-13612149 ]
Carlos Rovira commented on FLEX-29004: -------------------------------------- Could not find a way to reproduce this issue. Some code an image could be provided to show the problem > BitmapImage.scaleMode="zoom" does not always center vertically > -------------------------------------------------------------- > > Key: FLEX-29004 > URL: https://issues.apache.org/jira/browse/FLEX-29004 > Project: Apache Flex > Issue Type: Bug > Components: Spark: Image > Affects Versions: Adobe Flex SDK 4.6 (Release) > Environment: Affected OS(s): All OS Platforms > Affected OS(s): All OS Platforms > Language Found: English > Reporter: Adobe JIRA > Labels: EasyFix > > Steps to reproduce: > 1. Set scaleMode="zoom" and fillMode="scale" on a spark Image or BitmapImage > > Actual Results: > Some images will not be centered vertically, even when verticalAlign="middle" > (the default) > > Workaround (if any): > I believe the problem is in spark.primitives.BitmapImage updateDisplayList() > line #1202 > if (isZoom) > { > if (cWidth > unscaledWidth) > translateX = translateX + ((unscaledWidth - cWidth) * > getHorizontalAlignValue()); > else if (cHeight > unscaledHeight) > translateY = translateY + ((unscaledHeight - cHeight) * > getVerticalAlignValue()); > } > I believe the "else if" should be just an "if". Because everywhere else in > the updateDisplayList() method where getHorizontalAlignValue() or > getVerticalAlignValue() is being called, it is always 2 if statements, never > a single if...else statement. > On my image, these were the values when it would not vertically center > correctly: > b.height = 239 > b.width = 225 > cHeight = 987.8666666666668 > cWidth = 930.0000000000001 > unscaledWidth = 930 > unscaledHeight = 455 -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira