Changeset View
Changeset View
Standalone View
Standalone View
libs/image/tests/kis_image_test.cpp
Show First 20 Lines • Show All 997 Lines • ▼ Show 20 Line(s) | |||||
998 | { | 998 | { | ||
999 | FlattenTestImage p; | 999 | FlattenTestImage p; | ||
1000 | KisImageSP image = p.image; | 1000 | KisImageSP image = p.image; | ||
1001 | 1001 | | |||
1002 | TestUtil::ReferenceImageChecker img("flatten", "imagetest"); | 1002 | TestUtil::ReferenceImageChecker img("flatten", "imagetest"); | ||
1003 | 1003 | | |||
1004 | { | 1004 | { | ||
1005 | KisLayerUtils::flattenImage(p.image, 0); | 1005 | KisLayerUtils::flattenImage(p.image, 0); | ||
1006 | p.image->waitForDone(); | ||||
1007 | QVERIFY(img.checkDevice(p.image->projection(), p.image, "00_initial")); | ||||
1008 | | ||||
1009 | p.undoStore->undo(); | ||||
1010 | p.image->waitForDone(); | ||||
1011 | | ||||
1012 | QVERIFY(img.checkDevice(p.image->projection(), p.image, "00_initial")); | ||||
1013 | } | ||||
1014 | | ||||
1015 | { | ||||
1016 | KisLayerUtils::flattenImage(p.image, p.layer5); // flatten with active layer just under the root (not inside any group) | ||||
1017 | p.image->waitForDone(); | ||||
1018 | QVERIFY(img.checkDevice(p.image->projection(), p.image, "00_initial")); | ||||
1019 | | ||||
1020 | p.undoStore->undo(); | ||||
1021 | p.image->waitForDone(); | ||||
1022 | | ||||
1023 | QVERIFY(img.checkDevice(p.image->projection(), p.image, "00_initial")); | ||||
1024 | } | ||||
1025 | | ||||
1026 | { | ||||
1027 | KisLayerUtils::flattenImage(p.image, p.layer2); // flatten with active layer just under the root (not inside any group), but with a mask | ||||
1028 | p.image->waitForDone(); | ||||
1029 | QVERIFY(img.checkDevice(p.image->projection(), p.image, "00_initial")); | ||||
1030 | | ||||
1031 | p.undoStore->undo(); | ||||
1032 | p.image->waitForDone(); | ||||
1033 | | ||||
1034 | QVERIFY(img.checkDevice(p.image->projection(), p.image, "00_initial")); | ||||
1035 | } | ||||
1036 | | ||||
1037 | { | ||||
1038 | KisLayerUtils::flattenImage(p.image, p.layer3); // flatten with active layer inside of a group | ||||
1039 | p.image->waitForDone(); | ||||
1006 | QVERIFY(img.checkDevice(p.image->projection(), p.image, "00_initial")); | 1040 | QVERIFY(img.checkDevice(p.image->projection(), p.image, "00_initial")); | ||
1007 | 1041 | | |||
1008 | p.undoStore->undo(); | 1042 | p.undoStore->undo(); | ||
1009 | p.image->waitForDone(); | 1043 | p.image->waitForDone(); | ||
1010 | 1044 | | |||
1011 | QVERIFY(img.checkDevice(p.image->projection(), p.image, "00_initial")); | 1045 | QVERIFY(img.checkDevice(p.image->projection(), p.image, "00_initial")); | ||
1012 | } | 1046 | } | ||
1013 | } | 1047 | } | ||
▲ Show 20 Lines • Show All 194 Lines • Show Last 20 Lines |