# Ink Class

> The ink object represents the color in the color space, CYMK or RGB.

- Product: Adobe PDF Library 21
- Language: Modern C++
- Version: 21.4.0
- HTML page: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Ink
- Version index: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/llms.txt

```cpp
class Ink
```

**Namespace:** `datalogics_interface`

## Description

The ink object represents the color in the color space, CYMK or RGB.

**Referenced by:** [`Page`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Page.md)

**Uses types:** [`InkType`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/InkType.md), [`SeparationPreviewOption`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/SeparationPreviewOption.md)

## Constructors

### Ink

```cpp
datalogics_interface::Ink::Ink(Ink &&) noexcept
```

*constructor*

**Parameters**

- (unnamed) ([`Ink &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Ink.md))

### ~Ink

```cpp
datalogics_interface::Ink::~Ink()
```

*destructor*

## Methods

### get_alias

```cpp
std::string datalogics_interface::Ink::get_alias() const
```

**Returns:** `std::string`

An alternate name (alias) for this colorant.

### get_angle

```cpp
double datalogics_interface::Ink::get_angle() const
```

**Returns:** `double`

The halftone screen angle for this ink, in degrees.

### get_black

```cpp
double datalogics_interface::Ink::get_black() const
```

**Returns:** `double`

The black component of the CMYK color swatch.

### get_blue

```cpp
int datalogics_interface::Ink::get_blue() const
```

**Returns:** `int`

The blue component of the RGB color swatch for on-screen display.

### get_colorant_name

```cpp
std::string datalogics_interface::Ink::get_colorant_name() const
```

**Returns:** `std::string`

The name of the colorant from the Separation or DeviceN color space, or the process color name.

### get_cyan

```cpp
double datalogics_interface::Ink::get_cyan() const
```

**Returns:** `double`

The cyan component of the CMYK color swatch.

### get_density

```cpp
double datalogics_interface::Ink::get_density() const
```

**Returns:** `double`

The neutral density of this ink.

### get_frequency

```cpp
double datalogics_interface::Ink::get_frequency() const
```

**Returns:** `double`

The halftone screen frequency for this ink, in lines per inch.

### get_green

```cpp
int datalogics_interface::Ink::get_green() const
```

**Returns:** `int`

The green component of the RGB color swatch for on-screen display.

### get_ink_type

```cpp
InkType datalogics_interface::Ink::get_ink_type() const
```

**Returns:** [`InkType`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/InkType.md)

The ink type of this ink, used for trapping.

### get_is_process_color

```cpp
bool datalogics_interface::Ink::get_is_process_color() const
```

**Returns:** `bool`

Whether this ink represents a process color or a spot color.

True if this is a process color, false if this is a spot color.

### get_magenta

```cpp
double datalogics_interface::Ink::get_magenta() const
```

**Returns:** `double`

The magenta component of the CMYK color swatch.

### get_preview_option

```cpp
SeparationPreviewOption datalogics_interface::Ink::get_preview_option() const
```

**Returns:** [`SeparationPreviewOption`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/SeparationPreviewOption.md)

How the colorant is handled during a separation preview.

### get_red

```cpp
int datalogics_interface::Ink::get_red() const
```

**Returns:** `int`

The red component of the RGB color swatch for on-screen display.

### get_yellow

```cpp
double datalogics_interface::Ink::get_yellow() const
```

**Returns:** `double`

The yellow component of the CMYK color swatch.

### operator=

```cpp
Ink & datalogics_interface::Ink::operator=(Ink &&) noexcept
```

**Parameters**

- (unnamed) ([`Ink &&`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Ink.md))

**Returns:** [`Ink &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Ink.md)

### set_alias

```cpp
void datalogics_interface::Ink::set_alias(const std::string &alias)
```

**Parameters**

- `alias` (`const std::string &`): an alternate name (alias) for this colorant

**Returns:** `void`

An alternate name (alias) for this colorant.

### set_angle

```cpp
void datalogics_interface::Ink::set_angle(double angle)
```

**Parameters**

- `angle` (`double`): the halftone screen angle for this ink, in degrees

**Returns:** `void`

The halftone screen angle for this ink, in degrees.

### set_colorant_name

```cpp
void datalogics_interface::Ink::set_colorant_name(const std::string &name)
```

**Parameters**

- `name` (`const std::string &`): the name of the colorant from the Separation or DeviceN color space, or the process color name

**Returns:** `void`

The name of the colorant from the Separation or DeviceN color space, or the process color name.

### set_density

```cpp
void datalogics_interface::Ink::set_density(double density)
```

**Parameters**

- `density` (`double`): the neutral density of this ink

**Returns:** `void`

The neutral density of this ink.

### set_frequency

```cpp
void datalogics_interface::Ink::set_frequency(double frequency)
```

**Parameters**

- `frequency` (`double`): the halftone screen frequency for this ink, in lines per inch

**Returns:** `void`

The halftone screen frequency for this ink, in lines per inch.

### set_ink_type

```cpp
void datalogics_interface::Ink::set_ink_type(InkType type)
```

**Parameters**

- `type` ([`InkType`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/InkType.md)): the ink type of this ink, used for trapping

**Returns:** `void`

The ink type of this ink, used for trapping.

### set_is_process_color

```cpp
void datalogics_interface::Ink::set_is_process_color(bool value)
```

**Parameters**

- `value` (`bool`): the whether this ink represents a process color or a spot color

**Returns:** `void`

Whether this ink represents a process color or a spot color.

True if this is a process color, false if this is a spot color.

### set_preview_option

```cpp
void datalogics_interface::Ink::set_preview_option(SeparationPreviewOption option)
```

**Parameters**

- `option` ([`SeparationPreviewOption`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/enum/SeparationPreviewOption.md)): the how the colorant is handled during a separation preview

**Returns:** `void`

How the colorant is handled during a separation preview.
