Back to index

scribus-ng  1.3.4.dfsg+svn20071115
cmdcolor.h
Go to the documentation of this file.
00001 /*
00002 For general Scribus (>=1.3.2) copyright and licensing information please refer
00003 to the COPYING file provided with the program. Following this notice may exist
00004 a copyright and/or license notice that predates the release of Scribus 1.3.2
00005 for which a new license (GPL+exception) is in place.
00006 */
00007 #ifndef CMDCOLOR_H
00008 #define CMDCOLOR_H
00009 
00010 // Pulls in <Python.h> first
00011 #include "cmdvar.h"
00012 
00016 PyDoc_STRVAR(scribus_colornames__doc__,
00017 QT_TR_NOOP("getColorNames() -> list\n\
00018 \n\
00019 Returns a list containing the names of all defined colors in the document.\n\
00020 If no document is open, returns a list of the default document colors.\n\
00021 "));
00023 PyObject *scribus_colornames(PyObject */*self*/);
00024 
00026 PyDoc_STRVAR(scribus_getcolor__doc__,
00027 QT_TR_NOOP("getColor(\"name\") -> tuple\n\
00028 \n\
00029 Returns a tuple (C, M, Y, K) containing the four color components of the\n\
00030 color \"name\" from the current document. If no document is open, returns\n\
00031 the value of the named color from the default document colors.\n\
00032 \n\
00033 May raise NotFoundError if the named color wasn't found.\n\
00034 May raise ValueError if an invalid color name is specified.\n\
00035 "));
00037 PyObject *scribus_getcolor(PyObject */*self*/, PyObject* args);
00038 
00040 PyDoc_STRVAR(scribus_getcolorasrgb__doc__,
00041 QT_TR_NOOP("getColorAsRGB(\"name\") -> tuple\n\
00042 \n\
00043 Returns a tuple (R,G,B) containing the three color components of the\n\
00044 color \"name\" from the current document, converted to the RGB color\n\
00045 space. If no document is open, returns the value of the named color\n\
00046 from the default document colors.\n\
00047 \n\
00048 May raise NotFoundError if the named color wasn't found.\n\
00049 May raise ValueError if an invalid color name is specified.\n\
00050 "));
00052 PyObject *scribus_getcolorasrgb(PyObject */*self*/, PyObject* args);
00053 
00055 PyDoc_STRVAR(scribus_setcolor__doc__,
00056 QT_TR_NOOP("changeColor(\"name\", c, m, y, k)\n\
00057 \n\
00058 Changes the color \"name\" to the specified CMYK value. The color value is\n\
00059 defined via four components c = Cyan, m = Magenta, y = Yellow and k = Black.\n\
00060 Color components should be in the range from 0 to 255.\n\
00061 \n\
00062 May raise NotFoundError if the named color wasn't found.\n\
00063 May raise ValueError if an invalid color name is specified.\n\
00064 "));
00066 PyObject *scribus_setcolor(PyObject */*self*/, PyObject* args);
00067 
00069 PyDoc_STRVAR(scribus_newcolor__doc__,
00070 QT_TR_NOOP("defineColor(\"name\", c, m, y, k)\n\
00071 \n\
00072 Defines a new color \"name\". The color Value is defined via four components:\n\
00073 c = Cyan, m = Magenta, y = Yellow and k = Black. Color components should be in\n\
00074 the range from 0 to 255.\n\
00075 \n\
00076 May raise ValueError if an invalid color name is specified.\n\
00077 "));
00079 PyObject *scribus_newcolor(PyObject */*self*/, PyObject* args);
00080 
00082 PyDoc_STRVAR(scribus_delcolor__doc__,
00083 QT_TR_NOOP("deleteColor(\"name\", \"replace\")\n\
00084 \n\
00085 Deletes the color \"name\". Every occurence of that color is replaced by the\n\
00086 color \"replace\". If not specified, \"replace\" defaults to the color\n\
00087 \"None\" - transparent.\n\
00088 \n\
00089 deleteColor works on the default document colors if there is no document open.\n\
00090 In that case, \"replace\", if specified, has no effect.\n\
00091 \n\
00092 May raise NotFoundError if a named color wasn't found.\n\
00093 May raise ValueError if an invalid color name is specified.\n\
00094 "));
00096 PyObject *scribus_delcolor(PyObject */*self*/, PyObject* args);
00097 
00099 PyDoc_STRVAR(scribus_replcolor__doc__,
00100 QT_TR_NOOP("replaceColor(\"name\", \"replace\")\n\
00101 \n\
00102 Every occurence of the color \"name\" is replaced by the color \"replace\".\n\
00103 \n\
00104 May raise NotFoundError if a named color wasn't found.\n\
00105 May raise ValueError if an invalid color name is specified.\n\
00106 "));
00108 PyObject *scribus_replcolor(PyObject */*self*/, PyObject* args);
00109 
00110 #endif
00111