跳转至

maliang.standard.images

字数 96 个   代码 27 行   阅读时间 1 分钟   访问量

源代码:maliang/standard/images.py

All standard Image classes

🟢Smoke

class public | Image

def __init__(
    self,
    widget: virtual.Widget,
    relative_position: tuple[int, int] = (0, 0),
    size: tuple[int, int] | None = None,
    *,
    color: str | None = '#00000066',
    name: str | None = None,
    animation: bool = True,
    **kwargs,
) -> None: ...
A special Image with only one color

  • widget: parent widget
  • relative_position: position relative to its widgets
  • size: size of element
  • color: color of the image object of the element
  • name: name of element
  • animation: Wether use animation to change color
  • kwargs: extra parameters for CanvasItem

🟡coords

method public

1
2
3
4
5
def coords(
    self,
    size: tuple[float, float] | None = None,
    position: tuple[float, float] | None = None,
) -> None: ...
Resize the Element

🟡display

method public

1
2
3
def display(
    self,
) -> None: ...
Display the Element on a Canvas

🟢StillImage

class public | Image

🟡coords

method public

1
2
3
4
5
def coords(
    self,
    size: tuple[float, float] | None = None,
    position: tuple[float, float] | None = None,
) -> None: ...
Resize the Element

🟡display

method public

1
2
3
def display(
    self,
) -> None: ...
Display the Element on a Canvas