Instance Method
setColorSpace(_:using:) setColorSpace:usingMethod: setColorSpace_usingMethod_
Changes the color space used by document colors in the font.
Declaration
func setColorSpace(_ colorSpace: GSColorSpace, using changeMethod: GSColorSpaceChangeMethod)Declaration
- (void) setColorSpace:(GSColorSpace *) colorSpace usingMethod:(GSColorSpaceChangeMethod) changeMethod;Declaration
setColorSpace_usingMethod_(colorSpace: GSColorSpace, changeMethod: GSColorSpaceChangeMethod)Parameters
colorSpaceThe RGB color space to use for document colors.
changeMethodThe method used to update existing RGB colors.
Discussion
The new color space must follow the RGB color space model. Non-RGB colors are not changed.
See transformColors(_:)transformColorsUsingBlock:transformColorsUsingBlock_ for details on which colors are affected.
This method is also run when the given color space is the same as the color space of the font. This is done so that setting the font’s color space can be used to update stale color values in the font.
See Also
Colors
The RGB color space used by document colors in the font.
Returns the given color converted to match the color space of the font.
Passes each document color to the given block and updates it if the block returns a new color.