MCPcopy Index your code
hub / github.com/simstudioai/sim / getShapeXfrmInEmu

Function getShapeXfrmInEmu

apps/sim/lib/pptx-renderer/model/layout.ts:31–45  ·  view source on GitHub ↗
(
  node: SafeXmlNode
)

Source from the content-addressed store, hash-verified

29}
30
31function getShapeXfrmInEmu(
32 node: SafeXmlNode
33): { offX: number; offY: number; cx: number; cy: number } | null {
34 const spPr = node.child('spPr')
35 if (!spPr.exists()) return null
36 const xfrm = spPr.child('xfrm')
37 if (!xfrm.exists()) return null
38 const off = xfrm.child('off')
39 const ext = xfrm.child('ext')
40 const offX = off.numAttr('x') ?? 0
41 const offY = off.numAttr('y') ?? 0
42 const cx = ext.numAttr('cx') ?? 0
43 const cy = ext.numAttr('cy') ?? 0
44 return { offX, offY, cx, cy }
45}
46
47function getGroupXfrmInEmu(grpSp: SafeXmlNode): {
48 offX: number

Callers 1

Calls 3

childMethod · 0.80
existsMethod · 0.80
numAttrMethod · 0.80

Tested by

no test coverage detected