Group Shape

A group shape is a container for other shapes.

In the PowerPoint UI, a group shape may be selected and moved as a unit, such that the contained shapes retain their relative position to one another.

Certain operations can also be applied to all the shapes in a group by applying that operation to the group shape.

The grouping notion is recursive; a group shape can itself contain one or more group shapes. The “root” shape tree of a slide is itself a group, although it has a few distinctive behaviors. The XML element for a slide’s shape tree (p:spTree) is the same XML type as that for a group shape (p:grpSp), namely CT_GroupShape.

PowerPoint Behaviors

  • A group shape can have no click action.

XML Semantics

  • chOff and chExt represent child offset and child extents, respectively. These are used if the group itself is transformed, in particular when it is scaled.

MS API

  • Shape.GroupItems - corresponds to GroupShape.shapes

XML Specimens

<p:grpSp>
  <p:nvGrpSpPr>
    <p:cNvPr id="5" name="Group 4"/>
    <p:cNvGrpSpPr/>
    <p:nvPr/>
  </p:nvGrpSpPr>
  <p:grpSpPr>
    <a:xfrm>
      <a:off x="3347864" y="2204864"/>
      <a:ext cx="3506688" cy="2930624"/>
      <a:chOff x="3347864" y="2204864"/>
      <a:chExt cx="3506688" cy="2930624"/>
    </a:xfrm>
  </p:grpSpPr>
  <p:sp>
    <p:nvSpPr>
      <p:cNvPr id="2" name="Rounded Rectangle 1"/>
      <p:cNvSpPr/>
      <p:nvPr/>
    </p:nvSpPr>
    <p:spPr>
      <a:xfrm>
        <a:off x="3347864" y="2204864"/>
        <a:ext cx="914400" cy="914400"/>
      </a:xfrm>
      <a:prstGeom prst="roundRect">
        <a:avLst/>
      </a:prstGeom>
    </p:spPr>
    <p:style>
      <a:lnRef idx="1">
        <a:schemeClr val="accent1"/>
      </a:lnRef>
      <a:fillRef idx="3">
        <a:schemeClr val="accent1"/>
      </a:fillRef>
      <a:effectRef idx="2">
        <a:schemeClr val="accent1"/>
      </a:effectRef>
      <a:fontRef idx="minor">
        <a:schemeClr val="lt1"/>
      </a:fontRef>
    </p:style>
    <p:txBody>
      <a:bodyPr rtlCol="0" anchor="ctr"/>
      <a:lstStyle/>
      <a:p>
        <a:pPr algn="ctr"/>
        <a:endParaRPr lang="en-US"/>
      </a:p>
    </p:txBody>
  </p:sp>
  <p:sp>
    <p:nvSpPr>
      <p:cNvPr id="3" name="Oval 2"/>
      <p:cNvSpPr/>
      <p:nvPr/>
    </p:nvSpPr>
    <p:spPr>
      <a:xfrm>
        <a:off x="5940152" y="2708920"/>
        <a:ext cx="914400" cy="914400"/>
      </a:xfrm>
      <a:prstGeom prst="ellipse">
        <a:avLst/>
      </a:prstGeom>
    </p:spPr>
    <p:style>
      <a:lnRef idx="1">
        <a:schemeClr val="accent1"/>
      </a:lnRef>
      <a:fillRef idx="3">
        <a:schemeClr val="accent1"/>
      </a:fillRef>
      <a:effectRef idx="2">
        <a:schemeClr val="accent1"/>
      </a:effectRef>
      <a:fontRef idx="minor">
        <a:schemeClr val="lt1"/>
      </a:fontRef>
    </p:style>
    <p:txBody>
      <a:bodyPr rtlCol="0" anchor="ctr"/>
      <a:lstStyle/>
      <a:p>
        <a:pPr algn="ctr"/>
        <a:endParaRPr lang="en-US"/>
      </a:p>
    </p:txBody>
  </p:sp>
  <p:sp>
    <p:nvSpPr>
      <p:cNvPr id="4" name="Isosceles Triangle 3"/>
      <p:cNvSpPr/>
      <p:nvPr/>
    </p:nvSpPr>
    <p:spPr>
      <a:xfrm>
        <a:off x="4355976" y="4221088"/>
        <a:ext cx="1060704" cy="914400"/>
      </a:xfrm>
      <a:prstGeom prst="triangle">
        <a:avLst/>
      </a:prstGeom>
    </p:spPr>
    <p:style>
      <a:lnRef idx="1">
        <a:schemeClr val="accent1"/>
      </a:lnRef>
      <a:fillRef idx="3">
        <a:schemeClr val="accent1"/>
      </a:fillRef>
      <a:effectRef idx="2">
        <a:schemeClr val="accent1"/>
      </a:effectRef>
      <a:fontRef idx="minor">
        <a:schemeClr val="lt1"/>
      </a:fontRef>
    </p:style>
    <p:txBody>
      <a:bodyPr rtlCol="0" anchor="ctr"/>
      <a:lstStyle/>
      <a:p>
        <a:pPr algn="ctr"/>
        <a:endParaRPr lang="en-US"/>
      </a:p>
    </p:txBody>
  </p:sp>
</p:grpSp>