K keirS Well-Known Member Licensed User Longtime User Aug 3, 2020 #1 I am curious as to why this is? Backward comparability with 32bit IOS devices where CGFloat isn't a double value?
I am curious as to why this is? Backward comparability with 32bit IOS devices where CGFloat isn't a double value?
Erel B4X founder Staff member Licensed User Longtime User Aug 3, 2020 #2 Moved to the questions forum. B4XCanvas is a cross platform type and It is the same API as in B4A and B4i, which are based on floats. I don't think that there is any case in B4J where it will matter that the floats are cast to double. Upvote 0
Moved to the questions forum. B4XCanvas is a cross platform type and It is the same API as in B4A and B4i, which are based on floats. I don't think that there is any case in B4J where it will matter that the floats are cast to double.
K keirS Well-Known Member Licensed User Longtime User Aug 3, 2020 #3 I am using B4XRect to define bounding boxes.. So it's a case of casting a double to a float. Isn't it possible there could be edge cases where the B4XView touch action coordinates would be inside the bounding box if a double was used and outside when using a float? Upvote 0
I am using B4XRect to define bounding boxes.. So it's a case of casting a double to a float. Isn't it possible there could be edge cases where the B4XView touch action coordinates would be inside the bounding box if a double was used and outside when using a float?
Erel B4X founder Staff member Licensed User Longtime User Aug 3, 2020 #4 No. Code: Copy Sub Pane1_MouseMoved (EventData As MouseEvent) Log(EventData.X) End Sub You will see that it is pixel based. Upvote 0
No. Code: Copy Sub Pane1_MouseMoved (EventData As MouseEvent) Log(EventData.X) End Sub You will see that it is pixel based.
K keirS Well-Known Member Licensed User Longtime User Aug 3, 2020 #5 I am not using the MouseMoved event. I am using the TOUCH_ACTION_UP, TOUCH_ACTION_DOWN and TOUCH_ACTION_MOVE events for cross platform compatability hence my question. . Upvote 0
I am not using the MouseMoved event. I am using the TOUCH_ACTION_UP, TOUCH_ACTION_DOWN and TOUCH_ACTION_MOVE events for cross platform compatability hence my question. .
Erel B4X founder Staff member Licensed User Longtime User Aug 3, 2020 #6 It doesn't matter. The precision of float is much higher than the precision of the various mouse events. Upvote 0
It doesn't matter. The precision of float is much higher than the precision of the various mouse events.