util Module

Utility functions and classes.

class pptx.util.Length(emu)[源代码]

基类:int

Base class for length classes Inches, Emu, Cm, Mm, Pt, and Px. Provides properties for converting length values to convenient units.

property inches

Floating point length in inches

property centipoints

Integer length in hundredths of a point (1/7200 inch). Used internally because PowerPoint stores font size in centipoints.

property cm

Floating point length in centimeters

property emu

Integer length in English Metric Units

property mm

Floating point length in millimeters

property pt

Floating point length in points

class pptx.util.Inches(inches)[源代码]

基类:pptx.util.Length

Convenience constructor for length in inches

class pptx.util.Centipoints(centipoints)[源代码]

基类:pptx.util.Length

Convenience constructor for length in hundredths of a point

class pptx.util.Cm(cm)[源代码]

基类:pptx.util.Length

Convenience constructor for length in centimeters

class pptx.util.Emu(emu)[源代码]

基类:pptx.util.Length

Convenience constructor for length in english metric units

class pptx.util.Mm(mm)[源代码]

基类:pptx.util.Length

Convenience constructor for length in millimeters

class pptx.util.Pt(points)[源代码]

基类:pptx.util.Length

Convenience value class for specifying a length in points