Bug 18488 - BitmapData.fillRect not implemented
Summary: BitmapData.fillRect not implemented
Status: RESOLVED FIXED
Alias: None
Product: swfdec
Classification: Unclassified
Component: library (show other bugs)
Version: unspecified
Hardware: Other All
: medium enhancement
Assignee: swfdec ml
QA Contact: swfdec ml
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-11-11 13:28 UTC by MenTaLguY
Modified: 2008-11-23 01:22 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
A screenshot comparing the rendering in Adobe Flash and swfdec (14.74 KB, image/png)
2008-11-11 13:29 UTC, MenTaLguY
Details
A .swf compiled from the above example code (3.17 KB, application/x-shockwave-flash)
2008-11-11 13:32 UTC, MenTaLguY
Details

Description MenTaLguY 2008-11-11 13:28:53 UTC
BitmapData.fillRect is apparently not implemented.  The following haxe program demonstrates the issue:

 import flash.MovieClip;
 import flash.display.BitmapData;
 import flash.geom.Rectangle;

 class Main {
     public static inline var RECT_SIZE : Int = 25;

     public static function main() {
         var root : MovieClip = flash.Lib.current;
         var mc1 : MovieClip = root.createEmptyMovieClip("mc1", root.getNextHighestDepth());
         var b1 : BitmapData = new BitmapData(RECT_SIZE, RECT_SIZE, false, 0xffff0000);
         var mc2 : MovieClip = root.createEmptyMovieClip("mc2", root.getNextHighestDepth());
         var b2 : BitmapData = new BitmapData(RECT_SIZE, RECT_SIZE, true, 0xffff0000);
         b1.fillRect(b1.rectangle, 0x80000000);
         b2.fillRect(b2.rectangle, 0x80000000);
         mc1.attachBitmap(b1, 1);
         mc2.attachBitmap(b2, 1);
         mc1._x = 0;
         mc1._y = 0;
         mc2._x = RECT_SIZE;
         mc2._y = RECT_SIZE;
     }
 }

Expected result:

 The movie should show a solid black square in the upper left corner, and diagonally down from it a 50% transparent black square.

Actual result:

 The movie shows two solid red squares.

I've attached a screenshot showing the rendered results in Adobe Flash (on the left), and in swfdec (on the right).
Comment 1 MenTaLguY 2008-11-11 13:29:30 UTC
Created attachment 20227 [details]
A screenshot comparing the rendering in Adobe Flash and swfdec
Comment 2 MenTaLguY 2008-11-11 13:32:49 UTC
Created attachment 20228 [details]
A .swf compiled from the above example code
Comment 3 MenTaLguY 2008-11-14 14:37:15 UTC
Can this please be given a higher priority?  It is a very trivial patch, and I have a project which is blocked on this being implemented.

(I'd give you a patch myself, except that I'm not sure what the project's stance is WRT the Flash player EULA at this point.)
Comment 4 Riccardo Magliocchetti 2008-11-21 06:41:25 UTC
mental, this should be fixed in latest git.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.