|
| 1 | +from pptx.dml.fill import FillFormat |
| 2 | +from pptx.dml.line import LineFormat |
| 3 | +from pptx.enum.shapes import MSO_AUTO_SHAPE_TYPE, MSO_SHAPE_TYPE |
| 4 | +from pptx.oxml.shapes.autoshape import CT_PresetGeometry2D, CT_Shape |
| 5 | +from pptx.oxml.shapes.shared import CT_LineProperties |
| 6 | +from pptx.shapes.base import BaseShape |
| 7 | +from pptx.spec import AdjustmentValue |
| 8 | +from pptx.text.text import TextFrame |
| 9 | +from pptx.types import ProvidesPart |
| 10 | +from pptx.util import lazyproperty |
| 11 | + |
| 12 | +class Adjustment: |
| 13 | + def __init__(self, name: str, def_val: int, actual: int | None = ...) -> None: ... |
| 14 | + @property |
| 15 | + def effective_value(self) -> float: ... |
| 16 | + @effective_value.setter |
| 17 | + def effective_value(self, value: float) -> None: ... |
| 18 | + @property |
| 19 | + def val(self) -> int: ... |
| 20 | + |
| 21 | +class AdjustmentCollection: |
| 22 | + def __init__(self, prstGeom: CT_PresetGeometry2D) -> None: ... |
| 23 | + def __getitem__(self, idx: int) -> float: ... |
| 24 | + def __setitem__(self, idx: int, value: float) -> None: ... |
| 25 | + def __len__(self) -> int: ... |
| 26 | + |
| 27 | +class AutoShapeType: |
| 28 | + _instances: dict[MSO_AUTO_SHAPE_TYPE, AutoShapeType] = ... |
| 29 | + def __new__(cls, autoshape_type_id: MSO_AUTO_SHAPE_TYPE) -> AutoShapeType: ... |
| 30 | + def __init__(self, autoshape_type_id: MSO_AUTO_SHAPE_TYPE) -> None: ... |
| 31 | + @property |
| 32 | + def autoshape_type_id(self) -> MSO_AUTO_SHAPE_TYPE: ... |
| 33 | + @property |
| 34 | + def basename(self) -> str: ... |
| 35 | + @classmethod |
| 36 | + def default_adjustment_values(cls, prst: MSO_AUTO_SHAPE_TYPE) -> tuple[AdjustmentValue, ...]: ... |
| 37 | + @classmethod |
| 38 | + def id_from_prst(cls, prst: str) -> MSO_AUTO_SHAPE_TYPE: ... |
| 39 | + @property |
| 40 | + def prst(self) -> str: ... |
| 41 | + |
| 42 | +class Shape(BaseShape): |
| 43 | + def __init__(self, sp: CT_Shape, parent: ProvidesPart) -> None: ... |
| 44 | + @lazyproperty |
| 45 | + def adjustments(self) -> AdjustmentCollection: ... |
| 46 | + @property |
| 47 | + def auto_shape_type(self) -> MSO_AUTO_SHAPE_TYPE | None: ... |
| 48 | + @lazyproperty |
| 49 | + def fill(self) -> FillFormat: ... |
| 50 | + def get_or_add_ln(self) -> CT_LineProperties: ... |
| 51 | + @property |
| 52 | + def has_text_frame(self) -> bool: ... |
| 53 | + @lazyproperty |
| 54 | + def line(self) -> LineFormat: ... |
| 55 | + @property |
| 56 | + def ln(self) -> CT_LineProperties | None: ... |
| 57 | + @property |
| 58 | + def shape_type(self) -> MSO_SHAPE_TYPE: ... |
| 59 | + @property |
| 60 | + def text(self) -> str: ... |
| 61 | + @text.setter |
| 62 | + def text(self, text: str) -> None: ... |
| 63 | + @property |
| 64 | + def text_frame(self) -> TextFrame: ... |
0 commit comments