Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3354330
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T02:15:36+00:00 2026-05-18T02:15:36+00:00

rotate image on canvas around its center . i tried some example from net

  • 0

rotate image on canvas around its center . i tried some example from net but i am failed

if i am using bitmap.creatbitmap with matrix i am getting error

Please suggest me which is better

Thanks in advance

Aswan

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T02:15:36+00:00Added an answer on May 18, 2026 at 2:15 am

    You can use a matrix to rotate. First you set the position (I’m using the coordinates of the bitmap’s centre). Then apply a rotation. Then draw using your matrix.

        Matrix transform = new Matrix();
        transform.setTranslate(xOfCentre, yOfCentre);
        transform.preRotate(turnDegrees, width/2, height/2);
        canvas.drawBitmap(bitmap, transform, null);
    

    If you want your turning to be animated, then see my answer to “animating and rotating an image…”.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm having trouble roating an image around itself using Canvas. Since you can't rotate
When you rotate an image using canvas, it'll get cut off - how do
How do you rotate an image with the canvas html5 element from the bottom
I found some good resources for rotating a bitmap in android here and elsewher
I am working on a plan to build an online image editor with just
I need to rotate an ImageView by a few degrees. I'm doing this by
I'm trying to figure out how to rotate a single object on an html
I got the idea to create a purely code-driven striped image background when I
With reference to this programming game I am currently building. alt text http://img12.imageshack.us/img12/2089/shapetransformationf.jpg To
my app has a photoshop like feature wherein the user can create a new

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.