graphics - What is the best way to convert from a RectF to a Rect in Android? -


i convert rectf rect in android. have:

rectf rectf = new rectf(); rectf.set( ... values ... );  ...  rect rect = new rect((int)rectf.left,                      (int)rectf.top,                      (int)rectf.right,                      (int)rectf.bottom)); 

is there better way?

ah ha -- found answer:

rectf.round(rect);  -- or --  rectf.roundout(rect); 

Comments

Popular posts from this blog

java - Jmockit String final length method mocking Issue -

asp.net - Razor Page Hosted on IIS 6 Fails Every Morning -

c++ - wxwidget compiling on windows command prompt -