|
Image region
An image region is a set of pictures that changes according to a changing model variable. It can have coloured boundaries, and its position, size and colours can be linked to a variable from your model.
The variable that you link to the image region has to take integer values ranging from 1 and up. You then create a list of pictures and the value of the variable determines which picture is displayed. Use for instance the following line in your equation model:
Picture = if x=>0 then picture = 1 else if x>5 then picture = 2 else if x>15 then picture = 3 else
picture = 4 endif endif endif
To link the variable ‘Picture’ to your Image region, go to Image Value. In this case, you must add three pictures to your image list. This is done on the Basics tab sheet.
Tab sheet: Basics
| 1. | Click the Basics tab sheet. |
| 2. | If you want the image region to get the size of the selected image, click the Fit bounds check box. |
| 3. | If you want the image in the center of the image region, click the Center image check box. |
| 4. | If you want the image region to have rounded borders instead, click the Rounded Box check box. |
| 5. | Wat is Display fast precies? |
| 6. | To add a picture, click Browse, select a file, and click Ok. To view the image, click Show Image. |
| 7. | The first picture, so the one on top of the list, is displayed when the linked variable has the value 1. The second one is connected to value 2 etc.. You can move an image up and down the list using the arrows on the right of the tab sheet. |
| 8. | To remove a picture from the list, click on Del. |
Tab sheet: Image Value
| 1. | Click the Image Value tab sheet. |
| 2. | Decide whether you want to have only one picture in your image region (Fixed) or if you want to use multiple images. |
| 3. | Choose the variable you want to link to your image list. When using the example on top of this page, this variable would have to be ‘Picture’. When using a variable, enter an optional factor with which you want to multiply the value of your variable. |
| 4. | In the Default Image Variable box, choose the (boolean) variable that sets the visibility of the default image. 0 = invisible, 1 = visible. |
Tab sheet: Position
| 1. | Click the Position tab sheet. |
| 2. | Decide whether you want the learner to be able to move the Image Region during runtime. You can choose to allow motion horizontally (in x-direction), vertically (y-direction) or both, by clicking the regarding check box under Can be dragged during runtime. Just choose None if you do not want the learner to be able to interfere with the position of the Image Region during runtime (default). |
| 3. | Decide if the x-coordinate should be a Fixed number, or if you want to make it dependent on one of your model's parameters. |
| 4. | When you have chosen for a moving Image Region, choose the variable you want to link to the x-position. Enter a factor with which the value of your variable should be multiplied (optional, default = 1). |
| 5. | Repeat from step 3 to link a variable to the position on the vertical axis. |
Tab sheet: Anchor
| 1. | Decide if you want the origin of your coordinate system to be at the Center (default), or the Top - Left, Top - Right, Bottom - Left or Bottom - Right corner of the Image Region. |
Tab sheet: Size
| 1. | Click the Size tab sheet. |
| 2. | Decide whether you want the Image Region to have a Fixed width or if you want to link this width to a variable from your model by clicking the check box. |
| 3. | When you have chosen for a variable width, choose the variable you want to use from the pull-down list. Enter a factor with which the value of your variable should be multiplied (optional, default = 1). For a fixed size, just enter a number. |
| 4. | Repeat from step 2 to set the height of the Image Region. |
Tab sheet: Line Width
| 1. | Decide whether you want the border of the Image Region to have a Fixed width or if you want to link this width to a variable from your model by clicking the check box. |
| 2. | When you have chosen for a variable width, choose the variable you want to use from the pull-down list. Enter a factor with which the value of your variable should be multiplied (optional, default = 1). For a fixed Line Width, just enter a number. |
Tab sheet: Fill Colour
| 1. | Click the Fill Colour tab sheet. |
| 2. | Choose a colour model: RGB (default), CMY or HSB. |
| 3. | Decide which of the colour-parameters you want to change. |
| 4. | Choose the variable you want to link to this change. Optionally, set a factor with which you want to multiply the value of this variable. Click here for more information on using colour models. |
Tab sheet: Border Colour
| 1. | Click the Border Colour tab sheet. |
| 2. | Choose a colour model: RGB (default), CMY or HSB. |
| 3. | Decide which of the colour-parameters you want to change. |
| 4. | Choose the variable you want to link to this change. Optionally, set a factor with which you want to multiply the value of this variable. Click here for more information on using colour models. |
Tab sheet: Default Colour
| 1. | Click the Default Colour tab sheet. |
| 2. | Select a colour in the palette. |
| 3. | Select the part that must get the chosen colour. |
Related topics:
Animation Elements
Copyright University of Twente 2011
|