from _typeshed import Incomplete
from typing import Final

from reportlab.lib.attrmap import *
from reportlab.lib.validators import *
from reportlab.platypus import Flowable

from .transform import *

__version__: Final[str]
isOpacity: NoneOr
NON_ZERO_WINDING: Final[str]
EVEN_ODD: Final[str]
STATE_DEFAULTS: Final[Incomplete]

class _DrawTimeResizeable: ...

class _SetKeyWordArgs:
    def __init__(self, keywords={}) -> None: ...

def getRectsBounds(rectList): ...
def getPathBounds(points): ...
def getPointsBounds(pointList): ...

class Shape(_SetKeyWordArgs, _DrawTimeResizeable):
    def copy(self) -> None: ...
    def getProperties(self, recur: int = 1): ...
    def setProperties(self, props) -> None: ...
    def dumpProperties(self, prefix: str = "") -> None: ...
    def verify(self) -> None: ...
    def __setattr__(self, attr, value) -> None: ...
    def getBounds(self) -> None: ...

class Group(Shape):
    contents: Incomplete
    transform: Incomplete
    def __init__(self, *elements, **keywords) -> None: ...
    def add(self, node, name: Incomplete | None = None) -> None: ...
    def insert(self, i, n, name: Incomplete | None = None) -> None: ...
    def expandUserNodes(self): ...
    def copy(self): ...
    def rotate(self, theta) -> None: ...
    def translate(self, dx, dy) -> None: ...
    def scale(self, sx, sy) -> None: ...
    def skew(self, kx, ky) -> None: ...
    def shift(self, x, y) -> None: ...
    __class__: Incomplete
    width: Incomplete
    height: Incomplete
    def asDrawing(self, width, height) -> None: ...
    def getContents(self): ...
    def getBounds(self): ...

class Drawing(Group, Flowable):
    background: Incomplete
    renderScale: float
    def __init__(self, width: int = 400, height: int = 200, *nodes, **keywords) -> None: ...
    def draw(self, showBoundary=...) -> None: ...
    def wrap(self, availWidth, availHeight): ...
    def expandUserNodes(self): ...
    def copy(self): ...
    def asGroup(self, *args, **kw): ...
    def save(
        self,
        formats: Incomplete | None = None,
        verbose: Incomplete | None = None,
        fnRoot: Incomplete | None = None,
        outDir: Incomplete | None = None,
        title: str = "",
        **kw,
    ): ...
    def asString(self, format, verbose: Incomplete | None = None, preview: int = 0, **kw): ...
    def resized(self, kind: str = "fit", lpad: int = 0, rpad: int = 0, bpad: int = 0, tpad: int = 0): ...

class _DrawingEditorMixin: ...

class _isStrokeDashArray(Validator):
    def test(self, x): ...

isStrokeDashArray: _isStrokeDashArray

class LineShape(Shape):
    strokeColor: Incomplete
    strokeWidth: int
    strokeLineCap: int
    strokeLineJoin: int
    strokeMiterLimit: int
    strokeDashArray: Incomplete
    strokeOpacity: Incomplete
    def __init__(self, kw) -> None: ...

class Line(LineShape):
    x1: Incomplete
    y1: Incomplete
    x2: Incomplete
    y2: Incomplete
    def __init__(self, x1, y1, x2, y2, **kw) -> None: ...
    def getBounds(self): ...

class SolidShape(LineShape):
    fillColor: Incomplete
    fillOpacity: Incomplete
    def __init__(self, kw) -> None: ...

class Path(SolidShape):
    points: Incomplete
    operators: Incomplete
    isClipPath: Incomplete
    autoclose: Incomplete
    fillMode: Incomplete
    def __init__(
        self,
        points: Incomplete | None = None,
        operators: Incomplete | None = None,
        isClipPath: int = 0,
        autoclose: Incomplete | None = None,
        fillMode=0,
        **kw,
    ) -> None: ...
    def copy(self): ...
    def moveTo(self, x, y) -> None: ...
    def lineTo(self, x, y) -> None: ...
    def curveTo(self, x1, y1, x2, y2, x3, y3) -> None: ...
    def closePath(self) -> None: ...
    def getBounds(self): ...

EmptyClipPath: Incomplete

def getArcPoints(
    centerx,
    centery,
    radius,
    startangledegrees,
    endangledegrees,
    yradius: Incomplete | None = None,
    degreedelta: Incomplete | None = None,
    reverse: Incomplete | None = None,
): ...

class ArcPath(Path):
    def addArc(
        self,
        centerx,
        centery,
        radius,
        startangledegrees,
        endangledegrees,
        yradius: Incomplete | None = None,
        degreedelta: Incomplete | None = None,
        moveTo: Incomplete | None = None,
        reverse: Incomplete | None = None,
    ) -> None: ...

def definePath(pathSegs=[], isClipPath: int = 0, dx: int = 0, dy: int = 0, **kw): ...

class Rect(SolidShape):
    x: Incomplete
    y: Incomplete
    width: Incomplete
    height: Incomplete
    rx: Incomplete
    ry: Incomplete
    def __init__(self, x, y, width, height, rx: int = 0, ry: int = 0, **kw) -> None: ...
    def copy(self): ...
    def getBounds(self): ...

class Image(SolidShape):
    x: Incomplete
    y: Incomplete
    width: Incomplete
    height: Incomplete
    path: Incomplete
    def __init__(self, x, y, width, height, path, **kw) -> None: ...
    def copy(self): ...
    def getBounds(self): ...

class Circle(SolidShape):
    cx: Incomplete
    cy: Incomplete
    r: Incomplete
    def __init__(self, cx, cy, r, **kw) -> None: ...
    def copy(self): ...
    def getBounds(self): ...

class Ellipse(SolidShape):
    cx: Incomplete
    cy: Incomplete
    rx: Incomplete
    ry: Incomplete
    def __init__(self, cx, cy, rx, ry, **kw) -> None: ...
    def copy(self): ...
    def getBounds(self): ...

class Wedge(SolidShape):
    degreedelta: int
    yradius: Incomplete
    annular: Incomplete
    def __init__(
        self,
        centerx,
        centery,
        radius,
        startangledegrees,
        endangledegrees,
        yradius: Incomplete | None = None,
        annular: bool = False,
        **kw,
    ) -> None: ...
    def asPolygon(self): ...
    def copy(self): ...
    def getBounds(self): ...

class Polygon(SolidShape):
    points: Incomplete
    def __init__(self, points=[], **kw) -> None: ...
    def copy(self): ...
    def getBounds(self): ...

class PolyLine(LineShape):
    points: Incomplete
    def __init__(self, points=[], **kw) -> None: ...
    def copy(self): ...
    def getBounds(self): ...

class Hatching(Path):
    xyLists: Incomplete
    angles: Incomplete
    spacings: Incomplete
    def __init__(self, spacings: int = 2, angles: int = 45, xyLists=[], **kwds) -> None: ...

def numericXShift(tA, text, w, fontName, fontSize, encoding: Incomplete | None = None, pivotCharacter="."): ...

class String(Shape):
    encoding: str
    x: Incomplete
    y: Incomplete
    text: Incomplete
    textAnchor: str
    fontName: Incomplete
    fontSize: Incomplete
    fillColor: Incomplete
    def __init__(self, x, y, text, **kw) -> None: ...
    def getEast(self): ...
    def copy(self): ...
    def getBounds(self): ...

class UserNode(_DrawTimeResizeable):
    def provideNode(self) -> None: ...

class DirectDraw(Shape):
    def drawDirectly(self, canvas) -> None: ...

def test() -> None: ...
