123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- using DocumentFormat.OpenXml;
- using DocumentFormat.OpenXml.Drawing;
- using DocumentFormat.OpenXml.Drawing.Diagrams;
- using DocumentFormat.OpenXml.Packaging;
- using DocumentFormat.OpenXml.Presentation;
- using HTEXLib.Helpers.ShapeHelpers;
- using HTEXLib.Models.Inner;
- using System;
- using System.Collections.Generic;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- namespace HTEXLib.Models.HTEX
- {
- public class HtexGraphicFrame : HtexElement
- {
- public HtexGraphicFrame(string id, double rot, double width, double height,
- double top, double left, bool invisible,
- bool animatable, int index, Inner.PPTGraphicFrame graphicFrame, PPTSlide slide, string partForm)
- // frameId, width, height, top, left, visible, animatable
- {
- base.slide = slide;
- this.rot = rot;
- this.graphicFrame = graphicFrame;
- 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 = "GraphicFrame";
- base.partForm = partForm;
- }
- public Inner.PPTGraphicFrame graphicFrame { get; set; }
- public override List<Item> DrawElement()
- {
- var GraphicDataChildren = graphicFrame.element.Graphic.GraphicData.ChildElements;
-
- foreach (var clild in GraphicDataChildren) {
- if (clild is DocumentFormat.OpenXml.Drawing.Table Table) {
- HtexTable table = new HtexTable(id,rot,width,height,top,left,invisible,animatable,index,Table,slide,partForm);
- return table.DrawElement();
- }
- if (clild is DocumentFormat.OpenXml.Drawing.Charts.ChartReference Chart)
- {
- HtexChart chart = new HtexChart(id, rot, width, height, top, left, invisible, animatable, index, Chart, slide, partForm);
- return chart.DrawElement();
- }
- if (clild is DocumentFormat.OpenXml.Drawing.Diagrams.RelationshipIds Diagram)
- {
- HtexDiagram diagram = new HtexDiagram(id, rot, width, height, top, left, invisible, animatable, index, Diagram, slide, partForm);
- return diagram.DrawElement();
- }
- }
- return null;
- }
-
-
-
- }
- }
|