Skip to content

Commit

Permalink
avm2: Stub more TextLine methods
Browse files Browse the repository at this point in the history
  • Loading branch information
kjarosh committed Jan 19, 2025
1 parent 92d90a9 commit 5532c15
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions core/src/avm2/globals/flash/text/engine/TextLine.as
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package flash.text.engine {
import __ruffle__.stub_setter;
import __ruffle__.stub_method;

import flash.display.DisplayObject;
import flash.display.DisplayObjectContainer;
import flash.errors.IllegalOperationError;
import flash.geom.Rectangle;
Expand Down Expand Up @@ -113,11 +114,46 @@ package flash.text.engine {
return -1;
}

public function getAtomBidiLevel(index:int):int {
stub_method("flash.text.engine.TextLine", "getAtomBidiLevel");
return 0;
}

public function getAtomBounds(index:int):Rectangle {
stub_method("flash.text.engine.TextLine", "getAtomBounds");
return new Rectangle(0, 0, 0, 0);
}

public function getAtomCenter(index:int):Number {
stub_method("flash.text.engine.TextLine", "getAtomCenter");
return 1.0;
}

public function getAtomGraphic(index:int):DisplayObject {
stub_method("flash.text.engine.TextLine", "getAtomGraphic");
return null;
}

public function getAtomTextBlockBeginIndex(index:int):int {
stub_method("flash.text.engine.TextLine", "getAtomTextBlockBeginIndex");
return 0;
}

public function getAtomTextBlockEndIndex(index:int):int {
stub_method("flash.text.engine.TextLine", "getAtomTextBlockEndIndex");
return 0;
}

public function getAtomTextRotation(index:int):String {
stub_method("flash.text.engine.TextLine", "getAtomTextRotation");
return TextRotation.ROTATE_0;
}

public function getAtomWordBoundaryOnLeft(index:int):Boolean {
stub_method("flash.text.engine.TextLine", "getAtomWordBoundaryOnLeft");
return false;
}

// This function does nothing in Flash Player 32
public function flushAtomData():void { }

Expand Down

0 comments on commit 5532c15

Please sign in to comment.