28 lines
907 B
Haskell
28 lines
907 B
Haskell
module PDF.Content.Operator.Color (
|
|
Operator(..)
|
|
, signature
|
|
) where
|
|
|
|
import PDF.Content.Operator.Common (Signature)
|
|
import PDF.Object (DirectObject(..))
|
|
|
|
data Operator =
|
|
CS | C_s | SC | SCN | S_c | S_cn | G | G_ | RG | R_g | K | K_
|
|
deriving (Bounded, Enum, Show)
|
|
|
|
signature :: [Signature Operator]
|
|
signature = [
|
|
(CS, \l -> case l of [NameObject _] -> True ; _ -> False)
|
|
, (C_s, \l -> case l of [NameObject _] -> True ; _ -> False)
|
|
, (SC, \_ -> True)
|
|
, (SCN, \_ -> True)
|
|
, (S_c, \_ -> True)
|
|
, (S_cn, \_ -> True)
|
|
, (G, \l -> case l of [_] -> True ; _ -> False)
|
|
, (G_, \l -> case l of [_] -> True ; _ -> False)
|
|
, (RG, \l -> case l of [_, _, _] -> True ; _ -> False)
|
|
, (R_g, \l -> case l of [_, _, _] -> True ; _ -> False)
|
|
, (K, \l -> case l of [_, _, _, _] -> True ; _ -> False)
|
|
, (K_, \l -> case l of [_, _, _, _] -> True ; _ -> False)
|
|
]
|