跳转至

maliang.standard.images

字数 9 个   阅读时间不到 1 分钟   访问量

源代码:maliang/standard/images.py

All standard Image classes

类:

StillImage

StillImage(
    widget: Widget,
    relative_position: tuple[int, int] = (0, 0),
    size: tuple[int, int] | None = None,
    *,
    image: enhanced.PhotoImage | None = None,
    name: str | None = None,
    gradient_animation: bool = True,
    **kwargs
)

Bases: virtual.Image

A simple still image

方法:

  • display

    Display the Element on a Canvas

  • coords

    Resize the Element

display

display() -> None

Display the Element on a Canvas

coords

coords(
    size: tuple[float, float] | None = None, position: tuple[float, float] | None = None
) -> None

Resize the Element

Smoke

Smoke(
    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
)

Bases: virtual.Image

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

方法:

  • display

    Display the Element on a Canvas

  • coords

    Resize the Element

display

display() -> None

Display the Element on a Canvas

coords

coords(
    size: tuple[float, float] | None = None, position: tuple[float, float] | None = None
) -> None

Resize the Element