Skip to content

feat: Separation and DeviceN color spaces (ISO 32000-2 §8.6.6-7) #28#39

Merged
ralflang merged 1 commit into
FRAMEWORK_6_0from
feat/separation-devicen
May 25, 2026
Merged

feat: Separation and DeviceN color spaces (ISO 32000-2 §8.6.6-7) #28#39
ralflang merged 1 commit into
FRAMEWORK_6_0from
feat/separation-devicen

Conversation

@ralflang
Copy link
Copy Markdown
Member

Summary

  • Add PDF function infrastructure (PdfFunction interface, ExponentialFunction Type 2, PostScriptFunction Type 4)
  • Implement SeparationColorSpace for single spot colors (Pantone etc.)
  • Implement DeviceNColorSpace for multiple spot colors
  • Generalize ResourceDictionary and ContentStreamBuilder from IccBasedColorSpace to ColorSpace interface
  • PdfSerializer emits /ColorSpace resource dict entries with polymorphic dispatch for ICC, Separation and DeviceN

Test plan

  • ExponentialFunction stores c0/c1/exponent, returns correct type/domain/range
  • PostScriptFunction stores code/domain/range
  • SeparationColorSpace has componentCount 1, stores colorant/alternate/transform
  • DeviceNColorSpace componentCount matches colorant array
  • SeparationColor emits correct cs/sc operators
  • DeviceNColor validates tint count, emits correct operators
  • Serializer produces [/Separation /name /alternate fnRef] array objects
  • Serializer produces [/DeviceN [...] /alternate fnRef] array objects
  • Type 2 function serialized with /FunctionType 2, /C0, /C1, /N
  • Type 4 PostScript function stream serialized correctly
  • Full regression suite passes (570 tests)

@ralflang ralflang force-pushed the feat/separation-devicen branch from 19591e7 to 9a9874c Compare May 25, 2026 06:50
@ralflang ralflang merged commit 9a224cd into FRAMEWORK_6_0 May 25, 2026
0 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant