Krita
Document.h
157 * @brief setColorProfile set the color profile of the image to the given profile. The profile has to
158 * be registered with krita and be compatible with the current color model and depth; the image data
161 * @return false if the colorProfile name does not correspond to to a registered profile or if assigning
167 * @brief setColorSpace convert the nodes and the image to the given colorspace. The conversion is
168 * done with Perceptual as intent, High Quality and No LCMS Optimizations as flags and no blackpoint
191 bool setColorSpace(const QString &colorModel, const QString &colorDepth, const QString &colorProfile);
202 * @brief setBackgroundColor sets the background color of the document. It will trigger a projection
212 * @return a string containing a valid XML document with the right information about the document
219 * <!DOCTYPE document-info PUBLIC '-//KDE//DTD document-info 1.1//EN' 'http://www.calligra.org/DTD/document-info-1.1.dtd'>
257 * @param document A string containing a valid XML document that conforms to the document-info DTD
280 * @brief setHeight resize the document to @param value height. This is a canvas resize, not a scale.
290 * @brief setName sets the name of the document to @p value. This is the title field in the @ref documentInfo
329 * @brief setWidth resize the document to @param value width. This is a canvas resize, not a scale.
402 * and the struct module to interpret the data and construct, for instance, a Pillow Image object.
495 * @param strategy the scaling strategy. There's several ones amongst these that aren't available in the regular UI.
499 * <li>Bicubic - Adds pixels using the color of surrounding pixels. Produces smoother tonal gradations than Bilinear.</li>
500 * <li>Box - Replicate pixels in the image. Preserves all the original detail, but can produce jagged effects.</li>
501 * <li>Bilinear - Adds pixels averaging the color values of surrounding pixels. Produces medium quality results when the image is scaled from half to two times the original size.</li>
504 * <li>Kanczos3 - Offers similar results than Bicubic, but maybe a little bit sharper. Can produce light and dark halos along strong edges.</li>
597 * can be "Bicubic", "Hermite", "NearestNeighbor", "Bilinear", "Bell", "BSpline", "Lanczos3", "Mitchell"
600 FileLayer* createFileLayer(const QString &name, const QString fileName, const QString scalingMethod, const QString scalingFilter = "Bicubic");
634 FillLayer* createFillLayer(const QString &name, const QString generatorName, InfoObject &configuration, Selection &selection);
654 * Creates a filter mask object that much like a filterlayer can apply a filter non-destructively.
664 * Creates a filter mask object that much like a filterlayer can apply a filter non-destructively.
670 FilterMask* createFilterMask(const QString &name, Filter &filter, const Node* selection_source);
804 * @param modified if true, the document is considered modified and closing it will ask for saving.
921 void setAnnotation(const QString &type, const QString &description, const QByteArray &annotation);
932 * It means that even when autosave is set to True, under condition Krita will not proceed to automatic save of document:
936 * Being able to deactivate autosave on a document can make sense when a plugin use internal document
The CloneLayer class A clone layer is a layer that takes a reference inside the image and shows the e...
Definition CloneLayer.h:26
The ColorizeMask class A colorize mask is a mask type node that can be used to color in line art.
Definition ColorizeMask.h:60
QImage projection(int x=0, int y=0, int w=0, int h=0) const
projection creates a QImage from the rendered image or a cutout rectangle.
Definition Document.cpp:801
Q_DECL_DEPRECATED bool guidesVisible() const
DEPRECATED - use guidesConfig() instead Returns guide visibility.
Definition Document.cpp:879
TransformMask * createTransformMask(const QString &name)
createTransformMask Creates a transform mask, which can be used to apply a transformation non-destruc...
Definition Document.cpp:783
Q_DECL_DEPRECATED void setGuidesLocked(bool locked)
DEPRECATED - use guidesConfig() instead set guides locked on this document.
Definition Document.cpp:946
void setGuidesConfig(GuidesConfig *guidesConfig)
Definition Document.cpp:1225
void setSelection(Selection *value)
setSelection set or replace the global selection
Definition Document.cpp:363
void setFullClipRangeStartTime(int startTime)
set start time of animation
Definition Document.cpp:1016
SelectionMask * createSelectionMask(const QString &name)
createSelectionMask Creates a selection mask, which can be used to store selections.
Definition Document.cpp:765
QList< Node * > topLevelNodes() const
toplevelNodes return a list with all top level nodes in the image graph
Definition Document.cpp:163
bool close()
close Close the document: remove it from Krita's internal list of documents and close all views.
Definition Document.cpp:488
bool modified() const
modified returns true if the document has unsaved modifications.
Definition Document.cpp:955
void setDocumentInfo(const QString &document)
setDocumentInfo set the Document information to the information contained in document
Definition Document.cpp:267
QImage thumbnail(int w, int h) const
thumbnail create a thumbnail of the given dimensions.
Definition Document.cpp:807
ColorizeMask * createColorizeMask(const QString &name)
createColorizeMask Creates a colorize mask, which can be used to color fill via keystrokes.
Definition Document.cpp:792
bool importAnimation(const QList< QString > &files, int firstFrame, int step)
Import an image sequence of files from a directory.
Definition Document.cpp:985
bool setBackgroundColor(const QColor &color)
setBackgroundColor sets the background color of the document.
Definition Document.cpp:245
void setActiveNode(Node *value)
setActiveNode make the given node active in the currently active view and window
Definition Document.cpp:138
Q_DECL_DEPRECATED void setHorizontalGuides(const QList< qreal > &lines)
DEPRECATED - use guidesConfig() instead replace all existing horizontal guides with the entries in th...
Definition Document.cpp:903
void resizeImage(int x, int y, int w, int h)
resizeImage resizes the canvas to the given left edge, top edge, width and height.
Definition Document.cpp:539
Node * rootNode() const
rootNode the root node is the invisible group layer that contains the entire node hierarchy.
Definition Document.cpp:346
QString colorModel() const
colorModel retrieve the current color model of this document:
Definition Document.cpp:198
bool setAudioTracks(const QList< QString > files) const
Set a list of audio tracks for document Note: the function allows to add more than one file while fro...
Definition Document.cpp:1296
bool saveAs(const QString &filename)
saveAs save the document under the filename.
Definition Document.cpp:599
void unlock()
Unlocks the image and starts/resumes all the pending internal jobs.
Definition Document.cpp:820
Node * activeNode() const
activeNode retrieve the node that is currently active in the currently active window
Definition Document.cpp:118
QStringList annotationTypes() const
annotationTypes returns the list of annotations present in the document.
Definition Document.cpp:1100
void rotateImage(double radians)
rotateImage Rotate the image by the given radians.
Definition Document.cpp:570
FillLayer * createFillLayer(const QString &name, const QString generatorName, InfoObject &configuration, Selection &selection)
createFillLayer creates a fill layer object, which is a layer
Definition Document.cpp:690
bool setColorProfile(const QString &colorProfile)
setColorProfile set the color profile of the image to the given profile.
Definition Document.cpp:210
void setPlayBackRange(int start, int stop)
set temporary playback range of document
Definition Document.cpp:1059
GuidesConfig * guidesConfig()
Returns a GuidesConfig guides configuration for current document.
Definition Document.cpp:1170
void scaleImage(int w, int h, int xres, int yres, QString strategy)
scaleImage
Definition Document.cpp:554
void setAudioLevel(const qreal level)
Set current audio level for document.
Definition Document.cpp:1282
void setAutosave(bool active)
Allow to activate/deactivate autosave for document When activated, it will use default Krita autosave...
Definition Document.cpp:1160
void setName(QString value)
setName sets the name of the document to value.
Definition Document.cpp:316
void setXRes(double xRes) const
setXRes set the horizontal resolution of the image to xRes in pixels per inch
Definition Document.cpp:440
CloneLayer * createCloneLayer(const QString &name, const Node *source)
createCloneLayer
Definition Document.cpp:709
bool setColorSpace(const QString &colorModel, const QString &colorDepth, const QString &colorProfile)
setColorSpace convert the nodes and the image to the given colorspace.
Definition Document.cpp:221
void removeAnnotation(const QString &type)
removeAnnotation remove the specified annotation from the image
Definition Document.cpp:1154
bool batchmode() const
Batchmode means that no actions on the document should show dialogs or popups.
Definition Document.cpp:106
void waitForDone()
Wait for all the internal image jobs to complete and return without locking the image.
Definition Document.cpp:826
Q_DECL_DEPRECATED void setGuidesVisible(bool visible)
DEPRECATED - use guidesConfig() instead set guides visible on this document.
Definition Document.cpp:937
void setModified(bool modified)
setModified sets the modified status of the document
Definition Document.cpp:961
Q_DECL_DEPRECATED QList< qreal > verticalGuides() const
DEPRECATED - use guidesConfig() instead The vertical guide lines.
Definition Document.cpp:863
void refreshProjection()
Starts a synchronous recomposition of the projection: everything will wait until the image is fully r...
Definition Document.cpp:839
Q_DECL_DEPRECATED bool guidesLocked() const
DEPRECATED - use guidesConfig() instead Returns guide lockedness.
Definition Document.cpp:885
QString documentInfo() const
documentInfo creates and XML document representing document and author information.
Definition Document.cpp:259
Node * nodeByUniqueID(const QUuid &id) const
nodeByUniqueID searches the node tree for a node with the given name and returns it.
Definition Document.cpp:181
VectorLayer * createVectorLayer(const QString &name)
createVectorLayer Creates a vector layer that can contain vector shapes.
Definition Document.cpp:719
Node * createNode(const QString &name, const QString &nodeType)
Definition Document.cpp:615
Q_DECL_DEPRECATED QList< qreal > horizontalGuides() const
DEPRECATED - use guidesConfig() instead The horizontal guides.
Definition Document.cpp:847
GridConfig * gridConfig()
Returns a GridConfig grid configuration for current document.
Definition Document.cpp:1263
Q_DECL_DEPRECATED void setVerticalGuides(const QList< qreal > &lines)
DEPRECATED - use guidesConfig() instead replace all existing horizontal guides with the entries in th...
Definition Document.cpp:920
bool tryBarrierLock()
Tries to lock the image without waiting for the jobs to finish.
Definition Document.cpp:833
QString colorDepth() const
colorDepth A string describing the color depth of the image:
Definition Document.cpp:192
void setYRes(double yRes) const
setYRes set the vertical resolution of the image to yRes in pixels per inch
Definition Document.cpp:460
void setFileName(QString value)
setFileName set the full path of the document to
Definition Document.cpp:283
FileLayer * createFileLayer(const QString &name, const QString fileName, const QString scalingMethod, const QString scalingFilter="Bicubic")
createFileLayer returns a layer that shows an external image.
Definition Document.cpp:672
TransparencyMask * createTransparencyMask(const QString &name)
createTransparencyMask Creates a transparency mask, which can be used to assign transparency to regio...
Definition Document.cpp:774
bool exportImage(const QString &filename, const InfoObject &exportConfiguration)
exportImage export the image, without changing its URL to the given path.
Definition Document.cpp:521
void setAnnotation(const QString &type, const QString &description, const QByteArray &annotation)
setAnnotation Add the given annotation to the document
Definition Document.cpp:1146
void crop(int x, int y, int w, int h)
crop the image to rectangle described by x, y, w and h
Definition Document.cpp:511
Selection * selection() const
selection Create a Selection object around the global selection, if there is one.
Definition Document.cpp:355
void setResolution(int value)
setResolution set the resolution of the image; this does not scale the image
Definition Document.cpp:332
QColor backgroundColor()
backgroundColor returns the current background color of the document.
Definition Document.cpp:236
QByteArray pixelData(int x, int y, int w, int h) const
pixelData reads the given rectangle from the image projection and returns it as a byte array.
Definition Document.cpp:474
void lock()
[low-level] Lock the image without waiting for all the internal job queues are processed
Definition Document.cpp:814
QString annotationDescription(const QString &type) const
annotationDescription gets the pretty description for the current annotation
Definition Document.cpp:1127
void shearImage(double angleX, double angleY)
shearImage shear the whole image.
Definition Document.cpp:579
FilterLayer * createFilterLayer(const QString &name, Filter &filter, Selection &selection)
createFilterLayer creates a filter layer, which is a layer that represents a filter applied non-destr...
Definition Document.cpp:681
Node * nodeByName(const QString &name) const
nodeByName searches the node tree for a node with the given name and returns it
Definition Document.cpp:171
QList< QString > audioTracks() const
Return a list of current audio tracks for document.
Definition Document.cpp:1287
FilterMask * createFilterMask(const QString &name, Filter &filter, Selection &selection)
createFilterMask Creates a filter mask object that much like a filterlayer can apply a filter non-des...
Definition Document.cpp:750
QByteArray annotation(const QString &type)
annotation the actual data for the annotation for this type.
Definition Document.cpp:1134
GroupLayer * createGroupLayer(const QString &name)
createGroupLayer Returns a grouplayer object.
Definition Document.cpp:663
The FileLayer class A file layer is a layer that can reference an external image and show said refere...
Definition FileLayer.h:27
The FillLayer class A fill layer is much like a filter layer in that it takes a name and filter.
Definition FillLayer.h:25
The FilterLayer class A filter layer will, when compositing, take the composited image up to the poin...
Definition FilterLayer.h:34
The FilterMask class A filter mask, unlike a filter layer, will add a non-destructive filter to the c...
Definition FilterMask.h:29
The GroupLayer class A group layer is a layer that can contain other layers.
Definition GroupLayer.h:30
The GuidesConfig class encapsulates a Krita Guides configuration.
Definition GuidesConfig.h:20
The SelectionMask class A selection mask is a mask type node that can be used to store selections.
Definition SelectionMask.h:27
The TransformMask class A transform mask is a mask type node that can be used to store transformation...
Definition TransformMask.h:23
The TransparencyMask class A transparency mask is a mask type node that can be used to show and hide ...
Definition TransparencyMask.h:24
void stop(Ekos::AlignState mode)
Q_SCRIPTABLE QString start(QString train="")
QObject(QObject *parent)
Q_OBJECTQ_OBJECT
Q_SLOTSQ_SLOTS
QObject * parent() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 31 2025 12:06:53 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 31 2025 12:06:53 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.