Current Page:
NeXtMidas Training
Macros - Part 1 (Basics)
Lab 10
Instructions
|
- Start Here
+ Background
+ Common Midas Concepts
+ Getting Started
+ Working with Files
+ Option Trees
- Macros - Part 1 (Basics)
+ Macro Basics
+ Lab 1
+ Lab 2
+ Loops and Control Structures
+ Lab 3
+ Lab 4*
+ Procedures and Subroutines
+ Lab 5
+ Lab 6*
+ Pipes in a Macro
+ Lab 7
+ Lab 8
+ Messages in a Macro
+ Lab 9
- Lab 10
- Instructions
- Solution
+ Macros - Part 2 (Graphics)
+ Primitives
+ Installing NeXtMidas
+ Applets & WebStart
- Mapping (NeXtEarth)
+ Remote Midas InterFace (RMIF)
+ Using NetBeans
+ X-Midas Interoperability
+ Remoting an X-Midas App.
|
- Lab 10 (Part A):
- Lab 10 (Part B):
- Now, if the box is showing, we are going to limit the user to only zooming in
if they zoom inside the box.
- First we need to know if they are inside the box. This can be done by taking the
zoom limits and making sure they are all inside the box's limits set by
x , y , dx , and dy .
- For now just print out a message indicating if the zoom is inside the box. If the
box is not showing (all values are zero), print out a message saying that it isn't
showing.
- Try running the macro and notice what happens when you zoom and unzoom.
- Lab 10 (Part B):
- We are going to prevent illegal zooms (outside of the box) by automaticallu unzooming
if any part of the zoom is outsize and the boz is not zero.
- To unzoom send a message named
UNZOOM to the plot using the
MESSAGE command.
- No
info= or data= are required.
- Try running the macro and notice what happens when you zoom and unzoom.
|