Soft mask implementation

This commit is contained in:
Jakub Melka
2021-03-24 19:55:31 +01:00
parent 67872a532f
commit 2e9459dfa9
6 changed files with 426 additions and 65 deletions

View File

@ -507,6 +507,21 @@ PDFCMYK PDFBlendFunction::blend_Nonseparable(BlendMode mode, PDFCMYK Cb, PDFCMYK
return Cs;
}
PDFColorComponent PDFBlendFunction::getLuminosity(PDFGray gray)
{
return nonseparable_Lum(nonseparable_gray2rgb(gray));
}
PDFColorComponent PDFBlendFunction::getLuminosity(PDFRGB rgb)
{
return nonseparable_Lum(rgb);
}
PDFColorComponent PDFBlendFunction::getLuminosity(PDFCMYK cmyk)
{
return nonseparable_Lum(nonseparable_cmyk2rgb(cmyk));
}
PDFRGB PDFBlendFunction::nonseparable_gray2rgb(PDFGray gray)
{
return nonseparable_SetLum(PDFRGB{ 0.0f, 0.0f, 0.0f }, gray);