Xj"dZddlmZddlmZmZddlmZddlm Z ddl m Z m Z m Z mZmZmZddlmZmZmZmZmZerddlmZGd d eZGd d eZGd deZGddeZGddeZGddeZGddeZGddeZ GddeZ!GddeZ"GddeZ#Gdd eZ$Gd!d"eZ%Gd#d$eZ&Gd%d&eZ'Gd'd(eZ(Gd)d*eZ)y+),zDCustom element classes for shape-related elements like ``.) annotations) TYPE_CHECKINGcastnsdecls) parse_xml) ST_CoordinateST_DrawingElementIdST_PositiveCoordinateST_RelationshipId XsdStringXsdToken)BaseOxmlElement OneAndOnlyOneOptionalAttributeRequiredAttribute ZeroOrOne)LengthceZdZdZy) CT_Anchorz8`` element, container for a "floating" shape.N__name__ __module__ __qualname____doc__c/mnt/ssd/data/Dropbox/adrian/vault-secondbrain/venv/lib/python3.12/site-packages/docx/oxml/shape.pyrrsBrrcJeZdZUdZedeZded<edeZded<y)CT_BlipzX```` element, specifies image source and adjustments such as alpha and tint.zr:embedz str | Noneembedzr:linklinkN) rrrrrr r!__annotations__r"rrrr r !s9 *$E:)#D*rr c0eZdZUdZeddZded<y)CT_BlipFillPropertiesz9```` element, specifies picture properties.za:blip)z a:srcRectza:tilez a:stretch successorsr blipN)rrrrrr(r#rrrr%r%-sCAD'rr%c,eZdZUdZedZded<y)CT_GraphicalObjectz:```` element, container for a DrawingML object.z a:graphicDataCT_GraphicalObjectData graphicDataN)rrrrrr,r#rrrr*r*5sD*7+K'rr*cHeZdZUdZedZded<edeZ ded<y)r+zI```` element, container for the XML of a DrawingML object.zpic:pic CT_PicturepicuristrN) rrrrrr/r#rrr0rrrr+r+=s%S *C* 1C1rr+ceZdZUdZedZded<edZded<edZd ed <e dd Z e dd Z e d Z y) CT_Inlinez5`` element, container for an inline shape.z wp:extentCT_PositiveSize2Dextentzwp:docPrCT_NonVisualDrawingPropsdocPrz a:graphicr*graphiccbttt|j}||j_||j_||j_d|z|j_ d|jj_ |jjj||S)z\Return a new ```` element populated with the values passed as parameters.z Picture %dz8http://schemas.openxmlformats.org/drawingml/2006/picture)rr3r _inline_xmlr5cxcyr7idnamer8r,r0 _insert_pic)clsr;r<shape_idr/inlines rnewz CT_Inline.newOsi3??+  " (83 )c""&""..s3 rcdd}tj|||||}|j||||}|S)zCreate `wp:inline` element containing a `pic:pic` element. The contents of the `pic:pic` element is taken from the argument values. r)r.rC) r@rArIdfilenamer;r<pic_idr/rBs rnew_pic_inlinezCT_Inline.new_pic_inline\s8nnVXsB;R3/ rc$dtddddzS)Na  wpar/rrr@s rr:zCT_Inline._inline_xmlis! %T3s; < rN) r;rr<rrAintr/r.returnr3) rArNrEr1rFr1r;rr<rrOr3) rrrrrr5r#r7r8 classmethodrCrHr:rrrr3r3Ds? -k :F :&3'E ##0#G     !$ 03 9? EK        rr3c4eZdZdZedeZedeZy)r6zpUsed for ```` element, and perhaps others. Specifies the id and name of a DrawingML drawing. r=r>N) rrrrrr r=r r>rrrr6r6ys" 4!4 5B VY /Drr6ceZdZdZy)CT_NonVisualPicturePropertieszK```` element, specifies picture locking and resize behaviors.NrrrrrSrSsUrrSceZdZUdZedZded<edZded<edZd ed <e dd Z e d Z y )r.z+```` element, a DrawingML picture.z pic:nvPicPrCT_PictureNonVisualnvPicPrz pic:blipFillr%blipFillzpic:spPrCT_ShapePropertiesspPrct|j}||jj_||jj_||j j_||j_ ||j_ |S)z3A new minimum viable `` (picture) element.) r_pic_xmlrVcNvPrr=r>rWr(r!rYr;r<)r@rGrFrEr;r<r/s rrCzCT_Picture.newse '% !) "%    rc"dtdddzS)Naq r/rKrLrrMs rr[zCT_Picture._pic_xmls $#5#s3% 4 rN) rGrNrFr1rEr1r;rr<rrOr.) rrrrrrVr#rWrYrPrCr[rrrr.r.si5#0$G '4'H# -Z8D 8  rr.c eZdZdZedZy)rUz9```` element, non-visual picture properties.z pic:cNvPrN)rrrrrr\rrrrUrUsC + &ErrUc4eZdZdZedeZedeZy) CT_Point2DzaUsed for ```` element, and perhaps others. Specifies an x, y coordinate (point). xyN)rrrrrr rarbrrrr`r`s! #}-A#}-Arr`cJeZdZUdZedeZded<edeZded<y)r4zpUsed for ```` element, and perhaps others later. Specifies the size of a DrawingML drawing. r;rr<N) rrrrrr r;r#r<rrrr4r4s9 # #B# #Brr4ceZdZdZy)CT_PresetGeometry2DzW```` element, specifies an preset autoshape geometry, such as ``rect``.NrrrrreresrreceZdZdZy)CT_RelativeRectzX```` element, specifying picture should fill containing rectangle shape.NrrrrrgrgrrgceZdZdZeddZedZejdZedZ e jdZ y ) rXzF```` element, specifies size and shape of picture container.za:xfrm)z a:custGeomz a:prstGeomza:lnz a:effectLstz a:effectDagz a:scene3dza:sp3dza:extLstr&c8|j}|y|jS)z:Shape width as an instance of Emu, or None if not present.N)xfrmr;selfrks rr;zCT_ShapeProperties.cxyy <wwrc2|j}||_yN)get_or_add_xfrmr;rmvaluerks rr;zCT_ShapeProperties.cx##%rc8|j}|y|jS)z;Shape height as an instance of Emu, or None if not present.N)rkr<rls rr<zCT_ShapeProperties.cyrnrc2|j}||_yrp)rqr<rrs rr<zCT_ShapeProperties.cyrtrN) rrrrrrkpropertyr;setterr<rrrrXrXsoP    DYYYYrrXceZdZdZy)CT_StretchInfoPropertieszT```` element, specifies how picture should fill its containing shape.Nrrrrrzrz rhrrzceZdZdZeddZeddZedZejdZed Z e jd Z y ) CT_Transform2DzD```` element, specifies size and shape of picture container.za:off)a:extr&r}rc8|j}|y|jSrp)extr;rmrs rr;zCT_Transform2D.cxhh ;vv rc2|j}||_yrp)get_or_add_extr;rmrsrs rr;zCT_Transform2D.cx!!#rc8|j}|y|jSrp)rr<rs rr<zCT_Transform2D.cy!rrc2|j}||_yrp)rr<rs rr<zCT_Transform2D.cy(rrN) rrrrroffrrwr;rxr<rrrr|r|ssN G 3C G +C  YY YYrr|N)*r __future__rtypingrr docx.oxml.nsrdocx.oxml.parserrdocx.oxml.simpletypesr r r r r rdocx.oxml.xmlchemyrrrrr docx.sharedrrr r%r*r+r3r6rSr.rUr`r4rergrXrzr|rrrrsJ"& &"CC o O2_22 2 j00VOV, , ^'/' ..  / o ))X _r