Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [Solved]QPixmap being clipped after rotation

[Solved]QPixmap being clipped after rotation

Scheduled Pinned Locked Moved General and Desktop
2 Posts 1 Posters 1.2k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    stereomatching
    wrote on last edited by
    #1

    @

    QImage img("lena.jpg");

    rotate_image_implace(img, angle); //rotate the img with angle degrees
    graph_pixmap_->setPixmap(QPixmap::fromImage(img));
    graph_scene_->setSceneRect(img.rect());

    @

    type of graph_pixmap_ is QGraphicsPixmapItem
    type of graph_scene_ is QGraphicsScene

    This may clip the image if their height and width are different, how could
    I rotate the image without clipping it?

    Because the program need to save the image after rotating and mirror(vertical and horizontal),
    rotation of QGraphicsPixmapItem is not adopted.

    1 Reply Last reply
    0
    • S Offline
      S Offline
      stereomatching
      wrote on last edited by
      #2

      After struggling of several hours, I find out that my scaling methods has some bugs, sorry to
      bother you all.

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved