Arm2D.pyi 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. class Window:
  2. background = BackGround()
  3. elems = ElementList()
  4. def __init__(self): ...
  5. def addCallBack(callback: any):
  6. """
  7. Interface of callback:
  8. ``` callback(frameBuff: Tile, isNewFrame:int) ```
  9. """
  10. # origin APIs
  11. CP_MODE_COPY: int
  12. CP_MODE_FILL: int
  13. CP_MODE_Y_MIRROR: int
  14. CP_MODE_X_MIRROR: int
  15. CP_MODE_XY_MIRROR: int
  16. COLOR_WHITE: int
  17. COLOR_BLACK: int
  18. COLOR_RED: int
  19. COLOR_BLUE: int
  20. COLOR_GREEN: int
  21. def __init__(): ...
  22. def create_region(x: int, y: int, w: int, h: int) -> Region: ...
  23. def create_location(x: int, y: int) -> Location: ...
  24. def update(): ...
  25. class Tile:
  26. def __init__(self): ...
  27. def get_root(self, validRegion: Region, offset: Location) -> Tile: ...
  28. def generate_child(self, reg: Region, clipRegion: int) -> Tile: ...
  29. def width_compare(self, reference: Region) -> int: ...
  30. def height_compare(self, reference: Region) -> int: ...
  31. def shape_compare(self, reference: Region) -> int: ...
  32. def region_diff(self, tile: Tile) -> Region: ...
  33. def transform(self, reg: Region, centre: Location) -> int: ...
  34. def is_root_tile(self) -> int: ...
  35. def get_absolute_location(self) -> Location: ...
  36. def is_point_inside_region(region: Region, location: Location) -> int: ...
  37. def tile_copy(src: Tile, des: Tile, des_reg: Region, mode: int) -> int: ...
  38. def tile_rotation(src:Tile, des: Tile, des_reg: Region, centre: Location, angle: float, mask_color: int) -> int: ...
  39. def alpha_blending(src: Tile, des: Tile, reg: Region, alp: int) -> int: ...
  40. def fill_colour(tile: Tile, reg: Region, colour: int) -> int: ...
  41. class Region:
  42. def __init__(self): ...
  43. def intersect(self, in2: Region) -> Region: ...
  44. class Location:
  45. def __init__(self): ...
  46. class Star(Tile):
  47. def __init__(self): ...
  48. # high level APIs
  49. class BackGround:
  50. def __init__(self): ...
  51. def setColor(self, color: int): ...
  52. def getColor(self) -> int: ...
  53. def update(self): ...
  54. class ElementList:
  55. def update(self): ...
  56. class Element:
  57. def __init__(self): ...
  58. def move(self, x: int, y: int): ...
  59. def right(self, x: int): ...
  60. def lift(self, x: int): ...
  61. def up(self, y: int): ...
  62. def down(self, y: int): ...
  63. def update(self): ...
  64. def setAlpha(self, alpha: int): ...
  65. class Box(Element):
  66. # override
  67. def update(self): ...
  68. def __init__(self): ...
  69. def setColor(self, color: int): ...
  70. def setSize(self, x: int, y: int): ...