Changeset View
Changeset View
Standalone View
Standalone View
libs/libkis/Document.h
Show All 17 Lines | |||||
18 | #ifndef LIBKIS_DOCUMENT_H | 18 | #ifndef LIBKIS_DOCUMENT_H | ||
19 | #define LIBKIS_DOCUMENT_H | 19 | #define LIBKIS_DOCUMENT_H | ||
20 | 20 | | |||
21 | #include <QObject> | 21 | #include <QObject> | ||
22 | 22 | | |||
23 | #include "kritalibkis_export.h" | 23 | #include "kritalibkis_export.h" | ||
24 | #include "libkis.h" | 24 | #include "libkis.h" | ||
25 | 25 | | |||
26 | #include "GroupLayer.h" | ||||
27 | #include "CloneLayer.h" | ||||
28 | #include "FileLayer.h" | ||||
29 | #include "FilterLayer.h" | ||||
30 | #include "FillLayer.h" | ||||
31 | #include "VectorLayer.h" | ||||
32 | #include "FilterMask.h" | ||||
33 | #include "SelectionMask.h" | ||||
34 | | ||||
26 | class KisDocument; | 35 | class KisDocument; | ||
27 | 36 | | |||
28 | /** | 37 | /** | ||
29 | * The Document class encapsulates a Krita Document/Image. A Krita document is an Image with | 38 | * The Document class encapsulates a Krita Document/Image. A Krita document is an Image with | ||
30 | * a filename. Libkis does not differentiate between a document and an image, like Krita does | 39 | * a filename. Libkis does not differentiate between a document and an image, like Krita does | ||
31 | * internally. | 40 | * internally. | ||
32 | */ | 41 | */ | ||
33 | class KRITALIBKIS_EXPORT Document : public QObject | 42 | class KRITALIBKIS_EXPORT Document : public QObject | ||
▲ Show 20 Lines • Show All 493 Lines • ▼ Show 20 Line(s) | 495 | void shearImage(double angleX, double angleY); | |||
527 | * that can be changed with Node::setColorSpace. | 536 | * that can be changed with Node::setColorSpace. | ||
528 | * | 537 | * | ||
529 | * The settings and selections for relevant layer and mask types can also be set | 538 | * The settings and selections for relevant layer and mask types can also be set | ||
530 | * after the Node has been created. | 539 | * after the Node has been created. | ||
531 | * | 540 | * | ||
532 | * @return the new Node. | 541 | * @return the new Node. | ||
533 | */ | 542 | */ | ||
534 | Node* createNode(const QString &name, const QString &nodeType); | 543 | Node* createNode(const QString &name, const QString &nodeType); | ||
544 | /** | ||||
545 | * @brief createGroupLayer | ||||
546 | * Returns a grouplayer object. Grouplayers are nodes that can have | ||||
547 | * other layers as children and have the passthrough mode. | ||||
548 | * @param name the name of the layer. | ||||
549 | * @return a GroupLayer object. | ||||
550 | */ | ||||
551 | GroupLayer* createGroupLayer(const QString &name); | ||||
552 | /** | ||||
553 | * @brief createFileLayer returns a layer that shows an external image. | ||||
554 | * @param name name of the file layer. | ||||
555 | * @param FileName the absolute filename of the file referenced. Symlinks will be resolved. | ||||
556 | * @param ScalingMethod how the dimensions of the file are interpreted | ||||
557 | * can be either "None", "ImageToSize" or "ImageToPPI" | ||||
558 | * @return a FileLayer | ||||
559 | */ | ||||
560 | FileLayer* createFileLayer(const QString &name, const QString FileName, const QString ScalingMethod); | ||||
561 | | ||||
562 | /** | ||||
563 | * @brief createFilterLayer creates a filter layer, which is a layer that represents a filter | ||||
564 | * applied non-destructively. | ||||
565 | * @param name name of the filterLayer | ||||
566 | * @param filter the filter that this filter layer will us. | ||||
567 | * @param selection the selection. | ||||
568 | * @return a filter layer object. | ||||
569 | */ | ||||
570 | FilterLayer* createFilterLayer(const QString &name, Filter &filter, Selection &selection); | ||||
571 | | ||||
572 | /** | ||||
573 | * @brief createFillLayer creates a fill layer object, which is a layer | ||||
574 | * @param name | ||||
575 | * @param filterName - name of the generation filter. | ||||
576 | * @param configuration - the configuration for the generation filter. | ||||
577 | * @param selection - the selection. | ||||
578 | * @return a filllayer object. | ||||
579 | */ | ||||
580 | FillLayer* createFillLayer(const QString &name, const QString filterName, InfoObject &configuration, Selection &selection); | ||||
581 | | ||||
582 | /** | ||||
583 | * @brief createCloneLayer | ||||
584 | * @param name | ||||
585 | * @param source | ||||
586 | * @return | ||||
587 | */ | ||||
588 | CloneLayer* createCloneLayer(const QString &name, const Node* source); | ||||
589 | | ||||
590 | /** | ||||
591 | * @brief createVectorLayer | ||||
592 | * Creates a vector layer that can contain vector shapes. | ||||
593 | * @param name the name of this layer. | ||||
594 | * @return a VectorLayer. | ||||
595 | */ | ||||
596 | VectorLayer* createVectorLayer(const QString &name); | ||||
597 | | ||||
598 | /** | ||||
599 | * @brief createFilterMask | ||||
600 | * Creates a filter mask object that much like a filterlayer can apply a filter non-destructively. | ||||
601 | * @param name the name of the layer. | ||||
602 | * @param filter the filter assigned. | ||||
603 | * @return a FilterMask | ||||
604 | */ | ||||
605 | FilterMask* createFilterMask(const QString &name, Filter &filter); | ||||
606 | | ||||
607 | /** | ||||
608 | * @brief createSelectionMask | ||||
609 | * Creates a selection mask, which can be used to store selections. | ||||
610 | * @param name - the name of the layer. | ||||
611 | * @return a SelectionMask | ||||
612 | */ | ||||
613 | SelectionMask* createSelectionMask(const QString &name); | ||||
614 | | ||||
535 | 615 | | |||
536 | /** | 616 | /** | ||
537 | * @brief projection creates a QImage from the rendered image or | 617 | * @brief projection creates a QImage from the rendered image or | ||
538 | * a cutout rectangle. | 618 | * a cutout rectangle. | ||
539 | */ | 619 | */ | ||
540 | QImage projection(int x = 0, int y = 0, int w = 0, int h = 0) const; | 620 | QImage projection(int x = 0, int y = 0, int w = 0, int h = 0) const; | ||
541 | 621 | | |||
542 | /** | 622 | /** | ||
▲ Show 20 Lines • Show All 86 Lines • Show Last 20 Lines |