Struct lcms2::ThreadContext [] [src]

pub struct ThreadContext { /* fields omitted */ }

Per-thread context for multi-threaded operation.

There are situations where several instances of Little CMS engine have to coexist but on different conditions. For example, when the library is used as a DLL or a shared object, diverse applications may want to use different plug-ins. Another example is when multiple threads are being used in same task and the user wants to pass thread-dependent information to the memory allocators or the logging system. The context is a pointer to an internal structure that keeps track of all plug-ins and static data needed by the THR corresponding function.

A context-aware app could allocate a new context by calling new() or duplicate a yet-existing one by using clone(). Each context can hold different plug-ins, defined by the Plugin parameter. The context can also hold loggers.

Users may associate private data across a void pointer when creating the context, and can retrieve this pointer later.

When you see an error "expected reference, found struct lcms2::GlobalContext", it means you've mixed global and thread-context objects. They don't work together. For example, if you create a Transform with a context (calling new_*_context()), then it will only support Profile with a context as well.

Methods

impl ThreadContext
[src]

[src]

[src]

[src]

[src]

[src]

[src]

Adaptation state for absolute colorimetric intent, on all but cmsCreateExtendedTransform.

[src]

Sets adaptation state for absolute colorimetric intent in the given context. Adaptation state applies on all but cmsCreateExtendedTransformTHR(). Little CMS can handle incomplete adaptation states.

Degree on adaptation 0=Not adapted, 1=Complete adaptation, in-between=Partial adaptation.

[src]

Sets the codes used to mark out-out-gamut on Proofing transforms for a given context. Values are meant to be encoded in 16 bits.

AlarmCodes: Array [16] of codes. ALL 16 VALUES MUST BE SPECIFIED, set to zero unused channels.

[src]

Gets the current codes used to mark out-out-gamut on Proofing transforms for the given context. Values are meant to be encoded in 16 bits.

Trait Implementations

impl Send for ThreadContext
[src]

impl Clone for ThreadContext
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Drop for ThreadContext
[src]

[src]

Executes the destructor for this type. Read more

impl Default for ThreadContext
[src]

[src]

Returns the "default value" for a type. Read more