Scribus
Open source desktop publishing at your fingertips
objimageexport.h
1 /*
2 For general Scribus (>=1.3.2) copyright and licensing information please refer
3 to the COPYING file provided with the program. Following this notice may exist
4 a copyright and/or license notice that predates the release of Scribus 1.3.2
5 for which a new license (GPL+exception) is in place.
6 */
7 #ifndef OBJIMGEXPORT_H
8 #define OBJIMGEXPORT_H
9 
10 // Pulls in <Python.h> first
11 #include "cmdvar.h"
12 
13 extern PyTypeObject ImageExport_Type;
14 
15 // docstrings
16 PyDoc_STRVAR(imgexp__doc__,"Image export\n\
17 \n\
18 Class ImageExport() provides the bitmap graphics exporting\n\
19 for Python scripting as you know it from Export/Save as Image\n\
20 menu. See related class PDFfile() and procedure savePageAsEPS().\n\
21 Example:\n\
22 i = ImageExport()\n\
23 i.type = 'PNG' # select one from i.allTypes list\n\
24 i.scale = 200 # I want to have 200%\n\
25 i.name = '/home/subik/test.png'\n\
26 i.save()\n\
27 \n\
28 two last lines should be replaced with:\n\
29 i.saveAs('/home/subik/test.png')");
30 
31 PyDoc_STRVAR(imgexp_dpi__doc__, "This value will be used for export as DPI. Read/write integer.");
32 PyDoc_STRVAR(imgexp_scale__doc__, "This is the scaling of the image. 100 = 100% etc. Read/write iteger.");
33 PyDoc_STRVAR(imgexp_quality__doc__, "Quality/compression: minimum 1 (poor), maximum 100 (qaulity). Read/write integer.");
34 PyDoc_STRVAR(imgexp_filename__doc__, "Filename of the image. With or without path. Read/write string.");
35 PyDoc_STRVAR(imgexp_type__doc__, "Bitmap type. See allTypes list for more info. Read/write string.");
36 PyDoc_STRVAR(imgexp_alltypes__doc__, "Available types. Read only list of strings.");
37 
38 PyDoc_STRVAR(imgexp_save__doc__, "save() -> boolean\n\nSaves image under previously set 'name'.");
39 PyDoc_STRVAR(imgexp_saveas__doc__, "saveAs('filename') -> boolean\n\nSaves image as 'filename'.");
40 
41 // Nest items are not needed but are here for me to exercise
42 // writing complete python objects
43 
44 #define ImageExport_Check(op) ((op)->ob_type == &ImageExport_Type)
45 
46 #endif /* OBJIMGEXPORT_H */