| | | | Browse by category |
Article ID: 2136
Last updated: 28 May, 2018
Question
How zooming on a network component can affect the label's visibility?
Answer
This sample shows how changing the zoom factor affects the visibility of network elements labels. It also shows how changing the value of the visibility threshold for objects such as labels allows you to control their visibility according to the zoom.
- A single element with a label is displayed in the network.
- The function
IltrZoom.GetVisibilityThreshold(IltGraphicElementName elementName)
shows the visibility threshold for network elements.
Note: To get the actual zoom factor beyond which no label will be seen, you have to take the square root of this value. The IltGraphicElementName elementName parameter corresponding to a network element label isIltGraphicElementName.Name
. The default visibility threshold for labels is 0.6, which means that when the zoom level goes below 0.77 (the square root of 0.6), the labels will no longer be visible.
- There is a
TransformerListener
connected to the network, which gives the new zoom level whenever it changes.
- The zoom policy being used is the
IltPhysicalZoomPolicy.
- Aspect ratios are fixed (
setKeepingAspectRatio(true)
).
Sample: Main.java
This article was:
Helpful |
Not helpful
Report an issue
Article ID: 2136
Last updated: 28 May, 2018
Revision: 3
Views: 717
Posted: 14 Jan, 2004 by
Dean J.
Updated: 28 May, 2018 by
Gargani A.
Attached files
Also listed in
Others in this category
Powered by KBPublisher (Knowledge base software)