# `GSLayer contentToBackgroundCheckSelection:keepOldBackground:`

*Instance Method*

Copies shapes and anchors to the corresponding foreground or background layer.

## Declaration

```swift
func content(toBackgroundCheckSelection checkSelection: Bool, keepOldBackground keep: Bool)
```

```objc
- (void) contentToBackgroundCheckSelection:(BOOL) checkSelection keepOldBackground:(BOOL) keep;
```

```python
contentToBackgroundCheckSelection_keepOldBackground_(checkSelection: bool, keep: bool)
```

## Parameters

- `checkSelection` — Whether to copy only selected shapes and anchors.
- `keep` — Whether to preserve shapes and anchors already in the destination layer.

## Discussion

Calling this on a foreground layer copies to its background. Calling it on a background layer copies to its foreground.

## See Also

### Background Layer

- [`GSBackgroundLayer`](/Core/GlyphsCore/GSBackgroundLayer) — Editable background content associated with a foreground layer.
- [`GSLayer.background`](/Core/GlyphsCore/GSLayer/background) — Editable background content associated with the layer.
- [`GSLayer hasBackground`](/Core/GlyphsCore/GSLayer/hasBackground) — Whether a background layer has been created.
- [`GSLayer swapForegroundWithBackground`](/Core/GlyphsCore/GSLayer/swapForegroundWithBackground) — Exchanges shapes, anchors, and hints between the foreground and background layers.

