View unanswered posts | View active topics It is currently Sat Oct 23, 2021 7:18 am



Reply to topic  [ 1 post ] 
 Cropping an image: How to map model point to screen? 
Author Message

Joined: Tue Mar 26, 2013 12:38 pm
Posts: 2
Post Cropping an image: How to map model point to screen?
Hello,
I want to take a screenshot of the objects i have on the scene, but removing all the background so the image size is the same as the bounding box of my collection.
I'm thinking that i should have something like this:
Code:
   
//Crop the image to remove the background if the option is checked
    if(cropBackground->isChecked())
    {
        QImage croppedimage;
        GLC_BoundingBox box = m_pOpenglView->globalBoundingBox();

        //Map the bounding box to the screen-projected image
        ???

        QRect cropbox = QRect( whatever);
        cropedImage = imageToSave.copy(cropbox);
    }

and I saw that the GLC_ViewPort has an unProject method which makes the opposite of what I want, so I just wanted to ask if maybe i'm looking in the wrong place and there is already a way to get screen coordinates for the bounding box.
Thanks in advance for any help!


Mon Jun 24, 2013 11:45 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 1 post ] 

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.