コード例 #1
0
 public static OXmlElement CreatePicture(BsonDocument document)
 {
     OXmlPictureElement picture = new OXmlPictureElement();
     picture.File = document.zGet("File").zAsString();
     picture.Name = document.zGet("Name").zAsString();
     picture.Description = document.zGet("Description").zAsString();
     picture.Width = document.zGet("Width").zAsNullableInt();
     picture.Height = document.zGet("Height").zAsNullableInt();
     picture.Rotation = document.zGet("Rotation").zAsInt();
     picture.HorizontalFlip = document.zGet("HorizontalFlip").zAsBoolean();
     picture.VerticalFlip = document.zGet("VerticalFlip").zAsBoolean();
     //picture.CompressionState = GetCompressionState(element.zGet("Description").zAsString());
     picture.CompressionState = document.zGet("CompressionState").zAsString().zTryParseEnum(A.BlipCompressionValues.Print);
     picture.PresetShape = document.zGet("PresetShape").zAsString().zTryParseEnum(A.ShapeTypeValues.Rectangle);
     picture.PictureDrawing = CreatePictureDrawing(document);
     return picture;
 }
コード例 #2
0
ファイル: OXmlDoc.cs プロジェクト: labeuze/source
 public static OpenXmlCompositeElement Create(MainDocumentPart mainPart, OXmlPictureElement pictureElement, uint pictureId)
 {
     return new OXmlPicture(mainPart, pictureElement, pictureId)._Create();
 }
コード例 #3
0
ファイル: OXmlDoc.cs プロジェクト: labeuze/source
 private OXmlPicture(MainDocumentPart mainPart, OXmlPictureElement pictureElement, uint pictureId)
 {
     _mainPart = mainPart;
     _pictureElement = pictureElement;
     _id = pictureId;
     _file = pictureElement.File;
     _width = pictureElement.Width;
     _height = pictureElement.Height;
     _pictureDrawing = pictureElement.PictureDrawing;
 }
コード例 #4
0
ファイル: OXmlDoc.cs プロジェクト: labeuze/source
        private void AddPicture(OXmlPictureElement element)
        {
            //if (_paragraph == null)
            //    AddParagraph();
            AddRun();

            // Drawing : child Inline, Anchor
            // <w:drawing>
            _run.AppendChild(new Drawing(OXmlPicture.Create(_mainPart, element, ++_pictureId)));
        }