27 #include "../../../../maptools/Enums.h" 
   29 #include "ui_CompositionModeDialogForm.h" 
   33   m_ui(new Ui::CompositionModeDialogForm)
 
   38   m_ui->m_imgLabel->setPixmap(QIcon::fromTheme(
"layer-compose-hint").pixmap(112,48));
 
   67   m_ui->m_helpPushButton->setNameSpace(
"dpi.inpe.br.plugins"); 
 
   68   m_ui->m_helpPushButton->setPageReference(
"widgets/layer/compositionMode_dialog.html");
 
   83     m_ui->m_clearRadioButton->setChecked(
true);
 
   85     onClearRadioButtonClicked(
true);
 
   89     m_ui->m_srcRadioButton->setChecked(
true);
 
   91     onSourceRadioButtonClicked(
true);
 
   95     m_ui->m_dstRadioButton->setChecked(
true);
 
   97     onDestinationRadioButtonClicked(
true);
 
  101     m_ui->m_srcOverRadioButton->setChecked(
true);
 
  103     onSourceOverRadioButtonClicked(
true);
 
  107     m_ui->m_dstOverRadioButton->setChecked(
true);
 
  109     onDestinationOverRadioButtonClicked(
true);
 
  113     m_ui->m_srcInRadioButton->setChecked(
true);
 
  115     onSourceInRadioButtonClicked(
true);
 
  119     m_ui->m_dstInRadioButton->setChecked(
true);
 
  121     onDestinationInRadioButtonClicked(
true);
 
  125     m_ui->m_srcOutRadioButton->setChecked(
true);
 
  127     onSourceOutRadioButtonClicked(
true);
 
  131     m_ui->m_dstOutRadioButton->setChecked(
true);
 
  133     onDestinationOutRadioButtonClicked(
true);
 
  137     m_ui->m_srcAtTopRadioButton->setChecked(
true);
 
  139     onSourceAtTopRadioButtonClicked(
true);
 
  143     m_ui->m_dstAtTopRadioButton->setChecked(
true);
 
  145     onDestinationAtTopRadioButtonClicked(
true);
 
  149     m_ui->m_xorRadioButton->setChecked(
true);
 
  151     onXorRadioButtonClicked(
true);
 
  155     m_ui->m_plusRadioButton->setChecked(
true);
 
  157     onPlusRadioButtonClicked(
true);
 
  161     m_ui->m_multRadioButton->setChecked(
true);
 
  163     onMultiplyRadioButtonClicked(
true);
 
  167     m_ui->m_screenRadioButton->setChecked(
true);
 
  169     onScreenRadioButtonClicked(
true);
 
  173     m_ui->m_overlayRadioButton->setChecked(
true);
 
  175     onOverlayRadioButtonClicked(
true);
 
  179     m_ui->m_darkenRadioButton->setChecked(
true);
 
  181     onDarkenRadioButtonClicked(
true);
 
  185     m_ui->m_lightenRadioButton->setChecked(
true);
 
  187     onLightenRadioButtonClicked(
true);
 
  191     m_ui->m_colorDodgeRadioButton->setChecked(
true);
 
  193     onColorDodgeRadioButtonClicked(
true);
 
  197     m_ui->m_colorBurnRadioButton->setChecked(
true);
 
  199     onColorBurnRadioButtonClicked(
true);
 
  203     m_ui->m_hardLightRadioButton->setChecked(
true);
 
  205     onHardLightRadioButtonClicked(
true);
 
  209     m_ui->m_softLightRadioButton->setChecked(
true);
 
  211     onSoftLightRadioButtonClicked(
true);
 
  215     m_ui->m_diffRadioButton->setChecked(
true);
 
  217     onDifferenceRadioButtonClicked(
true);
 
  221     m_ui->m_exclusionRadioButton->setChecked(
true);
 
  223     onExclusionRadioButtonClicked(
true);
 
  229   return m_ui->m_applyPushButton;
 
  234   if(m_layer.get() && flag)
 
  238     m_ui->m_diagramLabel->setPixmap(QIcon::fromTheme(
"composition-mode-clear").pixmap(128,128));
 
  240     m_ui->m_decriptionPlainTextEdit->setPlainText(tr(
"The pixels in the destination are cleared (set to fully transparent) independent of the source."));
 
  246   if(m_layer.get() && flag)
 
  250     m_ui->m_diagramLabel->setPixmap(QIcon::fromTheme(
"composition-mode-src").pixmap(128,128));
 
  252     m_ui->m_decriptionPlainTextEdit->setPlainText(tr(
"The output is the source pixel. (This means a basic copy operation and is identical to SourceOver when the source pixel is opaque)."));
 
  258   if(m_layer.get() && flag)
 
  262     m_ui->m_diagramLabel->setPixmap(QIcon::fromTheme(
"composition-mode-dst").pixmap(128,128));
 
  264     m_ui->m_decriptionPlainTextEdit->setPlainText(tr(
"The output is the destination pixel. This means that the blending has no effect. This mode is the inverse of Source."));
 
  270   if(m_layer.get() && flag)
 
  274     m_ui->m_diagramLabel->setPixmap(QIcon::fromTheme(
"composition-mode-src-over").pixmap(128,128));
 
  276     m_ui->m_decriptionPlainTextEdit->setPlainText(tr(
"This is the default mode. The alpha of the source is used to blend the pixel on top of the destination."));
 
  282   if(m_layer.get() && flag)
 
  286     m_ui->m_diagramLabel->setPixmap(QIcon::fromTheme(
"composition-mode-dst-over").pixmap(128,128));
 
  288     m_ui->m_decriptionPlainTextEdit->setPlainText(tr(
"The alpha of the destination is used to blend it on top of the source pixels. This mode is the inverse of Source Over."));
 
  294   if(m_layer.get() && flag)
 
  298     m_ui->m_diagramLabel->setPixmap(QIcon::fromTheme(
"composition-mode-src-in").pixmap(128,128));
 
  300     m_ui->m_decriptionPlainTextEdit->setPlainText(tr(
"The output is the source, where the alpha is reduced by that of the destination."));
 
  306   if(m_layer.get() && flag)
 
  310     m_ui->m_diagramLabel->setPixmap(QIcon::fromTheme(
"composition-mode-dst-in").pixmap(128,128));
 
  312     m_ui->m_decriptionPlainTextEdit->setPlainText(tr(
"The output is the destination, where the alpha is reduced by that of the source. This mode is the inverse of Source In."));
 
  318   if(m_layer.get() && flag)
 
  322     m_ui->m_diagramLabel->setPixmap(QIcon::fromTheme(
"composition-mode-src-out").pixmap(128,128));
 
  324     m_ui->m_decriptionPlainTextEdit->setPlainText(tr(
"The output is the source, where the alpha is reduced by the inverse of destination."));
 
  330   if(m_layer.get() && flag)
 
  334     m_ui->m_diagramLabel->setPixmap(QIcon::fromTheme(
"composition-mode-dst-out").pixmap(128,128));
 
  336     m_ui->m_decriptionPlainTextEdit->setPlainText(tr(
"The output is the destination, where the alpha is reduced by the inverse of the source. This mode is the inverse of Source Out."));
 
  342   if(m_layer.get() && flag)
 
  346     m_ui->m_diagramLabel->setPixmap(QIcon::fromTheme(
"composition-mode-src-atop").pixmap(128,128));
 
  348     m_ui->m_decriptionPlainTextEdit->setPlainText(tr(
"The source pixel is blended on top of the destination, with the alpha of the source pixel reduced by the alpha of the destination pixel."));
 
  354   if(m_layer.get() && flag)
 
  358     m_ui->m_diagramLabel->setPixmap(QIcon::fromTheme(
"composition-mode-dst-atop").pixmap(128,128));
 
  360     m_ui->m_decriptionPlainTextEdit->setPlainText(tr(
"The destination pixel is blended on top of the source, with the alpha of the destination pixel is reduced by the alpha of the destination pixel. This mode is the inverse of Source A top."));
 
  366   if(m_layer.get() && flag)
 
  370     m_ui->m_diagramLabel->setPixmap(QIcon::fromTheme(
"composition-mode-xor").pixmap(128,128));
 
  372     m_ui->m_decriptionPlainTextEdit->setPlainText(tr(
"The source, whose alpha is reduced with the inverse of the destination alpha, is merged with the destination, whose alpha is reduced by the inverse of the source alpha. Xor is not the same as the bitwise Xor."));
 
  378   if(m_layer.get() && flag)
 
  382     m_ui->m_diagramLabel->setPixmap(QIcon::fromTheme(
"composition-mode-mix").pixmap(128,128));
 
  384     m_ui->m_decriptionPlainTextEdit->setPlainText(tr(
"Both the alpha and color of the source and destination pixels are added together."));
 
  390   if(m_layer.get() && flag)
 
  394     m_ui->m_diagramLabel->setPixmap(QIcon::fromTheme(
"composition-mode-mix").pixmap(128,128));
 
  396     m_ui->m_decriptionPlainTextEdit->setPlainText(tr(
"The output is the source color multiplied by the destination. Multiplying a color with white leaves the color unchanged, while multiplying a color with black produces black."));
 
  402   if(m_layer.get() && flag)
 
  406     m_ui->m_diagramLabel->setPixmap(QIcon::fromTheme(
"composition-mode-mix").pixmap(128,128));
 
  408     m_ui->m_decriptionPlainTextEdit->setPlainText(tr(
"The source and destination colors are inverted and then multiplied. Screening a color with white produces white, whereas screening a color with black leaves the color unchanged."));
 
  414   if(m_layer.get() && flag)
 
  418     m_ui->m_diagramLabel->setPixmap(QIcon::fromTheme(
"composition-mode-mix").pixmap(128,128));
 
  420     m_ui->m_decriptionPlainTextEdit->setPlainText(tr(
"Multiplies or screens the colors depending on the destination color. The destination color is mixed with the source color to reflect the lightness or darkness of the destination."));
 
  426   if(m_layer.get() && flag)
 
  430     m_ui->m_diagramLabel->setPixmap(QIcon::fromTheme(
"composition-mode-mix").pixmap(128,128));
 
  432     m_ui->m_decriptionPlainTextEdit->setPlainText(tr(
"The darker of the source and destination colors is selected."));
 
  438   if(m_layer.get() && flag)
 
  442     m_ui->m_diagramLabel->setPixmap(QIcon::fromTheme(
"composition-mode-mix").pixmap(128,128));
 
  444     m_ui->m_decriptionPlainTextEdit->setPlainText(tr(
"The lighter of the source and destination colors is selected."));
 
  450   if(m_layer.get() && flag)
 
  454     m_ui->m_diagramLabel->setPixmap(QIcon::fromTheme(
"composition-mode-mix").pixmap(128,128));
 
  456     m_ui->m_decriptionPlainTextEdit->setPlainText(tr(
"The destination color is brightened to reflect the source color. A black source color leaves the destination color unchanged."));
 
  462   if(m_layer.get() && flag)
 
  466     m_ui->m_diagramLabel->setPixmap(QIcon::fromTheme(
"composition-mode-mix").pixmap(128,128));
 
  468     m_ui->m_decriptionPlainTextEdit->setPlainText(tr(
"The destination color is darkened to reflect the source color. A white source color leaves the destination color unchanged."));
 
  474   if(m_layer.get() && flag)
 
  478     m_ui->m_diagramLabel->setPixmap(QIcon::fromTheme(
"composition-mode-mix").pixmap(128,128));
 
  480     m_ui->m_decriptionPlainTextEdit->setPlainText(tr(
"Multiplies or screens the colors depending on the source color. A light source color will lighten the destination color, whereas a dark source color will darken the destination color."));
 
  486   if(m_layer.get() && flag)
 
  490     m_ui->m_diagramLabel->setPixmap(QIcon::fromTheme(
"composition-mode-mix").pixmap(128,128));
 
  492     m_ui->m_decriptionPlainTextEdit->setPlainText(tr(
"Darkens or lightens the colors depending on the source color. Similar to Hard Light."));
 
  498   if(m_layer.get() && flag)
 
  502     m_ui->m_diagramLabel->setPixmap(QIcon::fromTheme(
"composition-mode-mix").pixmap(128,128));
 
  504     m_ui->m_decriptionPlainTextEdit->setPlainText(tr(
"Subtracts the darker of the colors from the lighter. Painting with white inverts the destination color, whereas painting with black leaves the destination color unchanged."));
 
  510   if(m_layer.get() && flag)
 
  514     m_ui->m_diagramLabel->setPixmap(QIcon::fromTheme(
"composition-mode-mix").pixmap(128,128));
 
  516     m_ui->m_decriptionPlainTextEdit->setPlainText(tr(
"Similar to Difference, but with a lower contrast. Painting with white inverts the destination color, whereas painting with black leaves the destination color unchanged."));
 
CompositionMode
The composition mode used to render the canvas. 
 
This file defines a class for a CompositionModeDialog. 
 
boost::intrusive_ptr< AbstractLayer > AbstractLayerPtr