"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "gmic-qt/src/Host/Gimp/host_gimp.cpp" between
gmic_2.8.1.tar.gz and gmic_2.8.2.tar.gz

About: G’MIC (GREY’s Magic for Image Computing) is a framework for image processing. It provides several different user interfaces to convert/manipulate/filter/ visualize generic image datasets (usable standalone or as plug-in for GIMP and Krita).

host_gimp.cpp  (gmic_2.8.1):host_gimp.cpp  (gmic_2.8.2)
skipping to change at line 336 skipping to change at line 336
std::vector<int> layers; std::vector<int> layers;
switch (mode) { switch (mode) {
case GmicQt::NoInput: case GmicQt::NoInput:
break; break;
case GmicQt::Active: case GmicQt::Active:
if ((activeLayerID >= 0) && !gimp_item_is_group(activeLayerID)) { if ((activeLayerID >= 0) && !gimp_item_is_group(activeLayerID)) {
layers.push_back(activeLayerID); layers.push_back(activeLayerID);
} }
break; break;
case GmicQt::All: case GmicQt::All:
case GmicQt::AllDesc:
layers.assign(begLayers, endLayers); layers.assign(begLayers, endLayers);
break; break;
case GmicQt::ActiveAndBelow: case GmicQt::ActiveAndBelow:
if ((activeLayerID >= 0) && !gimp_item_is_group(activeLayerID)) { if ((activeLayerID >= 0) && !gimp_item_is_group(activeLayerID)) {
layers.push_back(activeLayerID); layers.push_back(activeLayerID);
const int * p = std::find(begLayers, endLayers, activeLayerID); const int * p = std::find(begLayers, endLayers, activeLayerID);
if (p < endLayers - 1) { if (p < endLayers - 1) {
layers.push_back(*(p + 1)); layers.push_back(*(p + 1));
} }
} }
skipping to change at line 358 skipping to change at line 357
case GmicQt::ActiveAndAbove: case GmicQt::ActiveAndAbove:
if ((activeLayerID >= 0) && !gimp_item_is_group(activeLayerID)) { if ((activeLayerID >= 0) && !gimp_item_is_group(activeLayerID)) {
const int * p = std::find(begLayers, endLayers, activeLayerID); const int * p = std::find(begLayers, endLayers, activeLayerID);
if (p > begLayers) { if (p > begLayers) {
layers.push_back(*(p - 1)); layers.push_back(*(p - 1));
} }
layers.push_back(activeLayerID); layers.push_back(activeLayerID);
} }
break; break;
case GmicQt::AllVisibles: case GmicQt::AllVisibles:
case GmicQt::AllVisiblesDesc: case GmicQt::AllInvisibles: {
case GmicQt::AllInvisibles: bool visibility = (mode == GmicQt::AllVisibles);
case GmicQt::AllInvisiblesDesc: {
bool visibility = (mode == GmicQt::AllVisibles || mode == GmicQt::AllVisible
sDesc);
for (int i = 0; i < layersCount; ++i) { for (int i = 0; i < layersCount; ++i) {
if (_gimp_item_get_visible(begLayers[i]) == visibility) { if (_gimp_item_get_visible(begLayers[i]) == visibility) {
layers.push_back(begLayers[i]); layers.push_back(begLayers[i]);
} }
} }
} break; } break;
default: default:
break; break;
} }
skipping to change at line 433 skipping to change at line 430
inputLayers.clear(); inputLayers.clear();
switch (mode) { switch (mode) {
case GmicQt::NoInput: case GmicQt::NoInput:
break; break;
case GmicQt::Active: case GmicQt::Active:
if ((active_layer_id >= 0) && !gimp_item_is_group(active_layer_id)) { if ((active_layer_id >= 0) && !gimp_item_is_group(active_layer_id)) {
inputLayers.push_back(active_layer_id); inputLayers.push_back(active_layer_id);
} }
break; break;
case GmicQt::All: case GmicQt::All:
case GmicQt::AllDesc:
inputLayers.assign(layers, end_layers); inputLayers.assign(layers, end_layers);
if (mode == GmicQt::AllDesc) {
std::reverse(inputLayers.begin(), inputLayers.end());
}
break; break;
case GmicQt::ActiveAndBelow: case GmicQt::ActiveAndBelow:
if ((active_layer_id >= 0) && !gimp_item_is_group(active_layer_id)) { if ((active_layer_id >= 0) && !gimp_item_is_group(active_layer_id)) {
inputLayers.push_back(active_layer_id); inputLayers.push_back(active_layer_id);
const int * p = std::find(layers, end_layers, active_layer_id); const int * p = std::find(layers, end_layers, active_layer_id);
if (p < end_layers - 1) { if (p < end_layers - 1) {
inputLayers.push_back(*(p + 1)); inputLayers.push_back(*(p + 1));
} }
} }
break; break;
case GmicQt::ActiveAndAbove: case GmicQt::ActiveAndAbove:
if ((active_layer_id >= 0) && !gimp_item_is_group(active_layer_id)) { if ((active_layer_id >= 0) && !gimp_item_is_group(active_layer_id)) {
const int * p = std::find(layers, end_layers, active_layer_id); const int * p = std::find(layers, end_layers, active_layer_id);
if (p > layers) { if (p > layers) {
inputLayers.push_back(*(p - 1)); inputLayers.push_back(*(p - 1));
} }
inputLayers.push_back(active_layer_id); inputLayers.push_back(active_layer_id);
} }
break; break;
case GmicQt::AllVisibles: case GmicQt::AllVisibles:
case GmicQt::AllVisiblesDesc: case GmicQt::AllInvisibles: {
case GmicQt::AllInvisibles: bool visibility = (mode == GmicQt::AllVisibles);
case GmicQt::AllInvisiblesDesc: {
bool visibility = (mode == GmicQt::AllVisibles || mode == GmicQt::AllVisible
sDesc);
for (int i = 0; i < layersCount; ++i) { for (int i = 0; i < layersCount; ++i) {
if (_gimp_item_get_visible(layers[i]) == visibility) { if (_gimp_item_get_visible(layers[i]) == visibility) {
inputLayers.push_back(layers[i]); inputLayers.push_back(layers[i]);
} }
} }
if (mode == GmicQt::AllVisiblesDesc || mode == GmicQt::AllInvisiblesDesc) {
std::reverse(inputLayers.begin(), inputLayers.end());
}
} break; } break;
default: default:
break; break;
} }
// Retrieve image list // Retrieve image list
images.assign(inputLayers.size()); images.assign(inputLayers.size());
imageNames.assign(inputLayers.size()); imageNames.assign(inputLayers.size());
inputLayerDimensions.assign(inputLayers.size(), 4); inputLayerDimensions.assign(inputLayers.size(), 4);
gint rgn_x, rgn_y, rgn_width, rgn_height; gint rgn_x, rgn_y, rgn_width, rgn_height;
skipping to change at line 943 skipping to change at line 931
return_values[0].data.d_status = status; return_values[0].data.d_status = status;
} }
void gmic_qt_query() void gmic_qt_query()
{ {
static const GimpParamDef args[] = {{GIMP_PDB_INT32, (gchar *)"run_mode", (gch ar *)"Interactive, non-interactive"}, static const GimpParamDef args[] = {{GIMP_PDB_INT32, (gchar *)"run_mode", (gch ar *)"Interactive, non-interactive"},
{GIMP_PDB_IMAGE, (gchar *)"image", (gchar *)"Input image"}, {GIMP_PDB_IMAGE, (gchar *)"image", (gchar *)"Input image"},
{GIMP_PDB_DRAWABLE, (gchar *)"drawable", ( gchar *)"Input drawable (unused)"}, {GIMP_PDB_DRAWABLE, (gchar *)"drawable", ( gchar *)"Input drawable (unused)"},
{GIMP_PDB_INT32, (gchar *)"input", {GIMP_PDB_INT32, (gchar *)"input",
(gchar *)"Input layers mode, when non-int eractive" (gchar *)"Input layers mode, when non-int eractive"
" (0=none, 1=active, 2=all, 3=ac " (0=none, 1=active, 2=all, 3=ac
tive & below, 4=active & above, 5=all visibles, 6=all invisibles," tive & below, 4=active & above, 5=all visibles, 6=all invisibles)"},
" 7=all visibles (decr.), 8=all
invisibles (decr.), 9=all (decr.))"},
{GIMP_PDB_INT32, (gchar *)"output", {GIMP_PDB_INT32, (gchar *)"output",
(gchar *)"Output mode, when non-interacti ve " (gchar *)"Output mode, when non-interacti ve "
"(0=in place,1=new layers,2=new active layers,3=new image)"}, "(0=in place,1=new layers,2=new active layers,3=new image)"},
{GIMP_PDB_STRING, (gchar *)"command", (gch ar *)"G'MIC command string, when non-interactive"}}; {GIMP_PDB_STRING, (gchar *)"command", (gch ar *)"G'MIC command string, when non-interactive"}};
const char name[] = "plug-in-gmic-qt"; const char name[] = "plug-in-gmic-qt";
QByteArray blurb = QString("G'MIC-Qt (%1)").arg(GmicQt::gmicVersionString()).t oLatin1(); QByteArray blurb = QString("G'MIC-Qt (%1)").arg(GmicQt::gmicVersionString()).t oLatin1();
QByteArray path("G'MIC-Qt..."); QByteArray path("G'MIC-Qt...");
path.prepend("_"); path.prepend("_");
gimp_install_procedure(name, // name gimp_install_procedure(name, // name
 End of changes. 7 change blocks. 
22 lines changed or deleted 6 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)