图片 ======= Picture .. tab:: 中文 Word 允许将图片放置在图形对象容器中,可以是内联形状或浮动形状。 .. tab:: 英文 Word allows a picture to be placed in a graphical object container, either an inline shape or a floating shape. 候选协议 ------------------ Candidate protocol :: >>> run = paragraph.add_run() >>> inline_shape = run.add_picture(file_like_image, MIME_type=None) >>> inline_shape.width = width >>> inline_shape.height = height 最小 XML ----------- Minimal XML .. highlight:: xml .. tab:: 中文 此 XML 表示向文档添加工作图片所必须插入的最小 XML 的工作假设:: 必需参数: * 唯一的 DrawingML 对象 ID(文档范围,很确定只是部分) * 名称,如果是文件类对象,则为文件名或通用名称。 * 与图像部分相关的 rId * 大小(cx、cy) .. tab:: 英文 This XML represents the working hypothesis of the minimum XML that must be inserted to add a working picture to a document:: Required parameters: * unique DrawingML object id (document-wide, pretty sure it's just the part) * name, either filename or generic if file-like object. * rId for rel to image part * size (cx, cy) 样本 XML ------------ Specimen XML .. tab:: 中文 此 XML 表示在段落中以内嵌方式插入的图片 .. tab:: 英文 This XML represents a picture inserted inline on a paragraph by itself .. highlight:: xml :: 架构定义 ------------------ Schema definitions .. highlight:: xml ::