Full image dimensions in navigator info
see 1426
This commit is contained in:
@@ -333,6 +333,15 @@ void CropHandler::getSize (int& w, int& h) {
|
||||
h = cropH;
|
||||
}
|
||||
|
||||
void CropHandler::getFullImageSize (int& w, int& h) {
|
||||
if (ipc) {
|
||||
w = ipc->getFullWidth ();
|
||||
h = ipc->getFullHeight ();
|
||||
} else {
|
||||
w=h=0;
|
||||
}
|
||||
}
|
||||
|
||||
void CropHandler::compDim () {
|
||||
|
||||
cropX = cx;
|
||||
|
@@ -86,6 +86,7 @@ class CropHandler : public rtengine::DetailedCropListener, public rtengine::Size
|
||||
void setPosition (int x, int y, bool update=true);
|
||||
void getPosition (int& x, int& y);
|
||||
void getSize (int& w, int& h);
|
||||
void getFullImageSize (int& w, int& h);
|
||||
|
||||
void setEnabled (bool e);
|
||||
bool getEnabled ();
|
||||
|
@@ -478,11 +478,9 @@ void CropWindow::pointerMoved (int x, int y) {
|
||||
int mx, my;
|
||||
translateCoord (x, y, mx, my);
|
||||
if (!onArea (CropImage, x, y) || !cropHandler.cropPixbuf) {
|
||||
// pmlistener->pointerMoved (false, mx, my, -1, -1, -1);
|
||||
cropHandler.getFullImageSize(mx,my);
|
||||
pmlistener->pointerMoved (false, cropHandler.colorParams.working, mx, my, -1, -1, -1);
|
||||
if (pmhlistener) {
|
||||
pmhlistener->pointerMoved (false, cropHandler.colorParams.working, mx, my, -1, -1, -1);
|
||||
}
|
||||
if (pmhlistener) pmhlistener->pointerMoved (false, cropHandler.colorParams.working, mx, my, -1, -1, -1);
|
||||
}
|
||||
else {
|
||||
/*Glib::Mutex::Lock lock(cropHandler.cimg);
|
||||
|
@@ -61,9 +61,12 @@ Navigator::Navigator () {
|
||||
show_all ();
|
||||
}
|
||||
|
||||
void Navigator::setInvalid () {
|
||||
|
||||
void Navigator::setInvalid (int fullWidth, int fullHeight) {
|
||||
if (fullWidth>0 && fullHeight>0)
|
||||
position->set_text (Glib::ustring::compose (M("NAVIGATOR_XY_FULL"),fullWidth,fullHeight));
|
||||
else
|
||||
position->set_text (M("NAVIGATOR_XY_NA"));
|
||||
|
||||
R->set_text (M("NAVIGATOR_R_NA"));
|
||||
G->set_text (M("NAVIGATOR_G_NA"));
|
||||
B->set_text (M("NAVIGATOR_B_NA"));
|
||||
@@ -75,11 +78,11 @@ void Navigator::setInvalid () {
|
||||
LAB_L->set_text (M("NAVIGATOR_LAB_L_NA"));
|
||||
}
|
||||
|
||||
|
||||
// if !validPos then x/y contain the full image size
|
||||
void Navigator::pointerMoved (bool validPos, Glib::ustring profile, int x, int y, int r, int g, int b) {
|
||||
|
||||
if (!validPos)
|
||||
setInvalid ();
|
||||
setInvalid (x,y);
|
||||
else {
|
||||
position->set_text (Glib::ustring::compose ("x = %1, y = %2", x, y));
|
||||
R->set_text (Glib::ustring::compose (M("NAVIGATOR_R_VALUE"), r));
|
||||
|
@@ -38,7 +38,8 @@ class Navigator : public Gtk::Frame, public PointerMotionListener {
|
||||
//void rgb2lab (int r, int g, int b, int &LAB_l, int &LAB_a, int &LAB_b);
|
||||
void rgb2lab (Glib::ustring profile, int r, int g, int b, int &LAB_l, int &LAB_a, int &LAB_b);
|
||||
|
||||
void setInvalid ();
|
||||
void setInvalid (int fullWidth=-1, int fullHeight=-1);
|
||||
|
||||
public:
|
||||
PreviewWindow* previewWindow;
|
||||
|
||||
|
Reference in New Issue
Block a user