SetColorSpace sets the color space. Automatically called by the rasterizer.
(colorSpace ColorSpace)
| 84 | |
| 85 | // SetColorSpace sets the color space. Automatically called by the rasterizer. |
| 86 | func (p *HatchPattern) SetColorSpace(colorSpace ColorSpace) Pattern { |
| 87 | if _, ok := colorSpace.(LinearColorSpace); ok { |
| 88 | return p |
| 89 | } |
| 90 | |
| 91 | if p.Fill.IsGradient() { |
| 92 | p.Fill.Gradient.SetColorSpace(colorSpace) |
| 93 | } else if p.Fill.IsColor() { |
| 94 | p.Fill.Color = colorSpace.ToLinear(p.Fill.Color) |
| 95 | } |
| 96 | return p |
| 97 | } |
| 98 | |
| 99 | // Tile tiles the hatch pattern within the clipping path. |
| 100 | func (p *HatchPattern) Tile(clip *Path) *Path { |
nothing calls this directly
no test coverage detected