Trying to take a square out of an image and display only that square

I have an image that is 1800 wide by 800 high, I am trying to display just a portion of that image into the left, top corner of the screen. My square is, for the sake of an example, top: 291 left:300 width: 100 height:175. I tried using the xReference, yReference, xOrigin, yOrigin, width and height to accomplish this but to no avail. How do I do this, surely their must be a way?

Thank you [import]uid: 97768 topic_id: 17925 reply_id: 317925[/import]

You could apply a mask to the object and have it only display a certain part of the image

http://developer.anscamobile.com/reference/index/graphicsnewmask [import]uid: 14018 topic_id: 17925 reply_id: 68444[/import]

Thanks for the idea but with masks, I need to define an image that will be of a certain size. In my case it is a catalog page that has several items and when I click on one item, I want to show that item in a popup which means that I do not know all of the items sizes. My app now defines what object I have clicked on, returns the size and positioning but when I try to simply take these coordinates and print the image, it does not appear.

Still open for suggestions :slight_smile: [import]uid: 97768 topic_id: 17925 reply_id: 68446[/import]

@g.houde,

I have a custom solution for you which *costs* if you are interested, you can get in touch me dev [@] oz-apps [dot] com. [import]uid: 3826 topic_id: 17925 reply_id: 68484[/import]

Thanks Jayant but I figured it out. I have between 1 and 7 different image fragment on the same screen so I couldn’t use the References and Origins in order to put the image where I wanted and then inserting Rects around the image to hide the excess as the next image could overlay on top of my previous image, so I did using the display.save function for each image, saving those images in the top left corner of the screen and then using those images to display using again the reference and the origins. It works like a charm :slight_smile: [import]uid: 97768 topic_id: 17925 reply_id: 68566[/import]