avm2: Implement GraphicsSolidFill

This commit is contained in:
Nathan Adams 2023-03-17 13:23:14 +01:00
parent fe327dc3de
commit 2eaaa9b573
3 changed files with 17 additions and 0 deletions

View File

@ -74,6 +74,7 @@ pub struct SystemClasses<'gc> {
pub graphicsendfill: ClassObject<'gc>,
pub graphicsgradientfill: ClassObject<'gc>,
pub graphicspath: ClassObject<'gc>,
pub graphicssolidfill: ClassObject<'gc>,
pub loaderinfo: ClassObject<'gc>,
pub bytearray: ClassObject<'gc>,
pub stage: ClassObject<'gc>,
@ -178,6 +179,7 @@ impl<'gc> SystemClasses<'gc> {
graphicsendfill: object,
graphicsgradientfill: object,
graphicspath: object,
graphicssolidfill: object,
loaderinfo: object,
bytearray: object,
stage: object,
@ -644,6 +646,7 @@ fn load_playerglobal<'gc>(
graphicsgradientfill
),
("flash.display", "GraphicsPath", graphicspath),
("flash.display", "GraphicsSolidFill", graphicssolidfill),
("flash.display", "Graphics", graphics),
("flash.display", "LoaderInfo", loaderinfo),
("flash.display", "MovieClip", movieclip),

View File

@ -0,0 +1,13 @@
package flash.display {
public final class GraphicsSolidFill implements IGraphicsFill, IGraphicsData {
public var alpha : Number = 1.0;
public var color : uint = 0;
public function GraphicsSolidFill(color:uint = 0, alpha:Number = 1.0) {
this.alpha = alpha;
this.color = color;
}
}
}

View File

@ -64,6 +64,7 @@ include "flash/display/GraphicsGradientFill.as"
include "flash/display/GraphicsPathCommand.as"
include "flash/display/GraphicsPathWinding.as"
include "flash/display/GraphicsPath.as"
include "flash/display/GraphicsSolidFill.as"
include "flash/display/InterpolationMethod.as"
include "flash/display/JointStyle.as"
include "flash/display/JPEGEncoderOptions.as"