Back to index

scribus-ng  1.3.4.dfsg+svn20071115
Functions
legende Namespace Reference

Functions

def main

Function Documentation

def legende.main ( )

Definition at line 17 of file legende.py.

00017 
00018 def main():
00019     userUnit = getUnit()
00020     setUnit(1)
00021     sel_count = selectionCount()
00022 
00023     if sel_count == 0:
00024         messageBox("legende.py",
00025                 "Please select the object to add a caption to before running this script.",
00026                 ICON_INFORMATION)
00027         sys.exit(1)
00028 
00029     x,y = getPosition()
00030     l,h = getSize()
00031     texte = getImageFile()
00032     image = os.path.basename(texte)
00033     a = createText(x,y+h+2,l,8)
00034     insertText(image,0,a)
00035     setTextAlignment(2,a)
00036     setFontSize(7,a)
00037     setUnit(userUnit)