# `GSPath transformForHash:`

*Instance Method*

A transform that maps a geometric hash to the matching position on the path.

## Declaration

```swift
func transform(for hash: GSPathHash) -> AffineTransform?
```

```objc
- (NSAffineTransform *) transformForHash:(GSPathHash *) hash;
```

```python
transformForHash_(hash: GSPathHash) -> NSAffineTransform
```

## Discussion

Returns `nil` when the hash does not match the path.

## See Also

### Equality and Comparison

- [`GSPath isEqualToPath:`](/Core/GlyphsCore/GSPath/isEqualToPath:) — Whether another path has the same closed state, node count, and node positions.
- [`GSPath compareHash`](/Core/GlyphsCore/GSPath/compareHash) — A geometric hash for matching paths with the same node structure.
- [`GSPath nodeIndexForHash:callback:`](/Core/GlyphsCore/GSPath/nodeIndexForHash:callback:) — Enumerates matching node positions for a geometric hash.

