using HTEXLib.Helpers.ShapeHelpers; using System; using System.Collections.Generic; using System.Text; namespace HTEXLib.Models.HTEX { public class HtexGroupShape : HtexElement { public HtexGroupShape(string id, double rot, double width, double height, double top, double left, bool invisible, bool animatable, int index, Inner.PPTGroupShape groupShape, PPTSlide slide, string partForm, string timingId) { base.sid = timingId; base.slide = slide; this.rot = rot; this.groupShape = groupShape; base.id = id; base.top = top; base.left = left; base.width = width; base.height = height; base.invisible = invisible; base.animatable = animatable; base.index = index; base.type = "Group"; base.partForm = partForm; } public Inner.PPTGroupShape groupShape { get; set; } public override List DrawElement() { Position position = new Position { cx = width, cy = height, x = left, y = top, rot = rot }; var ShapeStyle = PPTXHelper.DoShapeProperties(groupShape.element.GroupShapeProperties, slide, type, partForm); Group group = new Group() { sid = sid,id = this.id, type = type, index = index, animatable = animatable, invisible = invisible }; group.style.border = ShapeStyle.border; group.style.fill = ShapeStyle.fill; group.style.position = position; group.uid = groupShape.suid; //SlideColor slideColor = PPTXHelper.DoShapeStyle(groupShape.element.ShapeStyle, slide, type); HtexSlide htexSlide = new HtexSlide(slide, slide.slideIndex) { ContainerShape = groupShape.containerShape, FromGroup = true }; var elements= htexSlide.DrawElement(); if (elements != null) { group.shapes = elements; } return new List() { group }; } } }