[
https://issues.apache.org/jira/browse/FLEX-33523?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13643571#comment-13643571
]
Justin Mclean commented on FLEX-33523:
--------------------------------------
Possible patch/fix for issue:
@@ -221,6 +221,7 @@ public class BitmapImage extends GraphicElement
private var previousUnscaledHeight:Number;
private var sourceInvalid:Boolean;
private var loadFailed:Boolean;
+ private var dpiScale:Number = 1;
//----------------------------------
// bitmapData
@@ -949,7 +950,6 @@ public class BitmapImage extends GraphicElement
*/
override protected function measure():void
{
- var dpiScale:Number = 1;
var app:Object = FlexGlobals.topLevelApplication;
if ("applicationDPI" in app && "runtimeDPI" in app && source is
MultiDPIBitmapSource)
dpiScale = app.runtimeDPI / app.applicationDPI;
@@ -1107,8 +1107,8 @@ public class BitmapImage extends GraphicElement
g.lineStyle();
var repeatBitmap:Boolean = false;
- var fillScaleX:Number = 1;
- var fillScaleY:Number = 1;
+ var fillScaleX:Number = 1/dpiScale;
+ var fillScaleY:Number = 1/dpiScale;
var roundedDrawX:Number = Math.round(drawX);
var roundedDrawY:Number = Math.round(drawY);
var fillWidth:Number = adjustedWidth;
> MultiDPIBitmapSource is not behaving properly when fillMode = repeat
> --------------------------------------------------------------------
>
> Key: FLEX-33523
> URL: https://issues.apache.org/jira/browse/FLEX-33523
> Project: Apache Flex
> Issue Type: Bug
> Components: Spark: Image
> Affects Versions: Apache Flex 4.9.0
> Environment: Flash builder 4.7
> Reporter: Ejaz Asghar
> Priority: Critical
> Labels: BitmapFillMode.REPEAT, BitmapImage,
> MultiDPIBitmapSource,, easyfix
>
> Hi there,
> I'm developing a learning mobile app for children using Apache Flex and so
> far it is going great. Performance is good too. I didnt just learn a lot, but
> i also discovered many problem, one of them is v important and i'd appreciate
> if you guys take a look into it and fix it.
> Problem is related to MultiDPIBitmapSource. It is working fine , however when
> i pass MultiDPIBitmapSource to a bitmapImage/Image controls with fillMode =
> repeat, it scales the image twice (instead of just replacing the image with
> appropriate dpi which is a usual case)
> To generate the bug, simply pass a MultiDPIBitmapSource to any image control
> with fillmode = repeat,
> Waiting for reply, Thanks
--
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