Tizen Native API  4.0
Photocam example

In this example we will have a photocam and a couple of buttons and slider to control the photocam. To avoid cluttering we'll only show the parts of the example that relate to the photocam, the full source code can be seen here.

Creating a photocam is as easy as creating any other widget:

A photocam is only useful if we have a image on it, so lets set a file for it to work with:

We now set the photocam to not bounce horizontally:

And we want to know when the photocam has finished loading the image so:

The reason to know when the image is loaded is so that we can bring the center of the image into view:

As mentioned we have 2 buttons in this example, the "Fit" one will cause the photocam to go in to a zoom mode that makes the image fit inside the photocam. Tough this has no effect on the image we also print what region was being viewed before setting the zoom mode:

Note:
When in fit mode our slider(explained below) won't work.

The second button("Unfit") will bring the photocam back into manual zoom mode:

Our slider controls the level of zoom of the photocam:

Note:
It is important to note that this only works when in manual zoom mode.

Our example will initially look like this:

photocam_example_01.png