fix float point touchInfo
authorminkyu kim <imetjade.kim@samsung.com>
Tue, 12 Mar 2013 09:29:10 +0000 (18:29 +0900)
committerminkyu kim <imetjade.kim@samsung.com>
Tue, 12 Mar 2013 09:29:10 +0000 (18:29 +0900)
Change-Id: Ib876b0c192f75636c492ca0ade88f57cde838f2d

src/FShell_LiveboxPopupView.cpp
src/FShell_LiveboxView.cpp

index 5303cac..420aaeb 100644 (file)
@@ -46,6 +46,7 @@
 #include "FUiAnim_VisualElement.h"
 #include "FUiAnim_VisualElementImpl.h"
 #include "FUiAnim_VisualElementSurfaceImpl.h"
+#include "FUi_CoordinateSystemUtils.h"
 
 using namespace std;
 using namespace Tizen::Base;
@@ -305,7 +306,7 @@ _LiveboxPopupView::OnTouchPressed(const _Control& source, const _TouchInfo& touc
        double x = 0.0;
        double y = 0.0;
 
-       Point position = touchInfo.GetCurrentPosition();
+       Point position = _CoordinateSystemUtils::ConvertToInteger(touchInfo.GetCurrentPosition());
        GetTouchPostion(FloatPoint(static_cast<float>(position.x), static_cast<float>(position.y)), x, y);
 
        livebox_content_event(__pLiveboxView->__pLivebox, PD_MOUSE_DOWN, x, y);
@@ -318,7 +319,7 @@ _LiveboxPopupView::OnTouchReleased(const _Control& source, const _TouchInfo& tou
 {
        FloatRectangle clientBounds(GetClientBoundsF());
 
-       Point position = touchInfo.GetCurrentPosition();
+       Point position = _CoordinateSystemUtils::ConvertToInteger(touchInfo.GetCurrentPosition());
        FloatPoint floatPosition(static_cast<float>(position.x), static_cast<float>(position.y));
 
        if (!clientBounds.Contains(floatPosition))
@@ -342,7 +343,7 @@ _LiveboxPopupView::OnTouchMoved(const _Control& source, const _TouchInfo& touchI
        double x = 0.0;
        double y = 0.0;
 
-       Point position = touchInfo.GetCurrentPosition();
+       Point position = _CoordinateSystemUtils::ConvertToInteger(touchInfo.GetCurrentPosition());
        GetTouchPostion(FloatPoint(static_cast<float>(position.x), static_cast<float>(position.y)), x, y);
 
        livebox_content_event(__pLiveboxView->__pLivebox, PD_MOUSE_MOVE, x, y);
index 36ec53e..9b4627d 100755 (executable)
@@ -40,6 +40,7 @@
 #include "FUiAnim_EflNode.h"
 #include "FUiAnim_VisualElementImpl.h"
 #include "FUiAnim_VisualElementSurfaceImpl.h"
+#include "FUi_CoordinateSystemUtils.h"
 
 using namespace std;
 using namespace Tizen::App;
@@ -391,7 +392,7 @@ _LiveboxView::OnTouchPressed(const _Control& source, const _TouchInfo& touchInfo
                double x = 0.0;
                double y = 0.0;
 
-               Point position = touchInfo.GetCurrentPosition();
+               Point position = _CoordinateSystemUtils::ConvertToInteger(touchInfo.GetCurrentPosition());
                GetTouchPostion(FloatPoint(static_cast<float>(position.x), static_cast<float>(position.y)), x, y);
 
                livebox_content_event(__pLivebox, LB_MOUSE_DOWN, x, y);
@@ -404,7 +405,7 @@ bool
 _LiveboxView::OnTouchReleased(const _Control& source, const _TouchInfo& touchInfo)
 {
        FloatRectangle clientBounds(GetClientBoundsF());
-       Point position(touchInfo.GetCurrentPosition());
+       Point position(_CoordinateSystemUtils::ConvertToInteger(touchInfo.GetCurrentPosition()));
        FloatPoint floatPosition(static_cast<float>(position.x), static_cast<float>(position.y));
 
        if (clientBounds.Contains(floatPosition))
@@ -436,7 +437,7 @@ _LiveboxView::OnTouchMoved(const _Control& source, const _TouchInfo& touchInfo)
                double x = 0.0;
                double y = 0.0;
 
-               Point position = touchInfo.GetCurrentPosition();
+               Point position = _CoordinateSystemUtils::ConvertToInteger(touchInfo.GetCurrentPosition());
                GetTouchPostion(FloatPoint(static_cast<float>(position.x), static_cast<float>(position.y)), x, y);
 
                livebox_content_event(__pLivebox, LB_MOUSE_MOVE, x, y);