Correction of code format with AStyle
This commit is contained in:
@@ -34,7 +34,7 @@ set(NONCLISOURCEFILES
|
||||
colorappearance.cc
|
||||
coloredbar.cc
|
||||
colortoning.cc
|
||||
controlspotpanel.cc
|
||||
controlspotpanel.cc
|
||||
coordinateadjuster.cc
|
||||
crop.cc
|
||||
crophandler.cc
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -14,118 +14,118 @@
|
||||
#include <string>
|
||||
|
||||
class ControlSpotPanel:
|
||||
public ToolParamBlock,
|
||||
public AdjusterListener,
|
||||
public EditSubscriber
|
||||
public ToolParamBlock,
|
||||
public AdjusterListener,
|
||||
public EditSubscriber
|
||||
{
|
||||
public:
|
||||
ControlSpotPanel();
|
||||
void setEditProvider(EditDataProvider* provider);
|
||||
ControlSpotPanel();
|
||||
void setEditProvider(EditDataProvider* provider);
|
||||
|
||||
private:
|
||||
// cell renderer
|
||||
void render_id (Gtk::CellRenderer* cell, const Gtk::TreeModel::iterator& iter);
|
||||
void render_name (Gtk::CellRenderer* cell, const Gtk::TreeModel::iterator& iter);
|
||||
void render_isvisible (Gtk::CellRenderer* cell, const Gtk::TreeModel::iterator& iter);
|
||||
// cell renderer
|
||||
void render_id (Gtk::CellRenderer* cell, const Gtk::TreeModel::iterator& iter);
|
||||
void render_name (Gtk::CellRenderer* cell, const Gtk::TreeModel::iterator& iter);
|
||||
void render_isvisible (Gtk::CellRenderer* cell, const Gtk::TreeModel::iterator& iter);
|
||||
|
||||
void on_button_add();
|
||||
void on_button_delete();
|
||||
void on_button_rename();
|
||||
// TODO Add visibility button
|
||||
// TODO Add duplication button
|
||||
void on_button_add();
|
||||
void on_button_delete();
|
||||
void on_button_rename();
|
||||
// TODO Add visibility button
|
||||
// TODO Add duplication button
|
||||
|
||||
void save_ControlSpot_param();
|
||||
void load_ControlSpot_param();
|
||||
void save_ControlSpot_param();
|
||||
void load_ControlSpot_param();
|
||||
|
||||
void controlspotChanged();
|
||||
void controlspotChanged();
|
||||
|
||||
void shapeChanged();
|
||||
void shapeMethodeChanged();
|
||||
void updateParamVisibility();
|
||||
void adjusterChanged(Adjuster* a, double newval);
|
||||
void disableParamlistener(bool cond);
|
||||
void setParamEditable(bool cond);
|
||||
void shapeChanged();
|
||||
void shapeMethodeChanged();
|
||||
void updateParamVisibility();
|
||||
void adjusterChanged(Adjuster* a, double newval);
|
||||
void disableParamlistener(bool cond);
|
||||
void setParamEditable(bool cond);
|
||||
|
||||
void addControlSpotCurve(Gtk::TreeModel::Row row);
|
||||
void updateControlSpotCurve(Gtk::TreeModel::Row row);
|
||||
void deleteControlSpotCurve(Gtk::TreeModel::Row row);
|
||||
CursorShape getCursor(int objectID);
|
||||
bool mouseOver(int modifierKey);
|
||||
bool button1Pressed(int modifierKey);
|
||||
bool button1Released();
|
||||
bool drag1(int modifierKey);
|
||||
void addControlSpotCurve(Gtk::TreeModel::Row row);
|
||||
void updateControlSpotCurve(Gtk::TreeModel::Row row);
|
||||
void deleteControlSpotCurve(Gtk::TreeModel::Row row);
|
||||
CursorShape getCursor(int objectID);
|
||||
bool mouseOver(int modifierKey);
|
||||
bool button1Pressed(int modifierKey);
|
||||
bool button1Released();
|
||||
bool drag1(int modifierKey);
|
||||
|
||||
class ControlSpots:
|
||||
public Gtk::TreeModel::ColumnRecord
|
||||
{
|
||||
public:
|
||||
ControlSpots();
|
||||
class ControlSpots:
|
||||
public Gtk::TreeModel::ColumnRecord
|
||||
{
|
||||
public:
|
||||
ControlSpots();
|
||||
|
||||
Gtk::TreeModelColumn<int> id; // Control spot id
|
||||
Gtk::TreeModelColumn<Glib::ustring> name;
|
||||
Gtk::TreeModelColumn<bool> isvisible;
|
||||
Gtk::TreeModelColumn<int> curveid; // Associated curve id
|
||||
Gtk::TreeModelColumn<int> shape; // 0 = Ellipse, 1 = Rectangle
|
||||
Gtk::TreeModelColumn<int> spotMethod; // 0 = Normal, 1 = Excluding
|
||||
Gtk::TreeModelColumn<int> shapeMethod; // 0 = Independent (mouse), 1 = Symmetrical (mouse), 2 = Independent (mouse + sliders), 3 = Symmetrical (mouse + sliders)
|
||||
Gtk::TreeModelColumn<int> locX;
|
||||
Gtk::TreeModelColumn<int> locXL;
|
||||
Gtk::TreeModelColumn<int> locY;
|
||||
Gtk::TreeModelColumn<int> locYT;
|
||||
Gtk::TreeModelColumn<int> centerX;
|
||||
Gtk::TreeModelColumn<int> centerY;
|
||||
Gtk::TreeModelColumn<int> circrad;
|
||||
Gtk::TreeModelColumn<int> qualityMethod; // 0 = Standard, 1 = Enhanced, 2 = Enhanced + chroma denoise
|
||||
Gtk::TreeModelColumn<int> transit;
|
||||
Gtk::TreeModelColumn<int> thresh;
|
||||
Gtk::TreeModelColumn<int> iter;
|
||||
};
|
||||
Gtk::TreeModelColumn<int> id; // Control spot id
|
||||
Gtk::TreeModelColumn<Glib::ustring> name;
|
||||
Gtk::TreeModelColumn<bool> isvisible;
|
||||
Gtk::TreeModelColumn<int> curveid; // Associated curve id
|
||||
Gtk::TreeModelColumn<int> shape; // 0 = Ellipse, 1 = Rectangle
|
||||
Gtk::TreeModelColumn<int> spotMethod; // 0 = Normal, 1 = Excluding
|
||||
Gtk::TreeModelColumn<int> shapeMethod; // 0 = Independent (mouse), 1 = Symmetrical (mouse), 2 = Independent (mouse + sliders), 3 = Symmetrical (mouse + sliders)
|
||||
Gtk::TreeModelColumn<int> locX;
|
||||
Gtk::TreeModelColumn<int> locXL;
|
||||
Gtk::TreeModelColumn<int> locY;
|
||||
Gtk::TreeModelColumn<int> locYT;
|
||||
Gtk::TreeModelColumn<int> centerX;
|
||||
Gtk::TreeModelColumn<int> centerY;
|
||||
Gtk::TreeModelColumn<int> circrad;
|
||||
Gtk::TreeModelColumn<int> qualityMethod; // 0 = Standard, 1 = Enhanced, 2 = Enhanced + chroma denoise
|
||||
Gtk::TreeModelColumn<int> transit;
|
||||
Gtk::TreeModelColumn<int> thresh;
|
||||
Gtk::TreeModelColumn<int> iter;
|
||||
};
|
||||
|
||||
class RenameDialog:
|
||||
public Gtk::Dialog
|
||||
{
|
||||
public:
|
||||
RenameDialog (const Glib::ustring &actualname, Gtk::Window &parent);
|
||||
Glib::ustring get_new_name();
|
||||
class RenameDialog:
|
||||
public Gtk::Dialog
|
||||
{
|
||||
public:
|
||||
RenameDialog (const Glib::ustring &actualname, Gtk::Window &parent);
|
||||
Glib::ustring get_new_name();
|
||||
|
||||
private:
|
||||
Gtk::Entry newname_;
|
||||
};
|
||||
private:
|
||||
Gtk::Entry newname_;
|
||||
};
|
||||
|
||||
ControlSpots spots_;
|
||||
ControlSpots spots_;
|
||||
|
||||
// Child widgets
|
||||
Gtk::ScrolledWindow scrolledwindow_;
|
||||
Gtk::TreeView treeview_;
|
||||
Glib::RefPtr<Gtk::ListStore> treemodel_;
|
||||
// Child widgets
|
||||
Gtk::ScrolledWindow scrolledwindow_;
|
||||
Gtk::TreeView treeview_;
|
||||
Glib::RefPtr<Gtk::ListStore> treemodel_;
|
||||
|
||||
Gtk::ButtonBox buttonbox_;
|
||||
Gtk::Button button_add_;
|
||||
Gtk::Button button_delete_;
|
||||
Gtk::Button button_rename_;
|
||||
Gtk::ButtonBox buttonbox_;
|
||||
Gtk::Button button_add_;
|
||||
Gtk::Button button_delete_;
|
||||
Gtk::Button button_rename_;
|
||||
|
||||
MyComboBoxText* const shape_;
|
||||
sigc::connection shapeconn_;
|
||||
MyComboBoxText* const spotMethod_;
|
||||
sigc::connection spotMethodconn_;
|
||||
MyComboBoxText* const shapeMethod_;
|
||||
sigc::connection shapeMethodconn_;
|
||||
MyComboBoxText* const qualityMethod_;
|
||||
sigc::connection qualityMethodconn_;
|
||||
MyComboBoxText* const shape_;
|
||||
sigc::connection shapeconn_;
|
||||
MyComboBoxText* const spotMethod_;
|
||||
sigc::connection spotMethodconn_;
|
||||
MyComboBoxText* const shapeMethod_;
|
||||
sigc::connection shapeMethodconn_;
|
||||
MyComboBoxText* const qualityMethod_;
|
||||
sigc::connection qualityMethodconn_;
|
||||
|
||||
Adjuster* const locX_;
|
||||
Adjuster* const locXL_;
|
||||
Adjuster* const locY_;
|
||||
Adjuster* const locYT_;
|
||||
Adjuster* const centerX_;
|
||||
Adjuster* const centerY_;
|
||||
Adjuster* const circrad_;
|
||||
Adjuster* const transit_;
|
||||
Adjuster* const thresh_;
|
||||
Adjuster* const iter_;
|
||||
Adjuster* const locX_;
|
||||
Adjuster* const locXL_;
|
||||
Adjuster* const locY_;
|
||||
Adjuster* const locYT_;
|
||||
Adjuster* const centerX_;
|
||||
Adjuster* const centerY_;
|
||||
Adjuster* const circrad_;
|
||||
Adjuster* const transit_;
|
||||
Adjuster* const thresh_;
|
||||
Adjuster* const iter_;
|
||||
|
||||
int lastObject_;
|
||||
rtengine::Coord* lastCoord_;
|
||||
int lastObject_;
|
||||
rtengine::Coord* lastCoord_;
|
||||
};
|
||||
|
||||
#endif // _CONTROLSPOTPANEL_H_
|
||||
|
||||
138
rtgui/edit.cc
138
rtgui/edit.cc
@@ -41,21 +41,21 @@ void ObjectMOBuffer::setObjectMode (ObjectMode newType)
|
||||
|
||||
if (w && h) {
|
||||
switch (newType) {
|
||||
case (OM_255):
|
||||
if (objectMode == OM_65535) {
|
||||
objectMap->unreference();
|
||||
objectMap = Cairo::ImageSurface::create (Cairo::FORMAT_A8, w, h);
|
||||
}
|
||||
case (OM_255):
|
||||
if (objectMode == OM_65535) {
|
||||
objectMap->unreference();
|
||||
objectMap = Cairo::ImageSurface::create (Cairo::FORMAT_A8, w, h);
|
||||
}
|
||||
|
||||
break;
|
||||
break;
|
||||
|
||||
case (OM_65535):
|
||||
if (objectMode == OM_255) {
|
||||
objectMap->unreference();
|
||||
objectMap = Cairo::ImageSurface::create (Cairo::FORMAT_RGB16_565, w, h);
|
||||
}
|
||||
case (OM_65535):
|
||||
if (objectMode == OM_255) {
|
||||
objectMap->unreference();
|
||||
objectMap = Cairo::ImageSurface::create (Cairo::FORMAT_RGB16_565, w, h);
|
||||
}
|
||||
|
||||
break;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -382,13 +382,13 @@ void Arcellipse::drawInnerGeometry (Cairo::RefPtr<Cairo::Context> &cr, ObjectMOB
|
||||
cr->save();
|
||||
|
||||
// To have an ellipse with radius of (rad1, rad2), a circle of radius rad1 shall be twisted with a scale
|
||||
// of rad2 / rad1 for y axis
|
||||
// Center of coordinates (x, y) in previous coordinates system becomes (X, Y) = (x, rad2 / rad1 * y) in new one
|
||||
// To go back to previous location, center shall be translated to t = -Y * (1 - rad1 / rad2) in y axis
|
||||
// (Y = rad2 / rad1 * y and y = t + Y)
|
||||
double scale_ = radius2_ / radius_;
|
||||
cr->scale (1., scale_);
|
||||
cr->translate (0., - center_.y * (1 - 1 / scale_));
|
||||
// of rad2 / rad1 for y axis
|
||||
// Center of coordinates (x, y) in previous coordinates system becomes (X, Y) = (x, rad2 / rad1 * y) in new one
|
||||
// To go back to previous location, center shall be translated to t = -Y * (1 - rad1 / rad2) in y axis
|
||||
// (Y = rad2 / rad1 * y and y = t + Y)
|
||||
double scale_ = radius2_ / radius_;
|
||||
cr->scale (1., scale_);
|
||||
cr->translate (0., - center_.y * (1 - 1 / scale_));
|
||||
|
||||
cr->arc (center_.x + 0.5, center_.y + 0.5, radius_, begang_, endang_);
|
||||
|
||||
@@ -407,13 +407,13 @@ void Arcellipse::drawInnerGeometry (Cairo::RefPtr<Cairo::Context> &cr, ObjectMOB
|
||||
cr->save();
|
||||
|
||||
// To have an ellipse with radius of (rad1, rad2), a circle of radius rad1 shall be twisted with a scale
|
||||
// of rad2 / rad1 for y axis
|
||||
// Center of coordinates (x, y) in previous coordinates system becomes (X, Y) = (x, rad2 / rad1 * y) in new one
|
||||
// To go back to previous location, center shall be translated to t = -Y * (1 - rad1 / rad2) in y axis
|
||||
// (Y = rad2 / rad1 * y and y = t + Y)
|
||||
double scale_ = radius2_ / radius_;
|
||||
cr->scale (1., scale_);
|
||||
cr->translate (0., - center_.y * (1 - 1 / scale_));
|
||||
// of rad2 / rad1 for y axis
|
||||
// Center of coordinates (x, y) in previous coordinates system becomes (X, Y) = (x, rad2 / rad1 * y) in new one
|
||||
// To go back to previous location, center shall be translated to t = -Y * (1 - rad1 / rad2) in y axis
|
||||
// (Y = rad2 / rad1 * y and y = t + Y)
|
||||
double scale_ = radius2_ / radius_;
|
||||
cr->scale (1., scale_);
|
||||
cr->translate (0., - center_.y * (1 - 1 / scale_));
|
||||
|
||||
cr->arc (center_.x + 0.5, center_.y + 0.5, radius_, begang_, endang_);
|
||||
|
||||
@@ -463,13 +463,13 @@ void Arcellipse::drawToMOChannel (Cairo::RefPtr<Cairo::Context> &cr, unsigned sh
|
||||
cr->save();
|
||||
|
||||
// To have an ellipse with radius of (rad1, rad2), a circle of radius rad1 shall be twisted with a scale
|
||||
// of rad2 / rad1 for y axis
|
||||
// Center of coordinates (x, y) in previous coordinates system becomes (X, Y) = (x, rad2 / rad1 * y) in new one
|
||||
// To go back to previous location, center shall be translated to t = -Y * (1 - rad1 / rad2) in y axis
|
||||
// (Y = rad2 / rad1 * y and y = t + Y)
|
||||
double scale_ = radius2_ / radius_;
|
||||
cr->scale (1., scale_);
|
||||
cr->translate (0., - center_.y * (1 - 1 / scale_));
|
||||
// of rad2 / rad1 for y axis
|
||||
// Center of coordinates (x, y) in previous coordinates system becomes (X, Y) = (x, rad2 / rad1 * y) in new one
|
||||
// To go back to previous location, center shall be translated to t = -Y * (1 - rad1 / rad2) in y axis
|
||||
// (Y = rad2 / rad1 * y and y = t + Y)
|
||||
double scale_ = radius2_ / radius_;
|
||||
cr->scale (1., scale_);
|
||||
cr->translate (0., - center_.y * (1 - 1 / scale_));
|
||||
|
||||
cr->arc (center_.x + 0.5, center_.y + 0.5, radius_, begang_, endang_);
|
||||
|
||||
@@ -1095,50 +1095,50 @@ void OPIcon::drivenPointToRectangle (const rtengine::Coord &pos,
|
||||
rtengine::Coord &topLeft, rtengine::Coord &bottomRight, int W, int H)
|
||||
{
|
||||
switch (drivenPoint) {
|
||||
case (DP_CENTERCENTER):
|
||||
topLeft.x = pos.x - W / 2;
|
||||
topLeft.y = pos.y - H / 2;
|
||||
break;
|
||||
case (DP_CENTERCENTER):
|
||||
topLeft.x = pos.x - W / 2;
|
||||
topLeft.y = pos.y - H / 2;
|
||||
break;
|
||||
|
||||
case (DP_TOPLEFT):
|
||||
topLeft.x = pos.x;
|
||||
topLeft.y = pos.y;
|
||||
break;
|
||||
case (DP_TOPLEFT):
|
||||
topLeft.x = pos.x;
|
||||
topLeft.y = pos.y;
|
||||
break;
|
||||
|
||||
case (DP_TOPCENTER):
|
||||
topLeft.x = pos.x - W / 2;
|
||||
topLeft.y = pos.y;
|
||||
break;
|
||||
case (DP_TOPCENTER):
|
||||
topLeft.x = pos.x - W / 2;
|
||||
topLeft.y = pos.y;
|
||||
break;
|
||||
|
||||
case (DP_TOPRIGHT):
|
||||
topLeft.x = pos.x - W;
|
||||
topLeft.y = pos.y;
|
||||
break;
|
||||
case (DP_TOPRIGHT):
|
||||
topLeft.x = pos.x - W;
|
||||
topLeft.y = pos.y;
|
||||
break;
|
||||
|
||||
case (DP_CENTERRIGHT):
|
||||
topLeft.x = pos.x - W;
|
||||
topLeft.y = pos.y - H / 2;
|
||||
break;
|
||||
case (DP_CENTERRIGHT):
|
||||
topLeft.x = pos.x - W;
|
||||
topLeft.y = pos.y - H / 2;
|
||||
break;
|
||||
|
||||
case (DP_BOTTOMRIGHT):
|
||||
topLeft.x = pos.x - W;
|
||||
topLeft.y = pos.y - H;
|
||||
break;
|
||||
case (DP_BOTTOMRIGHT):
|
||||
topLeft.x = pos.x - W;
|
||||
topLeft.y = pos.y - H;
|
||||
break;
|
||||
|
||||
case (DP_BOTTOMCENTER):
|
||||
topLeft.x = pos.x - W / 2;
|
||||
topLeft.y = pos.y - H;
|
||||
break;
|
||||
case (DP_BOTTOMCENTER):
|
||||
topLeft.x = pos.x - W / 2;
|
||||
topLeft.y = pos.y - H;
|
||||
break;
|
||||
|
||||
case (DP_BOTTOMLEFT):
|
||||
topLeft.x = pos.x;
|
||||
topLeft.y = pos.y - H;
|
||||
break;
|
||||
case (DP_BOTTOMLEFT):
|
||||
topLeft.x = pos.x;
|
||||
topLeft.y = pos.y - H;
|
||||
break;
|
||||
|
||||
case (DP_CENTERLEFT):
|
||||
topLeft.x = pos.x;
|
||||
topLeft.y = pos.y - H / 2;
|
||||
break;
|
||||
case (DP_CENTERLEFT):
|
||||
topLeft.x = pos.x;
|
||||
topLeft.y = pos.y - H / 2;
|
||||
break;
|
||||
}
|
||||
|
||||
bottomRight.x = topLeft.x + W - 1;
|
||||
|
||||
@@ -487,13 +487,13 @@ Locallab::Locallab():
|
||||
lightness->setAdjusterListener(this);
|
||||
|
||||
contrast->setAdjusterListener(this);
|
||||
/*
|
||||
Gtk::Image* iblueredL = Gtk::manage(new RTImage("ajd-wb-bluered1.png"));
|
||||
Gtk::Image* iblueredR = Gtk::manage(new RTImage("ajd-wb-bluered2.png"));
|
||||
/*
|
||||
Gtk::Image* iblueredL = Gtk::manage(new RTImage("ajd-wb-bluered1.png"));
|
||||
Gtk::Image* iblueredR = Gtk::manage(new RTImage("ajd-wb-bluered2.png"));
|
||||
|
||||
warm = Gtk::manage(new Adjuster(M("TP_LOCALLAB_WARM"), -100., 100., 1., 0., iblueredL, iblueredR));
|
||||
warm->setAdjusterListener(this);
|
||||
*/
|
||||
warm = Gtk::manage(new Adjuster(M("TP_LOCALLAB_WARM"), -100., 100., 1., 0., iblueredL, iblueredR));
|
||||
warm->setAdjusterListener(this);
|
||||
*/
|
||||
chroma->setAdjusterListener(this);
|
||||
|
||||
sensi->set_tooltip_text(M("TP_LOCALLAB_SENSI_TOOLTIP"));
|
||||
@@ -3886,7 +3886,7 @@ void Locallab::inversChanged()
|
||||
}
|
||||
|
||||
if (invers->get_active()) {
|
||||
// warm->hide();
|
||||
// warm->hide();
|
||||
sensi->show();
|
||||
llCurveEditorG->hide();
|
||||
curvactiv->hide();
|
||||
@@ -3896,7 +3896,7 @@ void Locallab::inversChanged()
|
||||
|
||||
} else {
|
||||
sensi->show();
|
||||
// warm->show();
|
||||
// warm->show();
|
||||
llCurveEditorG->show();
|
||||
curvactiv->show();
|
||||
qualitycurveMethod->show();
|
||||
@@ -4940,51 +4940,51 @@ void Locallab::colorForValue(double valX, double valY, enum ColorCaller::ElemTyp
|
||||
CursorShape Locallab::getCursor(int objectID)
|
||||
{
|
||||
switch (objectID) {
|
||||
case (2): {
|
||||
int angle = degree->getIntValue();
|
||||
|
||||
if (angle < -135 || (angle >= -45 && angle <= 45) || angle > 135) {
|
||||
return CSMove1DV;
|
||||
}
|
||||
|
||||
return CSMove1DH;
|
||||
}
|
||||
|
||||
case (3): {
|
||||
int angle = degree->getIntValue();
|
||||
|
||||
if (angle < -135 || (angle >= -45 && angle <= 45) || angle > 135) {
|
||||
return CSMove1DV;
|
||||
}
|
||||
|
||||
return CSMove1DH;
|
||||
}
|
||||
|
||||
case (0): {
|
||||
int angle = degree->getIntValue();
|
||||
|
||||
if (angle < -135 || (angle >= -45 && angle <= 45) || angle > 135) {
|
||||
return CSMove1DH;
|
||||
}
|
||||
case (2): {
|
||||
int angle = degree->getIntValue();
|
||||
|
||||
if (angle < -135 || (angle >= -45 && angle <= 45) || angle > 135) {
|
||||
return CSMove1DV;
|
||||
}
|
||||
|
||||
case (1): {
|
||||
int angle = degree->getIntValue();
|
||||
return CSMove1DH;
|
||||
}
|
||||
|
||||
if (angle < -135 || (angle >= -45 && angle <= 45) || angle > 135) {
|
||||
return CSMove1DH;
|
||||
}
|
||||
case (3): {
|
||||
int angle = degree->getIntValue();
|
||||
|
||||
if (angle < -135 || (angle >= -45 && angle <= 45) || angle > 135) {
|
||||
return CSMove1DV;
|
||||
}
|
||||
|
||||
case (4):
|
||||
return CSMove2D;
|
||||
return CSMove1DH;
|
||||
}
|
||||
|
||||
default:
|
||||
return CSOpenHand;
|
||||
case (0): {
|
||||
int angle = degree->getIntValue();
|
||||
|
||||
if (angle < -135 || (angle >= -45 && angle <= 45) || angle > 135) {
|
||||
return CSMove1DH;
|
||||
}
|
||||
|
||||
return CSMove1DV;
|
||||
}
|
||||
|
||||
case (1): {
|
||||
int angle = degree->getIntValue();
|
||||
|
||||
if (angle < -135 || (angle >= -45 && angle <= 45) || angle > 135) {
|
||||
return CSMove1DH;
|
||||
}
|
||||
|
||||
return CSMove1DV;
|
||||
}
|
||||
|
||||
case (4):
|
||||
return CSMove2D;
|
||||
|
||||
default:
|
||||
return CSOpenHand;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user