2013-12-18 36 views
8

将Rect变量转换为RectF的最佳方式是什么?我无法施展它。将Rect转换为RectF

RectF rect = (RectF) currentRect; //produces an error 
+0

的可能的复制[什么是从RectF到Android的一个矩形转换的最佳方式?(http://stackoverflow.com/questions/16449145/what-is-the-best三通对转换 - 从-A-rectf至A-RECT功能于机器人) –

回答

16
RectF rect = new RectF(currentRect);