~smartboyhw/ubuntu/raring/calligra/2.6.0-0ubuntu1

« back to all changes in this revision

Viewing changes to krita/ui/kis_canvas_resource_provider.cpp

  • Committer: Package Import Robot
  • Author(s): Philip Muškovac
  • Date: 2012-10-23 21:09:16 UTC
  • mfrom: (1.1.13)
  • Revision ID: package-import@ubuntu.com-20121023210916-m82w6zxnxhaxz7va
Tags: 1:2.5.90-0ubuntu1
* New upstream alpha release (LP: #1070436)
  - Add libkactivities-dev and libopenimageio-dev to build-depends
  - Add kubuntu_build_calligraactive.diff to build calligraactive by default
  - Add package for calligraauthor and move files that are shared between
    calligrawords and calligraauthor to calligrawords-common
* Document the patches
* Remove numbers from patches so they follow the same naming scheme as
  the rest of our patches.
* calligra-data breaks replaces krita-data (<< 1:2.5.3) (LP: #1071686)

Show diffs side-by-side

added added

removed removed

Lines of Context:
39
39
#include <kis_paintop_settings.h>
40
40
#include "ko_favorite_resource_manager.h"
41
41
 
42
 
#include "kis_exposure_visitor.h"
43
42
#include "kis_config.h"
44
43
#include "kis_view2.h"
45
44
#include "canvas/kis_canvas2.h"
78
77
    setMirrorHorizontal(false);
79
78
    setMirrorVertical(false);
80
79
 
 
80
    m_resourceManager->setResource(HdrExposure, 0.0);
 
81
    m_resourceManager->setResource(HdrGamma, 1.0);
 
82
 
81
83
    connect(m_resourceManager, SIGNAL(resourceChanged(int, const QVariant &)),
82
84
            this, SLOT(slotResourceChanged(int, const QVariant&)));
83
85
}
106
108
void KisCanvasResourceProvider::setHDRExposure(float exposure)
107
109
{
108
110
    m_resourceManager->setResource(HdrExposure, static_cast<double>(exposure));
109
 
    KisExposureVisitor eV(exposure);
110
 
    m_view->image()->projection()->colorSpace()->profile()->setProperty("exposure", exposure);
111
 
    m_view->image()->rootLayer()->accept(eV);
112
 
    m_view->canvasBase()->updateCanvas();
113
 
    m_view->canvasBase()->startUpdateCanvasProjection(m_view->image()->bounds());
 
111
}
 
112
 
 
113
float KisCanvasResourceProvider::HDRGamma() const
 
114
{
 
115
    return static_cast<float>(m_resourceManager->resource(HdrGamma).toDouble());
 
116
}
 
117
 
 
118
void KisCanvasResourceProvider::setHDRGamma(float gamma)
 
119
{
 
120
    m_resourceManager->setResource(HdrGamma, static_cast<double>(gamma));
114
121
}
115
122
 
116
123