Issue
- Background image is cut off when viewing TGML graphic
- Fit the image to the background, but it does not stretch to fit when viewing the graphic
- White bars on the side or top of live graphic
Environment
TGML
Cause
The TGML root object has a few attributes that default to:
- Background = #FFFFFF (white)
- Stretch = None
- Height = 600.0
- Width = 800.0
These may not be appropriate for the graphic being created.
Resolution
- In the TGML editor, navigate to the Objects pane. If the Object pane is not visible, go to View > Objects and make sure that is checked.
-
Click on the root Tgml object.
-
Available properties are shown in the Properties pane below. If the Properties pane is not visible, go to View > Properties and make sure that is checked.
- In a pure TGML graphic, the Background color will represent the color behind all of the components. If a large background jpg or bmp image is used, the Background color will represent the color that will show up as bars on the top and right of the graphic when it is not sized perfectly to fit in the viewer's window (if Stretch is set to None).
-
Stretch will have three different options (this is also a user defined option, this attribute merely sets the default presentation):
- None -- The size of the graphic in the TGML editor is preserved in the viewer's window. This may result in blocks of color on the top or right of the graphic. It may also result in sections of the graphic being cut off from the view requiring the user to scroll to view.
- Uniform -- The graphic is stretched to fit the larger of either the height or width of the viewer's window. The aspect ratio of the graphic is preserved. This may result in blocks of color on the top or right of the graphic.
- Fill -- The graphic is stretched in both the horizontal and vertical direction to fill the entire screen. This may result in a stretched or skewed presentation of the graphic.
- Height and Width will set the height and width of the graphic when Stretch is set to None. In a pure TGML graphic with all vectored components, the height and width are merely relative to the size of the components and aren't of great concern. However, when a background jpg or bmp image is used, the height and width should be set to match the dimensions of the background image.