Final changes, branch now buildable
This commit is contained in:
parent
badf92ba64
commit
c8ef1ee628
@ -930,7 +930,7 @@ void RawImageSource::getImage (const ColorTemp &ctemp, int tran, Imagefloat* ima
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
DCPProfile *RawImageSource::getDCP(const ColorManagementParams &cmp, DCPProfileApplyState &as)
|
DCPProfile *RawImageSource::getDCP(const ColorManagementParams &cmp, DCPProfile::ApplyState &as)
|
||||||
{
|
{
|
||||||
if (cmp.inputProfile == "(camera)" || cmp.inputProfile == "(none)") {
|
if (cmp.inputProfile == "(camera)" || cmp.inputProfile == "(none)") {
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
@ -1719,11 +1719,11 @@ private:
|
|||||||
}
|
}
|
||||||
|
|
||||||
ProfileContent pc = ICCStore::getInstance()->getContent(params.icm.outputProfile);
|
ProfileContent pc = ICCStore::getInstance()->getContent(params.icm.outputProfile);
|
||||||
readyImg->setOutputProfile(pc.getData().c_str(), pc.getData().size());
|
readyImg->setOutputProfile(pc.getData());
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// No ICM
|
// No ICM
|
||||||
readyImg->setOutputProfile(nullptr, 0);
|
readyImg->setOutputProfile({});
|
||||||
}
|
}
|
||||||
|
|
||||||
// t2.set();
|
// t2.set();
|
||||||
|
@ -31,7 +31,7 @@ using namespace rtengine;
|
|||||||
|
|
||||||
ControlLineManager::ControlLineManager():
|
ControlLineManager::ControlLineManager():
|
||||||
EditSubscriber(ET_OBJECTS),
|
EditSubscriber(ET_OBJECTS),
|
||||||
canvas_area(new Rectangle()),
|
canvas_area(new EditRectangle()),
|
||||||
cursor(CSHandOpen),
|
cursor(CSHandOpen),
|
||||||
draw_mode(false),
|
draw_mode(false),
|
||||||
drawing_line(false),
|
drawing_line(false),
|
||||||
|
@ -26,9 +26,10 @@
|
|||||||
class Circle;
|
class Circle;
|
||||||
class Line;
|
class Line;
|
||||||
class OPIcon;
|
class OPIcon;
|
||||||
class Rectangle;
|
class EditRectangle;
|
||||||
class RTSurface;
|
class RTSurface;
|
||||||
|
|
||||||
|
|
||||||
struct ControlLine {
|
struct ControlLine {
|
||||||
static constexpr int OBJ_COUNT = 4;
|
static constexpr int OBJ_COUNT = 4;
|
||||||
std::unique_ptr<Line> line;
|
std::unique_ptr<Line> line;
|
||||||
@ -45,7 +46,7 @@ class ControlLineManager: EditSubscriber
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
/** Hidden object for capturing mouse events. */
|
/** Hidden object for capturing mouse events. */
|
||||||
std::unique_ptr<Rectangle> canvas_area;
|
std::unique_ptr<EditRectangle> canvas_area;
|
||||||
rtengine::Coord drag_delta;
|
rtengine::Coord drag_delta;
|
||||||
std::vector<std::unique_ptr<ControlLine>> control_lines;
|
std::vector<std::unique_ptr<ControlLine>> control_lines;
|
||||||
CursorShape cursor;
|
CursorShape cursor;
|
||||||
|
@ -1852,8 +1852,8 @@ void ControlSpotPanel::addControlSpotCurve(Gtk::TreeModel::Row& row)
|
|||||||
shape_ellipse = new Ellipse();
|
shape_ellipse = new Ellipse();
|
||||||
shape_ellipse->datum = Geometry::IMAGE;
|
shape_ellipse->datum = Geometry::IMAGE;
|
||||||
shape_ellipse->radiusInImageSpace = true;
|
shape_ellipse->radiusInImageSpace = true;
|
||||||
Rectangle* shape_rectangle;
|
EditRectangle* shape_rectangle;
|
||||||
shape_rectangle = new Rectangle();
|
shape_rectangle = new EditRectangle();
|
||||||
shape_rectangle->datum = Geometry::IMAGE;
|
shape_rectangle->datum = Geometry::IMAGE;
|
||||||
EditSubscriber::visibleGeometry.push_back(centerCircle); // (curveid - 1) * 7
|
EditSubscriber::visibleGeometry.push_back(centerCircle); // (curveid - 1) * 7
|
||||||
EditSubscriber::visibleGeometry.push_back(shape_ellipse); // (curveid - 1) * 7 + 1
|
EditSubscriber::visibleGeometry.push_back(shape_ellipse); // (curveid - 1) * 7 + 1
|
||||||
@ -1887,7 +1887,7 @@ void ControlSpotPanel::addControlSpotCurve(Gtk::TreeModel::Row& row)
|
|||||||
shape_ellipse = new Ellipse();
|
shape_ellipse = new Ellipse();
|
||||||
shape_ellipse->datum = Geometry::IMAGE;
|
shape_ellipse->datum = Geometry::IMAGE;
|
||||||
shape_ellipse->radiusInImageSpace = true;
|
shape_ellipse->radiusInImageSpace = true;
|
||||||
shape_rectangle = new Rectangle();
|
shape_rectangle = new EditRectangle();
|
||||||
shape_rectangle->datum = Geometry::IMAGE;
|
shape_rectangle->datum = Geometry::IMAGE;
|
||||||
EditSubscriber::mouseOverGeometry.push_back(centerCircle); // (curveid - 1) * 7
|
EditSubscriber::mouseOverGeometry.push_back(centerCircle); // (curveid - 1) * 7
|
||||||
EditSubscriber::mouseOverGeometry.push_back(shape_ellipse); // (curveid - 1) * 7 + 1
|
EditSubscriber::mouseOverGeometry.push_back(shape_ellipse); // (curveid - 1) * 7 + 1
|
||||||
@ -1957,7 +1957,7 @@ void ControlSpotPanel::updateControlSpotCurve(const Gtk::TreeModel::Row& row)
|
|||||||
};
|
};
|
||||||
|
|
||||||
const auto updateRectangle = [&](Geometry * geometry) {
|
const auto updateRectangle = [&](Geometry * geometry) {
|
||||||
const auto rectangle = static_cast<Rectangle*>(geometry);
|
const auto rectangle = static_cast<EditRectangle*>(geometry);
|
||||||
rectangle->bottomRight.x = origin.x + decayX;
|
rectangle->bottomRight.x = origin.x + decayX;
|
||||||
rectangle->bottomRight.y = origin.y + decayY;
|
rectangle->bottomRight.y = origin.y + decayY;
|
||||||
rectangle->topLeft.x = origin.x - decayXL;
|
rectangle->topLeft.x = origin.x - decayXL;
|
||||||
|
@ -471,31 +471,31 @@ void Polyline::drawToMOChannel (Cairo::RefPtr<Cairo::Context> &cr, unsigned shor
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Rectangle::setXYWH(int left, int top, int width, int height)
|
void EditRectangle::setXYWH(int left, int top, int width, int height)
|
||||||
{
|
{
|
||||||
topLeft.set(left, top);
|
topLeft.set(left, top);
|
||||||
bottomRight.set(left + width, top + height);
|
bottomRight.set(left + width, top + height);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Rectangle::setXYXY(int left, int top, int right, int bottom)
|
void EditRectangle::setXYXY(int left, int top, int right, int bottom)
|
||||||
{
|
{
|
||||||
topLeft.set(left, top);
|
topLeft.set(left, top);
|
||||||
bottomRight.set(right, bottom);
|
bottomRight.set(right, bottom);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Rectangle::setXYWH(rtengine::Coord topLeft, rtengine::Coord widthHeight)
|
void EditRectangle::setXYWH(rtengine::Coord topLeft, rtengine::Coord widthHeight)
|
||||||
{
|
{
|
||||||
this->topLeft = topLeft;
|
this->topLeft = topLeft;
|
||||||
this->bottomRight = topLeft + widthHeight;
|
this->bottomRight = topLeft + widthHeight;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Rectangle::setXYXY(rtengine::Coord topLeft, rtengine::Coord bottomRight)
|
void EditRectangle::setXYXY(rtengine::Coord topLeft, rtengine::Coord bottomRight)
|
||||||
{
|
{
|
||||||
this->topLeft = topLeft;
|
this->topLeft = topLeft;
|
||||||
this->bottomRight = bottomRight;
|
this->bottomRight = bottomRight;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Rectangle::drawOuterGeometry(Cairo::RefPtr<Cairo::Context> &cr, ObjectMOBuffer *objectBuffer, EditCoordSystem &coordSystem)
|
void EditRectangle::drawOuterGeometry(Cairo::RefPtr<Cairo::Context> &cr, ObjectMOBuffer *objectBuffer, EditCoordSystem &coordSystem)
|
||||||
{
|
{
|
||||||
if ((flags & F_VISIBLE) && state != INSENSITIVE) {
|
if ((flags & F_VISIBLE) && state != INSENSITIVE) {
|
||||||
RGBColor color;
|
RGBColor color;
|
||||||
@ -538,7 +538,7 @@ void Rectangle::drawOuterGeometry(Cairo::RefPtr<Cairo::Context> &cr, ObjectMOBuf
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Rectangle::drawInnerGeometry(Cairo::RefPtr<Cairo::Context> &cr, ObjectMOBuffer *objectBuffer, EditCoordSystem &coordSystem)
|
void EditRectangle::drawInnerGeometry(Cairo::RefPtr<Cairo::Context> &cr, ObjectMOBuffer *objectBuffer, EditCoordSystem &coordSystem)
|
||||||
{
|
{
|
||||||
if (flags & F_VISIBLE) {
|
if (flags & F_VISIBLE) {
|
||||||
if (state != INSENSITIVE) {
|
if (state != INSENSITIVE) {
|
||||||
@ -602,7 +602,7 @@ void Rectangle::drawInnerGeometry(Cairo::RefPtr<Cairo::Context> &cr, ObjectMOBuf
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Rectangle::drawToMOChannel(Cairo::RefPtr<Cairo::Context> &cr, unsigned short id, ObjectMOBuffer *objectBuffer, EditCoordSystem &coordSystem)
|
void EditRectangle::drawToMOChannel(Cairo::RefPtr<Cairo::Context> &cr, unsigned short id, ObjectMOBuffer *objectBuffer, EditCoordSystem &coordSystem)
|
||||||
{
|
{
|
||||||
if (flags & F_HOVERABLE) {
|
if (flags & F_HOVERABLE) {
|
||||||
cr->set_line_width( getMouseOverLineWidth() );
|
cr->set_line_width( getMouseOverLineWidth() );
|
||||||
|
@ -307,14 +307,14 @@ public:
|
|||||||
void drawToMOChannel (Cairo::RefPtr<Cairo::Context> &cr, unsigned short id, ObjectMOBuffer *objectBuffer, EditCoordSystem &coordSystem) override;
|
void drawToMOChannel (Cairo::RefPtr<Cairo::Context> &cr, unsigned short id, ObjectMOBuffer *objectBuffer, EditCoordSystem &coordSystem) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
class Rectangle : public Geometry
|
class EditRectangle : public Geometry // New class name to avoid conflict elsewhere (exiv2), would be nicer to put in namespace?
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
rtengine::Coord topLeft;
|
rtengine::Coord topLeft;
|
||||||
rtengine::Coord bottomRight;
|
rtengine::Coord bottomRight;
|
||||||
bool filled;
|
bool filled;
|
||||||
|
|
||||||
Rectangle ();
|
EditRectangle ();
|
||||||
|
|
||||||
void setXYWH(int left, int top, int width, int height);
|
void setXYWH(int left, int top, int width, int height);
|
||||||
void setXYXY(int left, int top, int right, int bottom);
|
void setXYXY(int left, int top, int right, int bottom);
|
||||||
@ -528,7 +528,7 @@ inline Circle::Circle () :
|
|||||||
false) {
|
false) {
|
||||||
}
|
}
|
||||||
|
|
||||||
inline Rectangle::Rectangle () :
|
inline EditRectangle::EditRectangle () :
|
||||||
topLeft (0, 0), bottomRight (10, 10), filled (false) {
|
topLeft (0, 0), bottomRight (10, 10), filled (false) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -175,9 +175,10 @@ void ExifPanel::setImageData (const FramesMetaData* id)
|
|||||||
Gtk::TreeModel::Children ExifPanel::addTag(const std::string &key, const Glib::ustring &label, const Glib::ustring &value, bool editable, bool edited)
|
Gtk::TreeModel::Children ExifPanel::addTag(const std::string &key, const Glib::ustring &label, const Glib::ustring &value, bool editable, bool edited)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (!value.validate()) {
|
// TODO Re-fix #5923 if necessary
|
||||||
value = "???";
|
//if (!value.validate()) {
|
||||||
}
|
// value = "???";
|
||||||
|
//}
|
||||||
|
|
||||||
auto root = exifTreeModel->children();
|
auto root = exifTreeModel->children();
|
||||||
|
|
||||||
|
@ -124,14 +124,14 @@ FilmNegative::FilmNegative() :
|
|||||||
filmBaseSpotButton->signal_toggled().connect(sigc::mem_fun(*this, &FilmNegative::baseSpotToggled));
|
filmBaseSpotButton->signal_toggled().connect(sigc::mem_fun(*this, &FilmNegative::baseSpotToggled));
|
||||||
|
|
||||||
// Editing geometry; create the spot rectangle
|
// Editing geometry; create the spot rectangle
|
||||||
Rectangle* const spotRect = new Rectangle();
|
EditRectangle* const spotRect = new EditRectangle();
|
||||||
spotRect->filled = false;
|
spotRect->filled = false;
|
||||||
|
|
||||||
visibleGeometry.push_back(spotRect);
|
visibleGeometry.push_back(spotRect);
|
||||||
|
|
||||||
// Stick a dummy rectangle over the whole image in mouseOverGeometry.
|
// Stick a dummy rectangle over the whole image in mouseOverGeometry.
|
||||||
// This is to make sure the getCursor() call is fired everywhere.
|
// This is to make sure the getCursor() call is fired everywhere.
|
||||||
Rectangle* const imgRect = new Rectangle();
|
EditRectangle* const imgRect = new EditRectangle();
|
||||||
imgRect->filled = true;
|
imgRect->filled = true;
|
||||||
|
|
||||||
mouseOverGeometry.push_back(imgRect);
|
mouseOverGeometry.push_back(imgRect);
|
||||||
@ -284,7 +284,7 @@ CursorShape FilmNegative::getCursor(int objectID) const
|
|||||||
bool FilmNegative::mouseOver(int modifierKey)
|
bool FilmNegative::mouseOver(int modifierKey)
|
||||||
{
|
{
|
||||||
EditDataProvider* const provider = getEditProvider();
|
EditDataProvider* const provider = getEditProvider();
|
||||||
Rectangle* const spotRect = static_cast<Rectangle*>(visibleGeometry.at(0));
|
EditRectangle* const spotRect = static_cast<EditRectangle*>(visibleGeometry.at(0));
|
||||||
spotRect->setXYWH(provider->posImage.x - 16, provider->posImage.y - 16, 32, 32);
|
spotRect->setXYWH(provider->posImage.x - 16, provider->posImage.y - 16, 32, 32);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@ -386,7 +386,7 @@ void FilmNegative::editToggled()
|
|||||||
|
|
||||||
// Stick a dummy rectangle over the whole image in mouseOverGeometry.
|
// Stick a dummy rectangle over the whole image in mouseOverGeometry.
|
||||||
// This is to make sure the getCursor() call is fired everywhere.
|
// This is to make sure the getCursor() call is fired everywhere.
|
||||||
Rectangle* const imgRect = static_cast<Rectangle*>(mouseOverGeometry.at(0));
|
EditRectangle* const imgRect = static_cast<EditRectangle*>(mouseOverGeometry.at(0));
|
||||||
imgRect->setXYWH(0, 0, w, h);
|
imgRect->setXYWH(0, 0, w, h);
|
||||||
} else {
|
} else {
|
||||||
refSpotCoords.clear();
|
refSpotCoords.clear();
|
||||||
@ -408,7 +408,7 @@ void FilmNegative::baseSpotToggled()
|
|||||||
|
|
||||||
// Stick a dummy rectangle over the whole image in mouseOverGeometry.
|
// Stick a dummy rectangle over the whole image in mouseOverGeometry.
|
||||||
// This is to make sure the getCursor() call is fired everywhere.
|
// This is to make sure the getCursor() call is fired everywhere.
|
||||||
Rectangle* const imgRect = static_cast<Rectangle*>(mouseOverGeometry.at(0));
|
EditRectangle* const imgRect = static_cast<EditRectangle*>(mouseOverGeometry.at(0));
|
||||||
imgRect->setXYWH(0, 0, w, h);
|
imgRect->setXYWH(0, 0, w, h);
|
||||||
} else {
|
} else {
|
||||||
refSpotCoords.clear();
|
refSpotCoords.clear();
|
||||||
|
@ -41,15 +41,14 @@
|
|||||||
#include "md5helper.h"
|
#include "md5helper.h"
|
||||||
#include "pathutils.h"
|
#include "pathutils.h"
|
||||||
#include "paramsedited.h"
|
#include "paramsedited.h"
|
||||||
|
#include "ppversion.h"
|
||||||
#include "procparamchangers.h"
|
#include "procparamchangers.h"
|
||||||
#include "profilestorecombobox.h"
|
#include "profilestorecombobox.h"
|
||||||
#include "version.h"
|
#include "version.h"
|
||||||
|
|
||||||
#include "../rtengine/dynamicprofile.h"
|
|
||||||
#include "../rtengine/imagedata.h"
|
|
||||||
#include "../rtengine/mytime.h"
|
#include "../rtengine/mytime.h"
|
||||||
#include "../rtengine/procparams.h"
|
|
||||||
|
using namespace rtengine::procparams;
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
@ -110,8 +109,6 @@ bool CPBDump(
|
|||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
using namespace rtengine::procparams;
|
|
||||||
|
|
||||||
Thumbnail::Thumbnail(CacheManager* cm, const Glib::ustring& fname, CacheImageData* cf) :
|
Thumbnail::Thumbnail(CacheManager* cm, const Glib::ustring& fname, CacheImageData* cf) :
|
||||||
fname(fname),
|
fname(fname),
|
||||||
cfs(*cf),
|
cfs(*cf),
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
#include "cacheimagedata.h"
|
#include "cacheimagedata.h"
|
||||||
#include "threadutils.h"
|
#include "threadutils.h"
|
||||||
#include "thumbnaillistener.h"
|
#include "thumbnaillistener.h"
|
||||||
|
#include "../rtengine/procparams.h"
|
||||||
|
|
||||||
namespace rtengine
|
namespace rtengine
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user