Saturday, 15 June 2013

image - How to place picture in top left corner of device? -


Corona SDK

I think this is a configured problem.

When I open Coreona, I typed in dimensions for 720 and 1280 because I wanted to change my view primarily for Galaxy 3.

Is it necessary? Can I just continue by clicking on the phone preset? Then change my idea to whatever device I want ??

The problem is that when I type:

  place1 = display.newImage ("room.jpg")   

Image appears.

Now, I would like to modify the image. I want my width to be half of the screen.

I tried some things, but nothing worked.

Then I changed it:

  place1 = display.newImageRect ("room.jpg", display.contentWidth / 2, display.contentHeight / 2)   

But this result is being pushed to the left side of the image and upwards that you can hardly see it!

How do I reveal the image, modify its dimensions, and how can I place it in the left hand corner of the screen in place of without cutting?

It pushes left and upwards because the reference point of the image is pointing to the center I think that you need some calculation to make it to the top left of your screen I have made some estimation for my image so that you hope it can help you

 < Code> local place1 = Display.newImage ("Images / Location 1 page", 0,0, true) Location 1. XSCL = (0.5 * position 1. Content window) / location 1. Content vs. Dth place1 .yScale = place1 .xScale location1 .x = place1 .contentWidth / 2 place1 .y = place1 .contentHeight / 2   

Change the value of the bus 1.x Position Status You want to create

No comments:

Post a Comment