Rectangle Background
Summary
Draws a rectangle behind the selected graphic or layout elements, then groups the rectangle and the selection together with the rectangle underneath. The corners can be square, slightly rounded, or rounded all the way to a capsule. Use it to set a legend, a block of text, a scale bar or a cluster of elements on a clean panel. The dialog sets the rectangle's symbol, the transparency of its fill and outline separately, its size and its corner rounding.
How it works
The tool finds the rectangle that bounds everything selected (the selection's extent), draws a rectangle centered on it with the chosen symbol, and groups it behind the selection.
The size is set in one of two ways. As a percent of extent, 100% horizontal and 100% vertical match the extent exactly, and larger values leave a margin that grows with the size of the selection. In a linear unit, the two values are margins added beyond the extent, the horizontal one on the left and on the right, the vertical one at the top and at the bottom. A linear margin stays the same whatever the size of the selection, which is what keeps a set of panels consistent.
Rounding is the corner radius as a percentage of the rectangle's smaller dimension. 0 gives square corners. 50 is fully rounded: a square becomes a circle and any other rectangle becomes a capsule.
ArcGIS Pro can also do this by itself. Many layout elements have frame properties of their own, a border, a background and a simple shadow, and setting those draws a similar rectangle behind the element with no extra graphic at all. A frame set that way belongs to the element and adjusts itself automatically when the element is resized. This tool is for when you want a stable polygon element to work with, one that exists on its own: a background that can be given any polygon symbol, sized and placed independently of what it sits behind, or shared by several elements at once. It can also create a soft drop shadow that fades at the edge, like you would expect a shadow to do.
What to select first
The tool works on selected elements: graphics in a map's graphics layer, or elements on a layout (text, pictures, legends, north arrows, scale bars, map frames and so on). It does not work on features in a dataset. Select one element or several, then click the tool. If nothing is selected, the tool says so and stops.
- On a map, the selected graphics must all be in one graphics layer. A selection that spans two graphics layers is turned away with a message.
- If a selected element already belongs to a group, the whole group comes along. The tool never pulls a group apart.
A tour of the dialog
I have a scale bar that is drawing over a dark background and is difficult to see:
I set up the tool to put a rectangle around the scale bar:
That gives me this:
A background is one way to rescue a scale bar. Another is to change the color of the scale bar itself. The Element Color Helper tool changes every color in a scale bar, or in any selected elements, at once, so the bar can quickly be set to a bright color that is easy to distinguish.
| Control | Explanation |
|---|---|
| Graphic name | Optional. The name given to the new rectangle. On a layout it is the name shown in the Contents pane; on a map, graphics are not listed there, and the name shows in the Element pane when the graphic is selected. The new group is named after it, with “Group” added. Left blank, the rectangle gets ArcGIS Pro's default name and the group is named Graphic Rectangle Group. |
| Symbology / Design symbology… | Opens ArcGIS Pro's own Format Polygon
Symbol editor, gallery included, so the background can
carry any polygon symbol: a solid fill, a gradient, a
hatch, any outline. The swatch beside the button previews
the chosen symbol before transparency is applied. The
starting symbol is a pale yellow fill.
|
| Fill transparency (%) | 0 to 100. Applies to the interior fill only. Gradient fills are made transparent evenly across the whole gradient. |
| Outline transparency (%) | 0 to 100. Applies to the outline only, so a see-through fill can keep a solid border, or the reverse. |
| Size units | % of extent, or a linear unit. On a layout the choices are millimeters, centimeters, inches and points. On a map the only linear choice is the unit of the map's coordinate system. Switching between percent and a linear unit relabels the next two boxes and resets them to their neutral values (100 for percent, 0 for a margin). |
| Horizontal extent (%) / Horizontal margin | As a percent, the rectangle's width as a percentage of the extent's width. In a linear unit, the margin added on the left and on the right. |
| Vertical extent (%) / Vertical margin | As a percent, the rectangle's height as a percentage of the extent's height. In a linear unit, the margin added at the top and at the bottom. |
| Rounding (%) | Corner radius as a percentage of the rectangle's smaller dimension. 0 is square corners, 50 is fully rounded, and values above 50 are treated as 50. |
Click OK and the rectangle is drawn. Cancel closes the dialog and changes nothing.
Drop shadow
Check Drop shadow and the tool draws a soft shadow beneath the rectangle, the kind that makes a panel look as if it is floating a little above the map. The controls follow the drop shadow settings in Adobe Photoshop, so they will be familiar if you have used those.
The scale bar example in the tour of the dialog above has one, and the dialog pictured there shows the settings that made it.
| Control | Explanation |
|---|---|
| Color | The color of the shadow. Black or a dark gray is usual. |
| Opacity | How dark the shadow is at its darkest, from 0 to 100%. |
| Angle | The direction the light comes from. The shadow falls on the opposite side. Click or drag on the dial to point it at the light, or type the angle in degrees, measured counterclockwise from east: 90 is light from the top, and 135 is light from the upper left, the usual choice on a map. |
| Distance | How far the shadow is shifted away from the light. A larger distance makes the rectangle appear to float higher. 0 leaves the shadow directly underneath, showing evenly on all sides as a soft glow. |
| Spread | How much of the soft edge is made solid. 0 gives the softest edge. 100 gives a hard-edged shadow. |
| Size | The width of the soft edge. 0 gives a hard edge with no softening at all. |
| Layers | The number of pieces the soft edge is built from, 1 to 60. More layers give a smoother edge. |
Distance and Size are in points on a layout, and in the units of the map's coordinate system on a map.
How the shadow is made. ArcGIS Pro graphics cannot be blurred, so the soft edge is built from a stack of plain polygons. Each is a copy of the rectangle's outline, shifted away from the light, with a solid fill that is mostly transparent. The copies are made in a graded series of sizes, the largest a little bigger than the outline and the smallest a little smaller. Where more of them overlap, the shadow is darker, so it fades smoothly from nothing at its outer edge to the full opacity inside. The opacity of each copy is worked out so that the darkest part is exactly the opacity you asked for, however many layers you choose.
The shape of the rectangle itself is cut out of every layer. The shadow therefore lies around the background and never underneath it, and a partly transparent background keeps its own color and is not darkened by its shadow.
The shadow's layers are ordinary polygon graphics. They are grouped together, and that group sits below the rectangle inside the new group.
What you get
One new rectangle graphic, placed behind the selected elements, and one new group that holds the rectangle and everything that was selected, along with the drop shadow if one was asked for. Because they are grouped, the background and its contents move, resize and copy together.
The rectangle is an ordinary ArcGIS Pro graphic. Nothing about it is special once it is drawn, so it can be edited by hand like any other: select it and use the Element pane to change its symbol, its size, its position or its name.
Nothing else is altered. The selected elements keep their own symbols, sizes and positions.
The tool remembers your choices
After a successful run, the symbol and every setting in the dialog are stored with the project, so the next background starts where the last one left off and a set of backgrounds comes out matching. Each of the four Graphic Background tools keeps its own settings. The graphic name is never remembered. The settings are saved when the project is saved.
Recommended citation
Credits
By Jeff Jenness, Jenness Enterprises (www.jennessent.com).
Licensing information
Works at every ArcGIS Pro license level (Basic, Standard, Advanced). No extension licenses are required.
Related tools and pages
- Element Color Helper — changes the colors of selected elements, a scale bar among them, all at once: another way to make it stand out.
- Circle Background — a circle behind the selection, the natural fit for a compass rose or any round element.
- Polygon Background — a background that follows the actual shape of the selected elements.
- Minimum Convex Polygon Background — the tightest convex outline around the selected elements.
- Create Shadow Polygons — a soft shadow of fading rings around the polygons of a feature class, where these tools shadow graphics.