IMAGE_ZOOM Built-in
Description
Zooms the image in or out using the effect specified in zoom_type and the amount specified in zoom_factor.
Syntax
PROCEDURE IMAGE_ZOOM
(image_id ITEM,
zoom_type NUMBER);
PROCEDURE IMAGE_ZOOM
(image_name VARCHAR2,
zoom_type NUMBER);
PROCEDURE IMAGE_ZOOM
(image_id ITEM,
zoom_type NUMBER,
zoom_factor NUMBER);
PROCEDURE IMAGE_ZOOM
(image_name VARCHAR2,
zoom_type NUMBER,
zoom_factor NUMBER);
Built-in Type unrestricted procedure
Enter Query Mode yes
Parameters
- image_id
-
- Specifies the unique ID Oracle Forms assigns when it creates the image
item. The data type of the ID is ITEM.
-
- image_name
-
- Specifies the name you gave the image when defining it.
-
- zoom_type
-
- Specify one of the following constants to describe the effect you want to
have on the image displayed:
ADJUST_TO_FIT Scales the image to fit within
the display rectangle: the entire image is visible and the image fills as
much of the image item as possible without distorting the image.
SELECTION_RECTANGLE Scales the image so the
selected region fully fills the image item.
ZOOM_IN_FACTOR Enlarges the image by the zoom_factor.
ZOOM_OUT_FACTOR Reduces the image by the zoom_factor.
ZOOM_PERCENT Scales the image to the percentage
indicated in zoom_factor.
-
- zoom_factor
-
- Specifies either the factor or the percentage to which you want the image
zoomed. Supply a whole number for this argument.
Usage Notes
- Check zoom_factor for reasonableness. For example, specifying a
ZOOM_IN_FACTOR of 100 would increase the size of your image 100 times, and
could cause your application to run out of memory.
- When specifying ZOOM_IN_FACTOR or ZOOM_OUT_FACTOR, you can use any positive
integer value for zoom_factor, but performance is optimal if you
use 2, 4, or 8.
- When specifying ZOOM_PERCENT, you can use any positive integer value for
zoom_factor. To enlarge the image, specify a percentage greater than
100.
- The operator must use the mouse to select a region before specifying SELECTION_RECTANGLE,
or Oracle Forms will return an error message.
- Your design should include scroll bars on images that use SELECTION_RECTANGLE.
- Valid for both color and black-and-white images.
IMAGE_ZOOM Example
The following example shows a When-Button-Pressed trigger that doubles the
size of the image every time the button is pressed:
Image_Zoom('my_image', zoom_in_factor, 2);