| Home | Trees | Indices | Help |
|
|---|
|
|
'fig' module - object-oriented interface to XFig files.
You can read fig files into a File object 'f' with:
import fig f = fig.File(filename) # or pass a file-like object
Author: Hans Meine <hans_meine@gmx.net>
| Classes | |
| Vector | |
|
Rect This is a simple, half-internal helper class for handling Rectangles (e.g. |
|
| CustomColor | |
|
Object Base class of all fig objects. |
|
|
Arrow Arrow objects store arrow parameters of other objects. |
|
|
ArcBase Base class of Arc-like objects (PieArc, OpenArc). |
|
|
PieArc Represents a closed arc object. |
|
|
OpenArc Represents an open arc object. |
|
|
EllipseBase Base class of Ellipse-like objects (Ellipse, Circle). |
|
|
Ellipse Represents an ellipse object. |
|
|
Circle Represents a circle object. |
|
|
PolylineBase Base class of Polygon-like objects (Polygon, Polyline, PictureBBox). |
|
|
PolyBox Represents a rectangular closed box object. |
|
|
ArcBox Represents a rectangular box with rounded corners. |
|
|
Polygon Represents a closed polygon object. |
|
|
Polyline Represents an open polygon object. |
|
|
PictureBBox Represents a picture embedded in an XFig file. |
|
|
SplineBase Base class of Spline objects (ApproximatedSpline, InterpolatedSpline, XSpline). |
|
|
ApproximatedSpline Represents an open or closed approximated spline object. |
|
|
InterpolatedSpline Represents an open or closed interpolated spline object. |
|
|
XSpline Represents an open or closed 'x-spline' object. |
|
|
Text Represents a text object. |
|
|
Container Container for fig objects, derived from the standard python list. |
|
|
ObjectProxy An ObjectProxy is a special Container that is used for search results (see Container.findObjects) which offers two additional features: |
|
|
Compound Represents a group of XFig objects. |
|
|
File Main class of the fig module, represents an XFig document. |
|
| Functions | |||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
| Variables | |
__version__ =
|
|
standardColors = Mapping of the standard colors to RGB triples. |
|
paperSizes = Valid paper sizes, cf. |
|
unitCM = 450fig units per centimeter (used for positions, radii, ...) |
|
| polygon type constants (cf. `PolylineBase.changeType()`) | |
|---|---|
ptPolyline = 1
|
|
ptBox = 2
|
|
ptPolygon = 3
|
|
ptArcBox = 4
|
|
ptPictureBBox = 5
|
|
| ellipse type constants (cf. `EllipseBase.changeType()`) | |
etEllipseRadii = 1
|
|
etEllipseDiameter = 2
|
|
etCircleRadius = 3
|
|
etCircleDiameter = 4
|
|
| spline type constants (cf. `SplineBase.changeType()`) | |
stOpenApproximated = 0
|
|
stClosedApproximated = 1
|
|
stOpenInterpolated = 2
|
|
stClosedInterpolated = 3
|
|
stOpenXSpline = 4
|
|
stClosedXSpline = 5
|
|
| arc type constants (cf. `ArcBase.changeType()`) | |
atOpen = 1
|
|
atPie = 2
|
|
| arc directions (cf. ArcBase.direction property) | |
adClockwise = 0
|
|
adCounterClockwise = 1
|
|
| fill style constants (cf. `Object.fillStyle` property) | |
fillStyleNone = -1
|
|
fillStyleBlack = 0
|
|
fillStyleSolid = 20
|
|
fillStyleWhite = 40
|
|
fillStyleStripes = 42obsolete, use fillStyleRight30 instead |
|
fillStyleLeft30 = 4130 degree left diagonal pattern |
|
fillStyleRight30 = 4230 degree right diagonal pattern |
|
fillStyleCrossed30 = 4430 degree cross-hatched pattern |
|
fillStyleLeft45 = 4445 degree left diagonal pattern |
|
fillStyleRight45 = 4545 degree right diagonal pattern |
|
fillStyleCrossed45 = 4645 degree cross-hatched pattern |
|
fillStyleBricks = 47bricks pattern |
|
fillStyleCircles = 48circles pattern |
|
fillStyleHorizontalLines = 49horizontal lines pattern |
|
fillStyleVerticalLines = 50vertical lines pattern |
|
fillStyleCrosshatch = 51crosshatch pattern |
|
fillStyleFishScales = 52fish scales pattern |
|
fillStyleSmallFishScales = 53small fish scales pattern |
|
fillStyleOctagons = 54octagons pattern |
|
fillStyleHorizontalTireTreads = 55horizontal "tire treads" pattern |
|
fillStyleVerticalTireTreads = 56vertical "tire treads" pattern |
|
| arrow type constants | |
arStick = 0stick-type, three-stroke arrow head (default in xfig 2.1 and earlier) |
|
arClosed = 1closed triangle |
|
arClosedIndented = 2closed with 'indented' butt |
|
arClosedPointed = 3closed with 'pointed' butt |
|
| arrow style constants | |
asHollow = 0filled with white |
|
asFilled = 1filled with penColor |
|
| line style constants (cf. `Object.lineStyle` property) | |
lineStyleDefault = -1
|
|
lineStyleSolid = 0
|
|
lineStyleDashed = 1
|
|
lineStyleDotted = 2
|
|
lineStyleDashDotted = 3
|
|
lineStyleDashDoubleDotted = 4
|
|
lineStyleDashTripleDotted = 5
|
|
| cap style constants (cf. `Object.capStyle` property) | |
capStyleButt = 0
|
|
capStyleRound = 1
|
|
capStyleProjecting = 2
|
|
| color constants (cf. `Object.penColor` and `Object.fillColor` properties) | |
colorDefault = -1
|
|
colorBlack = 0
|
|
colorBlue = 1
|
|
colorGreen = 2
|
|
colorCyan = 3
|
|
colorRed = 4
|
|
colorMagenta = 5
|
|
colorYellow = 6
|
|
colorWhite = 7
|
|
colorBlue4 = 8
|
|
colorBlue3 = 9
|
|
colorBlue2 = 10
|
|
colorLightBlue = 11
|
|
colorGreen4 = 12
|
|
colorGreen3 = 13
|
|
colorGreen2 = 14
|
|
colorCyan4 = 15
|
|
colorCyan3 = 16
|
|
colorCyan2 = 17
|
|
colorRed4 = 18
|
|
colorRed3 = 19
|
|
colorRed2 = 20
|
|
colorMagenta4 = 21
|
|
colorMagenta3 = 22
|
|
colorMagenta2 = 23
|
|
colorBrown4 = 24
|
|
colorBrown3 = 25
|
|
colorBrown2 = 26
|
|
colorPink4 = 27
|
|
colorPink3 = 28
|
|
colorPink2 = 29
|
|
colorLightPink = 30
|
|
colorGold = 31
|
|
colorCustom0 = 32
|
|
| join style constants (cf. `Object.joinStyle` property) | |
joinStyleMiter = 0
|
|
joinStyleRound = 1
|
|
joinStyleBevel = 2
|
|
| alignment constants (cf. `Text.alignment` property) | |
alignLeft = 0
|
|
alignCentered = 1
|
|
alignRight = 2
|
|
| PS font constants (cf. `Text.font` property, only valid if `Text.fontFlags` & ffPostScript) | |
fontDefault = -1
|
|
fontTimesRoman = 0
|
|
fontTimesItalic = 1
|
|
fontTimesBold = 2
|
|
fontTimesBoldItalic = 3
|
|
fontAvantGardeBook = 4
|
|
fontAvantGardeBookOblique = 5
|
|
fontAvantGardeDemi = 6
|
|
fontAvantGardeDemiOblique = 7
|
|
fontBookmanLight = 8
|
|
fontBookmanLightItalic = 9
|
|
fontBookmanDemi = 10
|
|
fontBookmanDemiItalic = 11
|
|
fontCourier = 12
|
|
fontCourierOblique = 13
|
|
fontCourierBold = 14
|
|
fontCourierBoldOblique = 15
|
|
fontHelvetica = 16
|
|
fontHelveticaOblique = 17
|
|
fontHelveticaBold = 18
|
|
fontHelveticaBoldOblique = 19
|
|
fontHelveticaNarrow = 20
|
|
fontHelveticaNarrowOblique = 21
|
|
fontHelveticaNarrowBold = 22
|
|
fontHelveticaNarrowBoldOblique = 23
|
|
fontNewCenturySchoolbookRoman = 24
|
|
fontNewCenturySchoolbookItalic = 25
|
|
fontNewCenturySchoolbookBold = 26
|
|
fontNewCenturySchoolbookBoldItalic = 27
|
|
fontPalatinoRoman = 28
|
|
fontPalatinoItalic = 29
|
|
fontPalatinoBold = 30
|
|
fontPalatinoBoldItalic = 31
|
|
fontSymbol = 32
|
|
fontZapfChanceryMediumItalic = 33
|
|
fontZapfDingbats = 34
|
|
| font flag constants (cf. `Text.fontFlags` property) | |
ffRigid = 1
|
|
ffSpecial = 2
|
|
ffPostScript = 4
|
|
ffHidden = 8
|
|
| Function Details |
Convenience function for parsing geometry strings of various formats. Example usage: >>> import fig >>> fig.parseGeometry("320,240-640,480") fig.Rect(320,240,640,480) >>> fig.parseGeometry("50,50+50,50") fig.Rect(50,50,100,100) >>> fig.parseGeometry("40,40,320,240") fig.Rect(40,40,320,240) >>> r = fig.Rect(0,0,320,240) >>> fig.parseGeometry(str(r)) == r True |
| Variables Details |
standardColorsMapping of the standard colors to RGB triples.
|
paperSizesValid paper sizes, cf. File.paperSize.
|
| Home | Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0beta1 on Tue Aug 28 16:31:13 2007 | http://epydoc.sourceforge.net |