~ubuntu-branches/ubuntu/saucy/digikam/saucy

« back to all changes in this revision

Viewing changes to imageplugins/decorate/superimpose/superimpose.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Scott Kitterman
  • Date: 2010-12-21 23:19:11 UTC
  • mfrom: (1.2.33 upstream) (3.1.7 experimental)
  • Revision ID: james.westby@ubuntu.com-20101221231911-z9jip7s5aht1jqn9
Tags: 2:1.7.0-1ubuntu1
* Merge from Debian Experimental. Remaining Ubuntu changes:
  - Export .pot name and copy to plugins in debian/rules
  - Version build-depends on kipi-plugins-dev to ensure build is against the
    same version on all archs
* Drop debian/patches/kubuntu_01_linker.diff, incoporated upstream
* Remove patches directory and unused patches

Show diffs side-by-side

added added

removed removed

Lines of Context:
41
41
void SuperImpose::filterImage()
42
42
{
43
43
    if (m_template.isNull())
 
44
    {
44
45
        return;
 
46
    }
45
47
 
46
48
    int templateWidth  = m_template.width();
47
49
    int templateHeight = m_template.height();
48
50
 
49
51
    // take selection of src image and scale it to size of template
50
52
    m_destImage = m_orgImage.smoothScaleSection(m_selection.x(), m_selection.y(),
51
 
                m_selection.width(), m_selection.height(), templateWidth, templateHeight);
 
53
                  m_selection.width(), m_selection.height(), templateWidth, templateHeight);
52
54
 
53
55
    // convert depth if necessary
54
56
    m_template.convertToDepthOfImage(&m_destImage);
55
57
 
56
58
    // get composer for compositing rule
57
 
    DColorComposer *composer = DColorComposer::getComposer(m_compositeRule);
 
59
    DColorComposer* composer = DColorComposer::getComposer(m_compositeRule);
58
60
    DColorComposer::MultiplicationFlags flags = DColorComposer::NoMultiplication;
 
61
 
59
62
    if (m_compositeRule != DColorComposer::PorterDuffNone)
 
63
    {
60
64
        flags = DColorComposer::MultiplicationFlagsDImg;
 
65
    }
61
66
 
62
67
    // do alpha blending of template on dest image
63
68
    m_destImage.bitBlendImage(composer, &m_template, 0, 0, templateWidth, templateHeight, 0, 0, flags);