Regions

Region is a general term for a rectangular area used to describe what part of a card a certain drawing operation will take place on. It is most commonly used in reference to a particular kind of setting, one that describes a rectangular area by giving the location of its upper-left corner (x-offset and y-offset) along with its width and height. The value of a region consists of these numbers separated by commas. For example, the sanity-text-region describes the rectangle within which the "Sanity" label of investigator cards is written. If the value for this key was "525,255,119,39", then it would have this interpretation:

Here the region is shown as a purple box. Remember, the first number is how far to the right of the upper-left corner the rectangle begins; the second number is how far down from the upper-left corner the rectangle begins; the third number is how wide the rectangle is, and the fourth is how tall.

Region Units

For convenience, regions are measured in pixels on the template image. This means that you can easily use external tools that use pixel coordinates (like an image editor) to help you define regions.

Working with Regions

You can obtain a Rectangle object for a region setting by calling a Settings object's getRegion( key ) method. The key name should not include the "-region" suffix, which is appended automatically. The returned rectangle will have integer precision. If you require subpixel precision, you can use getRegion2D( key ) to obtain a Rectangle2D with double precision.

When trying to define region settings, there are a couple of plug-ins that can be quite useful. The Show Regions plug-in adds a button to Strange Eons that will allow you to toggle a magenta highlight around regions that are used to draw text and mark-up boxes. (The effect can be seen in the above diagram.) The Region Editor plug-in allows you to fine-tune regions interactively on any open editor window in Strange Eons.

Glossary