module HexaPDF::Content::RenderingIntent
Defines all available rendering intents as constants. For use with Content::GraphicsState#rendering_intent
.
See: PDF1.7 s8.6.5.8
Constants
- ABSOLUTE_COLORIMETRIC
Colors should be represented solely with respect to the light source.
- PERCEPTUAL
Colous should be represented in a manner that provides a pleasing perceptual appearance.
- RELATIVE_COLORIMETRIC
Colous should be represented with respect to the combination of the light source and the output medium's white point.
- SATURATION
Colors should be represented in a manner that preserves or emphasizes saturation.
Public Class Methods
normalize(intent)
click to toggle source
Returns the argument normalized to a valid rendering intent.
-
If the argument is a valid symbol, it is just returned.
-
Otherwise an error is raised.
# File lib/hexapdf/content/graphics_state.rb, line 218 def self.normalize(intent) case intent when ABSOLUTE_COLORIMETRIC, RELATIVE_COLORIMETRIC, SATURATION, PERCEPTUAL intent else raise ArgumentError, "Invalid rendering intent: #{intent}" end end