Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions examples/simple_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,6 @@ def main():
EXAMPLE_DIR / "images" / "python-logo.png",
left=(50, "pt"),
top=(100, "pt"),
width=(300, "pt"),
height=(80, "pt"),
)
.text(
"The Python logo",
Expand Down
11 changes: 8 additions & 3 deletions src/tppt/pptx/shape/picture.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,22 @@
from typing import IO, Literal, NotRequired, assert_never
from typing import IO, Literal, NotRequired, TypedDict, assert_never

from pptx.opc.constants import CONTENT_TYPE
from pptx.shapes.picture import Movie as PptxMovie
from pptx.shapes.picture import Picture as PptxPicture

from tppt.types import FilePath
from tppt.types import FilePath, Length, LiteralLength

from . import BaseShape, RangeProps


class PictureProps(RangeProps):
class PictureProps(TypedDict):
"""Picture properties."""

left: Length | LiteralLength
top: Length | LiteralLength
width: NotRequired[Length | LiteralLength]
height: NotRequired[Length | LiteralLength]


class PictureData(PictureProps):
"""Picture data."""
Expand Down