# `GSDrawEnvironment`

*Class*

## Declaration

```swift
class GSDrawEnvironment
```

```objc
@interface GSDrawEnvironment : NSObject
```

```python
class GSDrawEnvironment(NSObject)
```

## Topics

### Instance Properties

- [`GSDrawEnvironment.colorPalettes`](/Core/GlyphsCore/GSDrawEnvironment/colorPalettes)
- [`GSDrawEnvironment.factor`](/Core/GlyphsCore/GSDrawEnvironment/factor) — The render unit length.
- [`GSDrawEnvironment.font`](/Core/GlyphsCore/GSDrawEnvironment/font) — A context font for looking up additional details.
- [`GSDrawEnvironment.foregroundColor`](/Core/GlyphsCore/GSDrawEnvironment/foregroundColor)
- [`GSDrawEnvironment.instance`](/Core/GlyphsCore/GSDrawEnvironment/instance) — A context instance for looking up additional details.
- [`GSDrawEnvironment.layer`](/Core/GlyphsCore/GSDrawEnvironment/layer) — A context layer for looking up additional details.
- [`GSDrawEnvironment.master`](/Core/GlyphsCore/GSDrawEnvironment/master) — A context master for looking up additional details.
- [`GSDrawEnvironment.scale`](/Core/GlyphsCore/GSDrawEnvironment/scale) — The scale factor of the rendered dimensions in relation to the source dimensions.
- [`GSDrawEnvironment.setting`](/Core/GlyphsCore/GSDrawEnvironment/setting)

### Instance Methods

- [`GSDrawEnvironment resolveColor:`](/Core/GlyphsCore/GSDrawEnvironment/resolveColor:) — Returns `nil` when the argument is `nil`; `GSPaletteColor.errorColor` when the given palette color cannot be resolved.
- [`GSDrawEnvironment resolveExpression:`](/Core/GlyphsCore/GSDrawEnvironment/resolveExpression:)
- [`GSDrawEnvironment resolveExpression:withDefault:`](/Core/GlyphsCore/GSDrawEnvironment/resolveExpression:withDefault:)
- [`GSDrawEnvironment updateColorPalettesWithContainer:`](/Core/GlyphsCore/GSDrawEnvironment/updateColorPalettesWithContainer:) — The container can be a font or font master.

## Relationships

### Inherits From

- `NSObject`

