예제 #1
0
        // Generate a trigger shape directly in the center bottom position of the specified callout shape.
        public static PowerPoint.Shape GenerateTriggerShapeWithReferenceCallout(PowerPointSlide currentSlide, PowerPoint.Shape callout)
        {
            float left = ShapeUtil.GetCenterPoint(callout).X - TooltipsLabConstants.TriggerShapeDefaultWidth / 2;
            float top  = ShapeUtil.GetBottom(callout) + TooltipsLabConstants.TriggerShapeAndCalloutSpacing;

            PowerPoint.Shape triggerShape = currentSlide.Shapes.AddShape(
                TooltipsLabConstants.TriggerShape,
                left,
                top,
                TooltipsLabConstants.TriggerShapeDefaultWidth,
                TooltipsLabConstants.TriggerShapeDefaultHeight);
            ShapeUtil.FormatTriggerShapeToDefaultStyle(triggerShape);

            return(triggerShape);
        }