示例#1
0
void CSwordDlg::DrawMsrLabel(CPoint Point)
{
    CString SX;//Small x
    CString SY;//Small y
    CString Lv;//Small Lv
    CString str;//輸出字串

    //設定點
    CPoint ShiftPoint(0,165);
    CPoint RectPoint(200,200);
    CPoint StartDrawPoint = Point+ShiftPoint;//移到圈圈邊,寫字區塊開始點
    CPoint EndDrawPoint = RectPoint+StartDrawPoint;//寫字區塊結束點
    CRect rect(ShiftPoint,EndDrawPoint);//設定文字區塊

    CDC* pDC = new CClientDC(this);
    SX.Format("%f",m_IProbe.GetSx());
    SY.Format("%f",m_IProbe.GetSy());
    Lv.Format("%f",m_IProbe.GetLv());

    str = "x ="+SX+"\n"+"y ="+SY+"\n"+"Lv="+Lv;
    pDC->DrawText(str, &rect, DT_LEFT | DT_VCENTER);
    UpdateData(FALSE);
}
示例#2
0
文件: navigator.cpp 项目: morsya/omim
m2::PointD Navigator::PtoG(m2::PointD const & pt) const
{
  return m_Screen.PtoG(ShiftPoint(pt));
}
示例#3
0
文件: navigator.cpp 项目: morsya/omim
void Navigator::GetTouchRect(m2::PointD const & pixPoint,
                             double pxWidth, double pxHeight,
                             m2::AnyRectD & glbRect) const
{
  m_Screen.GetTouchRect(ShiftPoint(pixPoint), pxWidth, pxHeight, glbRect);
}
示例#4
0
文件: navigator.cpp 项目: morsya/omim
m2::PointD Navigator::GtoP(m2::PointD const & pt) const
{
  return m_Screen.GtoP(pt) - ShiftPoint(m2::PointD(0.0, 0.0));
}
示例#5
0
文件: navigator.cpp 项目: morsya/omim
void Navigator::GetTouchRect(m2::PointD const & pixPoint, double pixRadius, m2::AnyRectD & glbRect) const
{
  m_Screen.GetTouchRect(ShiftPoint(pixPoint), pixRadius, glbRect);
}