Skip to content

Commit

Permalink
Add Vector2D conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
WandererFan committed Jan 30, 2017
1 parent fad1edb commit c0ab95a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/Mod/TechDraw/Gui/Rez.cpp
Expand Up @@ -73,6 +73,20 @@ double Rez::appX(double x)
return x / getRezFactor();
}

Base::Vector2d Rez::appX(Base::Vector2d v)
{
Base::Vector2d result(appX(v.y),appX(v.y));
return result;
}

Base::Vector3d Rez::appX(Base::Vector3d v)
{
Base::Vector3d result(appX(v.x),appX(v.y),appX(v.z));
return result;
}


//Misc conversions
QPointF Rez::guiPt(QPointF p)
{
QPointF result = p;
Expand Down
2 changes: 2 additions & 0 deletions src/Mod/TechDraw/Gui/Rez.h
Expand Up @@ -45,6 +45,8 @@ class TechDrawGuiExport Rez
static Base::Vector3d guiX(Base::Vector3d v);
//turn Gui side value to App side value
static double appX(double x);
static Base::Vector2d appX(Base::Vector2d v);
static Base::Vector3d appX(Base::Vector3d v);

static QPointF guiPt(QPointF p);
static QPointF appPt(QPointF p);
Expand Down

0 comments on commit c0ab95a

Please sign in to comment.