incubator-flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alex Harui (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (FLEX-29004) BitmapImage.scaleMode="zoom" does not always center vertically
Date Mon, 05 Nov 2012 19:38:12 GMT

     [ https://issues.apache.org/jira/browse/FLEX-29004?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Alex Harui updated FLEX-29004:
------------------------------

     Labels: EasyFix  (was: )
    Summary: BitmapImage.scaleMode="zoom" does not always center vertically  (was: [ForCommunity]
BitmapImage.scaleMode="zoom" does not always center vertically)
    
> 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

Mime
View raw message