why do you use rectf to draw a circle? is it a 'true' circle, or is it really oval / ellipse?
if it's just a circle, why don't you use this.
canvas.drawcircle(x, y, radius, paint);
so you won't need to transform rectf's points if it's tilted :)
i believe this should work, i don't have an android workflow setup with me to really test it; sorry if it's a miss.
matrix m = new matrix(); //creates identity matrix m.setrotate(tilt_angle); //rotate it by the tilt angle m.maprect(ovalbounds); //transform the rect
// rectf face: face position and dimentions // create bitmap where to draw an oval bitmap ovalbmp = bitmap.createbitmap( face.width(), face.height(), config ); canvasbmp = new canvas(ovalbmp); // get a canvas to draw an oval on the bitmap canvasbmp.drawoval( new rectf( 0, 0, face.width(), face.height ), paint ); // create transformation matrix transformatrix = new matrix(); // rotate around center of oval transformatrix.postrotate( tilt_angle, face.width() / 2, face.height() / 2 ); transformatrix.posttranslate( face.left, face.top ); canvas.drawbitmap( ovalbmp, transformatrix, null );
ps: i assume by tilt angle you mean roll, where pitch is rotation around x axis, yaw is rotation around y axis and roll is rotation around z axis.
- Can a perfect circle encompassing face be formed using euler angle in face detector
- How can I crop Detected Face from the Video Streaming and store it in a folder using OpenCV Java?
- How can I create a class that will compute the area and circumference of a circle and send the results using eclipse?
- Can circle be converted into oval using radius in Canvas
- Can new TestNG plugin ruin my perfect code using old TestNG
- Getting "CHECKOUT can only be performed on a version resource" when trying to commit using Eclipse subversive plugin
- Using the Android SDK on a Mac, Eclipse is really slow. How can I speed it up?
- How can you unstash changes using EGit?
- How can I check/upgrade Proguard version when using it in Eclipse for Android development?
- How can I go to the next Eclipse marker (e.g. build error) using the keyboard?
- How can I make hidden files display in Eclipse Project explorer when using a RSE linked folder?
- How can I stop using a mouse while programming in my IDE?
- Is there any way I can write (copy-paste) nicely-formatted SQL queries in Java string literals using Eclipse?
- How can I create a Windows .exe (standalone executable) using Java/Eclipse?
- How can I add build path items to Eclipse 3.5 using relative paths?
- IntelliJ vs STS (SpringSource Tool Suite), what am I missing by using one or the other and can I make them feature equivalent for comparsion?
- When using Eclipse with FindBugs can you mark a bug as not a bug and have it removed from the bug list?
- How can I view the outline in eclipse when using the revealing module pattern?
- Can I avoid running junit tests twice in eclipse when using a TestSuite?
- Can I detect change in text fields in SWT?
- Can detect system Proxy Settings in Java application, but not in JUnit
- How can i see the live parse tree using Antlr4 Ide in Eclipse?
- How I can speed up the build process using Maven
- Spring Tool Suite (STS) - Can not import using Gradle (Buildship)
- Using the JGIT, how can I retrieve the line numbers of added/deleted lines
- How can I statically detect missing @Override annotations?
- When using Eclipse and Egit I can not push to upstream
- how can I remove generic type from class using refactoring
- How can I make Eclipse CDT auto-indent properly when using BOOST_FOREACH?
- How can I see the content of a ResultSet object inspecting it using the Eclipse debugger?
More Query from same tag
- Admob ad in Listview
- Blackberry - App does not launch after signature
- Is THIS necessary if I want to develop Augmented Reality in Android/Eclipse?
- Where does Eclipse install itself? - to_do
- error installing mercurial plugin for eclipse
- Used Microsoft Office to create list of select options, single quote pasting to eclipse no recognized
- Unable to run Application on Apache Tomcat 7
- Eclispe does not show progress bar of user threads
- Add src/main/webapp to jar for spring boot
- How to attach Android source to Eclipse?
- Eclipse Pydev and accepting incoming connections dialog in macOS
- Deploy Cloned Servlet to Tomcat
- eclipse couldn't connect internet?
- HTTP Request without opening browser - ANDROID
- Netbeans generated code
- Eclipse confuses source folders with package folders
- exception NumberFormatException ListView OnItemClickListener
- eclipse plugin does not work after update to juno (eclipse 4)
- GAE app debugging slow in Eclipse Indigo Java EE IDE
- Graphical Layout Editor not DROPPING
- How to Create play button to play Sound?
- Console in Eclipse Helios for Java not updating when I edit a class
- New maven project
- how do i get eclipse to interpret .ejs files as .html?
- Loading Gradle Project preview failed
- NoClassDefFoundError when running Facebook official example
- How to change font size in Eclipse for Java text editors?
- Cannot create new spring-servlet.xml file
- Second overview ruler in Eclipse
- Java EE eclipse project directory structure?