Layout and Image Files
A layout for use in TrainPlayer consists of two
files:
- The layout file (extension .rrw). The
layout file contains the definitions of all tracks, trains, stations, and
every other object and bit of data about the layout.
You can see for
yourself -- an rrw file is plain text in xml format, so you can open it with
Notepad or any text editor. Better yet, change its extension to .xml
and double-click -- it will open in your browser in collapsible outline
form.
- The image file (extension .jpg, .bmp, .png,
.gif, .tpg). The image file contains the background graphics --
scenery, text, and track lines in a picture of the track plan.
Image files can come from a variety of sources. An image
file suitable for TrackLayer use has these
characteristics:
- High resolution. The resolution should
be 300 DPI (pixels per inch), so that it will look good in close-up
views. A typical high-resolution image file is around 1MB in
size.
- Cropped. The image should be cropped
tightly around the edges of the layout, with a minimum of white space
surrounding. This makes better use of your screen space and allows the
program to calculate the layout size accurately.
- Standard format. TrackLayer accepts
standard JPG,
GIF, BMP, and PNG formats, as well as our own called TPG, the "TrainPlayer Protected Graphics" format, an
encrypted form of a JPG file. The encryption prevents the image from being
used in programs other than TrainPlayer and TrackLayer, and protects the file
from opening without the appropriate license. If you are licensed to use a
layout in TrainPlayer, then you can open the TPG file in TrackLayer to use as
background.
Layouts distributed with TrainPlayer are installed in the
trainplayer\layouts directory (.rrw files) and trainplayer\layouts\images
(.tpg). When you create a new layout with TrackLayer, you can store it in
the same directories and it will show up in the Open Layouts dialog.
The rrw file contains the name and relative location of
its image file. The two files need not be in the same location.
Preparing an Image
Images on Paper: If you have a track plan from a book or magazine, or a
drawing on a sheet of paper, the picture will need to be scanned or otherwise
digitized. Here are three ways to do this:
- Scan it yourself. If you have a scanner,
set it for 300 DPI, scan, and use the scanner software to crop and rotate
the image if necessary. Save as JPG.
- Visit Kinko's. Many outfits will do
scanning. Take the picture, a few dollars, a blank CD if you have one,
and return with an image file.
- Use a camera. A good high-resolution
image can be made with a digital camera aimed at a layout picture or at the
layout itself, if you
have the equipment and the know-how.
Images from the Web: If you have a track plan on a Web page, you can save it as
a JPG file for use in TrackLayer. In Internet Explorer you can do this by
right-clicking on the image and choosing Save Picture As...
Be sure you're saving the largest possible image.
Don't save a thumbnail picture.
Images in CAD programs:
all CAD programs save files in some format, and many will
save to standard graphics formats. If your CAD program can save to JPG,
BMP, GIF, or PNG, you're all set -- just save the file in one of those formats,
and it can be used in TrackLayer.
Many programs allow you to set export options, depending
on the output format chosen. If you can set options, be sure to choose
"high resolution" or "highest quality" before you export.
If your program does not export to one of the formats
listed above, but to another such as DXF or EPS, you will need to export to the
supported format and then convert. You can find conversion programs on the
Internet -- for example, a search for "DXF to JPG" turns up several programs
for converting CAD files to graphics.
As a last resort, you can take a screen shot:
- Open the layout in your CAD program, and adjust to
make the image as large as possible.
- Press Print Screen on your keyboard.
- Start Paint, the system bitmap editing
program. On most systems Paint is found under Start > Programs >
Accessories.
- Choose Edit Paste. The screen image you
captured is brought into Paint.
- Move the image. When you paste, the image is
automatically selected and ready to drag. Drag so that the top left
corner of the layout is at the top left of the Paint window.
- Crop. Use the Select tool to draw a rectangle
just around the border of the layout, then Edit Copy, File New,
Edit Paste.
You should now have a picture of just the layout, without desktop or other
surroundings.
- Save as JPG or BMP.
To load an image file:
- Choose File Open.
- Open a file of type JPG/JPEG, BMP, GIF, PNG, or TPG.
The image appears on the screen, overlaid with a default
grid.
If you don't have an image and just want to sketch track
on a blank screen, start by creating a space with the dimensions you have in mind.
- Choose File New. The New Layout panel
appears:

- If you want a layout of standard size and dimensions,
try the Size drop-down and see if your choice is there. The program
offers a collection of standard layout arrangements, including various NTrak
modules. If you choose one of the standard sizes, you can skip the
rest of this section and just click Create.
OR:
- Choose the scale you want in the Scale drop-down, and
enter the dimensions you want in the Height and Width boxes. Click
OK to dismiss the dialog and create the new drawing space.
You can select the units you want to use for display and data entry, using
the drop-down at the right. Units you select in this drop-down will
be displayed throughout the program.