Mako 8.2.0 API
MakoCore SDK API Documentation
Loading...
Searching...
No Matches
renderspec.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2024-2025 Global Graphics Software Ltd. All rights reserved.
3 */
4
5#ifndef JAWSMAKO_RENDERSPEC_H
6#define JAWSMAKO_RENDERSPEC_H
7
12#include <memory>
13#include <jawsmako/jawsmako.h>
14#include <jawsmako/types.h>
15#include <edl/icolormanager.h>
16
17namespace JawsMako
18{
19 using namespace EDL;
20
26 class IPostProcessSpec;
51 {
52 public:
53 CSpotColorAlias() = default;
60 CSpotColorAlias(const RawString &_spotName, const RawString &_remappedColorant)
61 {
62 spotName = _spotName;
63 remappedColorant = _remappedColorant;
64 }
67 };
68
72
73
82 {
83 public:
99 virtual ~CRenderSpec() = default;
100
101 // Assign base settings from another render spec
125
126 IDOMColorSpacePtr processSpace;
133 bool alpha;
134
138
144
145 IOptionalContentPtr optionalContent;
148
153
156 CColorManagerConfigPtr overrideCmmConfig;
164
205 typedef enum
206 {
208 eBPOn = 1,
209 eBPOff = 2,
211
214 };
215
224 {
225 public:
227 {
228 compress = true;
229 }
230
231 IDOMImagePtr result;
232 bool compress;
233 };
234 #define renderSpecToCImageRenderSpec(rs) (dynamic_cast<CImageRenderSpec *>(rs))
235
242 {
243 public:
245 {
246 compress = true;
247 }
248
250 bool compress;
251 };
252 #define renderSpecToCImagesRenderSpec(rs) (dynamic_cast<CImagesRenderSpec *>(rs))
253
264 {
265 public:
267 {
268 buffer = nullptr;
269 rowStride = 0;
270 hostEndian = true;
271 }
272
273 void *buffer;
277 };
278 #define renderSpecToCFrameBufferRenderSpec(rs) (dynamic_cast<CFrameBufferRenderSpec *>(rs))
279
304 #define renderSpecToCFrameBuffersRenderSpec(rs) (dynamic_cast<CFrameBuffersRenderSpec *>(rs))
305
306
307
345
348
378 {
379 public:
388 static JAWSMAKO_API CColorConversionPostProcessSpecPtr create(const IDOMColorSpacePtr &targetSpace,
391
402 static JAWSMAKO_API CColorConversionPostProcessSpecPtr create(const IDOMICCProfilePtr &deviceLink,
403 const IDOMColorSpacePtr &targetSpace,
406
408 {
409 public:
415 IDOMColorSpacePtr targetSpace;
416 IDOMICCProfilePtr deviceLink;
419
420 bool operator== (const CLogicalStep &other) const
421 {
422 return (other.targetSpace == targetSpace)
423 && (other.deviceLink == deviceLink)
424 && (other.intent == intent)
425 && (other.bpc == bpc);
426 }
427
428 bool operator!= (const CLogicalStep &other) const
429 {
430 return ! (*this == other);
431 }
432 };
434
440 static JAWSMAKO_API CColorConversionPostProcessSpecPtr create(const CLogicalSteps &steps);
441
442 ePostProcessType getType() const override
443 {
444 return ePPTColorConversion;
445 }
446
447 public:
449 };
450 #define obj2CColorConversionPostProcessSpec(obj) CColorConversionPostProcessSpecPtr(dynamic_cast<CColorConversionPostProcessSpec *>((IRCObject *) (obj)), true)
451
452 class CToneCurvesPostProcessSpec;
454
466 {
467 public:
502 static JAWSMAKO_API CToneCurvesPostProcessSpecPtr create(const CEDLVector<CFloatVect> &_toneCurves);
503
504 ePostProcessType getType() const override
505 {
506 return ePPTToneCurves;
507 }
508
509 public:
511 };
512 #define obj2CToneCurvesPostProcessSpec(obj) CToneCurvesPostProcessSpecPtr(dynamic_cast<CToneCurvesPostProcessSpec *>((IRCObject *) (obj)), true)
513
514 class CSpotMergePostProcessSpec;
516
551 {
552 public:
564 static JAWSMAKO_API CSpotMergePostProcessSpecPtr create(const IDOMColorSpaceDeviceN::CColorantInfoVect &_mergeSpotColors,
565 const CEDLVector<CFloatVect> &_toneCurves = CEDLVector<CFloatVect>());
566
567 ePostProcessType getType() const override
568 {
569 return ePPTSpotMerge;
570 }
571
572 public:
575 };
576 #define obj2CSpotMergePostProcessSpec(obj) CSpotMergePostProcessSpecPtr(dynamic_cast<CSpotMergePostProcessSpec *>((IRCObject *) (obj)), true)
577
578 class CInkLimitPostProcessSpec;
580
591 {
592 public:
603 static JAWSMAKO_API CInkLimitPostProcessSpecPtr create(float _maxTotalInk,
604 bool _keepBlack = true);
605
606 ePostProcessType getType() const override
607 {
608 return ePPTInkLimit;
609 }
610
611 public:
614 };
615 #define obj2CInkLimitPostProcessSpec(obj) CInkLimitPostProcessSpecPtr(dynamic_cast<CInkLimitPostProcessSpec *>((IRCObject *) (obj)), true)
616
617 class CHalftonePostProcessSpec;
619
629 {
630 public:
642 static JAWSMAKO_API CHalftonePostProcessSpecPtr create(const IHalftone *halftone, float dpi);
643
653 {
654 public:
656 const float cyanAngle = 15.0,
657 const float magentaAngle = 75.0f,
658 const float yellowAngle = 0.0f,
659 const float blackAngle = 45.0f,
660 const float defaultAngle = 45.0f) : CColorSpotHalftone(freq, false, cyanAngle, magentaAngle, yellowAngle, blackAngle)
661 {
662 angles.resize(5);
663 angles[4] = defaultAngle;
664 }
665 };
666
667 ePostProcessType getType() const override
668 {
669 return ePPTHalftone;
670 }
671
672 public:
674 float dpi;
675 };
676 #define obj2CHalftonePostProcessSpec(obj) CHalftonePostProcessSpecPtr(dynamic_cast<CHalftonePostProcessSpec *>((IRCObject *) (obj)), true)
677
678}
679
680#endif /* JAWSMAKO_RENDERSPEC_H */
Definition edlvector.h:30
CEDLVector< CColorantInfo > CColorantInfoVect
Definition idomcolorspace.h:833
Base class Interface for all Reference Counted objects.
Definition ircobject.h:35
bool operator!=(const CLogicalStep &other) const
Definition renderspec.h:428
eRenderingIntent intent
The rendering intent to use.
Definition renderspec.h:417
IDOMColorSpacePtr targetSpace
The target space. Not used for conversion if a device link is supplied.
Definition renderspec.h:415
CLogicalStep()
Definition renderspec.h:410
IDOMICCProfilePtr deviceLink
The device link, if provided.
Definition renderspec.h:416
eBlackPointCompensation bpc
The black point compensation to use.
Definition renderspec.h:418
bool operator==(const CLogicalStep &other) const
Definition renderspec.h:420
This class describes a post-processing step whereby the previous result is color converted to a new c...
Definition renderspec.h:378
CEDLVector< CLogicalStep > CLogicalSteps
Definition renderspec.h:433
ePostProcessType getType() const override
Get the type of post processing this spec represents.
Definition renderspec.h:442
static JAWSMAKO_API CColorConversionPostProcessSpecPtr create(const CLogicalSteps &steps)
Create a color-conversion post process through multiple color spaces and/or links.
static JAWSMAKO_API CColorConversionPostProcessSpecPtr create(const IDOMICCProfilePtr &deviceLink, const IDOMColorSpacePtr &targetSpace, eRenderingIntent intent=eRelativeColorimetric, eBlackPointCompensation bpc=eBPCDefault)
Create a color-conversion post process using a device link profile.
CLogicalSteps conversionSteps
Definition renderspec.h:448
static JAWSMAKO_API CColorConversionPostProcessSpecPtr create(const IDOMColorSpacePtr &targetSpace, eRenderingIntent intent=eRelativeColorimetric, eBlackPointCompensation bpc=eBPCDefault)
Create a color-conversion post process.
int32 rowStride
The distance, in bytes, from one scanline to the next. May be negative.
Definition renderspec.h:274
bool hostEndian
Definition renderspec.h:275
CFrameBufferRenderSpec()
Definition renderspec.h:266
void * buffer
A pointer to the frame buffer memory where the first pixel will be written.
Definition renderspec.h:273
CFrameBufferInfoVect bufferInfo
Definition renderspec.h:294
CFrameBuffersRenderSpec()
Definition renderspec.h:289
bool hostEndian
Definition renderspec.h:301
CSeparatedColorSpotHalftone(const float freq, const float cyanAngle=15.0, const float magentaAngle=75.0f, const float yellowAngle=0.0f, const float blackAngle=45.0f, const float defaultAngle=45.0f)
Definition renderspec.h:655
This class describes a post-processing step whereby halftoning is performed.
Definition renderspec.h:629
float dpi
Definition renderspec.h:674
static JAWSMAKO_API CHalftonePostProcessSpecPtr create(const IHalftone *halftone, float dpi)
Create a halftone post process.
ePostProcessType getType() const override
Get the type of post processing this spec represents.
Definition renderspec.h:667
const IHalftone * halftone
Definition renderspec.h:673
IDOMImagePtr result
On render completion, this will be populated with the rendered result.
Definition renderspec.h:231
bool compress
If true, the image data will be lightly compressed during render.
Definition renderspec.h:232
CImageRenderSpec()
Definition renderspec.h:226
CDOMImageVect result
On render completion, this will be populated with the rendered result images.
Definition renderspec.h:249
CImagesRenderSpec()
Definition renderspec.h:244
bool compress
If true, the image data will be lightly compressed during render.
Definition renderspec.h:250
This class describes a post-processing step whereby ink limiting via scaling is performed.
Definition renderspec.h:591
static JAWSMAKO_API CInkLimitPostProcessSpecPtr create(float _maxTotalInk, bool _keepBlack=true)
Create an ink-limiting post process.
ePostProcessType getType() const override
Get the type of post processing this spec represents.
Definition renderspec.h:606
bool keepBlack
Definition renderspec.h:613
float maxTotalInk
Definition renderspec.h:612
CSpotColorNames ignoredSpotColors
Spot components to ignore.
Definition renderspec.h:136
CSpotColorAliasVect aliasedSpotColors
Spot colorant aliases. Please see CSpotColorAlias for further information.
Definition renderspec.h:137
uint32 width
The width, in pixels, of the result.
Definition renderspec.h:128
uint8 depth
The depth, in bits (8 or 16), of the result.
Definition renderspec.h:130
CRenderSpec()
Definition renderspec.h:84
IOptionalContentPtr optionalContent
The optional content object for the document.
Definition renderspec.h:145
CColorManagerConfigPtr overrideCmmConfig
An optional CMM configuration override to apply to the given render.
Definition renderspec.h:156
bool alpha
Whether or not alpha information should be produced.
Definition renderspec.h:133
IDOMColorSpacePtr processSpace
Definition renderspec.h:126
bool ignoreInputIccProfiles
Definition renderspec.h:154
void assignCommon(const CRenderSpec &other)
Definition renderspec.h:102
CSpotColorNames retainedSpotColors
Spot components to generate as distinct separations/channels.
Definition renderspec.h:135
eBlackPreservation preserveBlackForOther
Whether or not to apply black preservation for non-text objects.
Definition renderspec.h:213
virtual ~CRenderSpec()=default
CRenderPostProcessVect postProcesses
Definition renderspec.h:139
eOptionalContentEvent optionalContentEvent
Definition renderspec.h:146
eBlackPreservation preserveBlackForText
Whether or not to apply black preservation for text.
Definition renderspec.h:212
FRect sourceRect
The source area of the DOM that will be mapped to the output width and height.
Definition renderspec.h:131
bool use16BitInternalRendering
Definition renderspec.h:157
uint32 height
The height, in pixels, of the result.
Definition renderspec.h:129
eBlackPreservation
The possible types for enabling/controlling 100% black preservation.
Definition renderspec.h:206
@ eBPDefault
Default behavior.
Definition renderspec.h:207
@ eBPOn
Use black point compensation if applicable during color conversion.
Definition renderspec.h:208
@ eBPOff
Do not use black point compensation during color conversion.
Definition renderspec.h:209
uint8 aaFactor
The aaFactor to be used. 1 means no anti-aliasing. The maximum value is 4.
Definition renderspec.h:132
eRenderingIntent cmykImageRenderingIntent
Definition renderspec.h:151
eRenderingIntent rgbImageRenderingIntent
Definition renderspec.h:149
RawString remappedColorant
The colorant to which occurrences of spotName will be mapped.
Definition renderspec.h:66
RawString spotName
The name of the spot to map.
Definition renderspec.h:65
CSpotColorAlias(const RawString &_spotName, const RawString &_remappedColorant)
Construct a new CSpotColorAlias object.
Definition renderspec.h:60
This class describes a post-processing step whereby one or more spot colorants folded into the proces...
Definition renderspec.h:551
static JAWSMAKO_API CSpotMergePostProcessSpecPtr create(const IDOMColorSpaceDeviceN::CColorantInfoVect &_mergeSpotColors, const CEDLVector< CFloatVect > &_toneCurves=CEDLVector< CFloatVect >())
Create a tone-mapping post process.
CEDLVector< CFloatVect > toneCurves
Definition renderspec.h:574
IDOMColorSpaceDeviceN::CColorantInfoVect mergeSpotColors
Definition renderspec.h:573
ePostProcessType getType() const override
Get the type of post processing this spec represents.
Definition renderspec.h:567
This class describes a post-processing step whereby one or more tone curves (aka calibration curves) ...
Definition renderspec.h:466
CEDLVector< CFloatVect > toneCurves
Definition renderspec.h:510
static JAWSMAKO_API CToneCurvesPostProcessSpecPtr create(const CEDLVector< CFloatVect > &_toneCurves)
Create a tone-mapping post process.
ePostProcessType getType() const override
Get the type of post processing this spec represents.
Definition renderspec.h:504
Description of spot halftones, using Jaws's default spot function. Used for color halftoned rendering...
Definition jawsmako.h:2181
CEDLVector< float > angles
The vector of angles to use.
Definition jawsmako.h:2200
CColorSpotHalftone(float freq, bool useFullResForFlattening=false, float cyanAngle=15.0, float magentaAngle=75.0f, float yellowAngle=0.0f, float blackAngle=45.0f)
Definition jawsmako.h:2184
Description of a frame buffer for use with renderSeparationsToFrameBuffers and Apex rendering functio...
Definition jawsmako.h:1869
Description of a simple spot halftone, at 45 degrees, using Jaws's default spot function....
Definition jawsmako.h:2149
An abstract base class for communicating halftone information to the Jaws renderer,...
Definition jawsmako.h:2137
A class that describes a post process operation to be (logically) performed after an initial render t...
Definition renderspec.h:320
virtual ePostProcessType getType() const =0
Get the type of post processing this spec represents.
@ ePPTColorConversion
Color convert to a new color space.
Definition renderspec.h:329
@ ePPTCustomSpot
Custom spot color manipulation on the GPU with a specially made shader.
Definition renderspec.h:335
@ ePPTInkLimit
Ink limiting via scaling.
Definition renderspec.h:332
@ ePPTCustomSpotMerge
Custom spot merging on the GPU with a specially made shader.
Definition renderspec.h:336
@ ePPTCustomColor
Custom color manipulation on the GPU with a specially made shader.
Definition renderspec.h:334
@ ePPTHalftone
Apply halftone.
Definition renderspec.h:333
@ ePPTSpotMerge
Merge spots.
Definition renderspec.h:331
@ ePPTToneCurves
Apply tone curves.
Definition renderspec.h:330
CEDLVector< IDOMImagePtr > CDOMImageVect
Definition edlfwd.h:53
RectTmpl< double > FRect
Definition edlgeom.h:338
unsigned int uint32
Definition edltypes.h:34
signed int int32
Definition edltypes.h:29
unsigned char uint8
Definition edltypes.h:32
eBlackPointCompensation
Black point compensation enumeration.
Definition edlblackpointcompensation.h:17
eRenderingIntent
Rendering intent enumeration.
Definition edlrenderingintent.h:17
@ eBPCDefault
Default behavior.
Definition edlblackpointcompensation.h:19
@ eRenderingIntentUnset
No rendering intent was set.
Definition edlrenderingintent.h:18
@ eRelativeColorimetric
Relative colorimetric rendering intent.
Definition edlrenderingintent.h:20
ePostProcessType
The possible types of post processing operations.
Definition renderspec.h:328
EDLSysString RawString
A raw, 8 bit string. Encoding depends on context.
Definition types.h:150
Definition apexcustompostprocess.h:17
IJawsRenderer::CFrameBufferInfo CFrameBufferInfo
Definition renderspec.h:21
IJawsRenderer::IHalftone IHalftone
Definition renderspec.h:22
eOptionalContentEvent
Optional content Event types.
Definition types.h:193
@ eOCEView
View.
Definition types.h:195
CEDLVector< U8String > CSpotColorNames
Definition types.h:169
CEDLVector< IPostProcessSpecPtr > CRenderPostProcessVect
Definition renderspec.h:28
IJawsRenderer::CColorSpotHalftone CColorSpotHalftone
Definition renderspec.h:24
CEDLVector< CFrameBufferInfo > CFrameBufferInfoVect
Definition renderspec.h:25
IJawsRenderer::CSpotHalftone CSpotHalftone
Definition renderspec.h:23
CEDLVector< CSpotColorAlias > CSpotColorAliasVect
An alias for a vector of CSpotColorAlias.
Definition renderspec.h:71
#define DECL_SMART_PTR(cls)
Definition smartptr.h:211
#define JAWSMAKO_API
Definition types.h:29