# DrawParams Class

> Settings for rendering PDF pages as images.

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

```cpp
class DrawParams
```

**Namespace:** `datalogics_interface`

## Description

This is used for rendering PDF pages to images, such as PNG or JPG files, to export to separate files or to send to a printer.

**Uses types:** [`ColorProfile`](https://docs.datalogics.com/apdfl21/ModernCPP/21.2.0/enum/ColorProfile.md), [`ColorSpace`](https://docs.datalogics.com/apdfl21/ModernCPP/21.2.0/class/ColorSpace.md), [`DrawFlags`](https://docs.datalogics.com/apdfl21/ModernCPP/21.2.0/enum/DrawFlags.md), [`Matrix`](https://docs.datalogics.com/apdfl21/ModernCPP/21.2.0/struct/Matrix.md), [`OptionalContentContext`](https://docs.datalogics.com/apdfl21/ModernCPP/21.2.0/class/OptionalContentContext.md), [`Rect`](https://docs.datalogics.com/apdfl21/ModernCPP/21.2.0/struct/Rect.md), [`RenderIntent`](https://docs.datalogics.com/apdfl21/ModernCPP/21.2.0/enum/RenderIntent.md), [`SmoothFlags`](https://docs.datalogics.com/apdfl21/ModernCPP/21.2.0/enum/SmoothFlags.md)

## Constructors

### DrawParams

```cpp
datalogics_interface::DrawParams::DrawParams()
```

*constructor*

Initializes with DeviceRGB color space, relative colorimetric render intent, no smoothing, no draw flags, and no cancel or progress callbacks.

### DrawParams

```cpp
datalogics_interface::DrawParams::DrawParams(const DrawParams &other)
```

*constructor*

**Parameters**

- `other` ([`const DrawParams &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.2.0/class/DrawParams.md))

Copy constructor.

### DrawParams

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

*constructor*

**Parameters**

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

### ~DrawParams

```cpp
datalogics_interface::DrawParams::~DrawParams()
```

*destructor*

## Methods

### get_bypass_copy_perm

```cpp
bool datalogics_interface::DrawParams::get_bypass_copy_perm() const
```

**Returns:** `bool`

Bypass copy permissions. Only used when drawing to a bitmap.

### get_color_space

```cpp
std::unique_ptr< ColorSpace > datalogics_interface::DrawParams::get_color_space() const
```

**Returns:** [`std::unique_ptr< ColorSpace >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.2.0/class/ColorSpace.md)

Must be one of DeviceGray, DeviceRGB, DeviceRGBA, DeviceCMYK, Lab, or LabA. Only used when drawing to a bitmap.

### get_dest_rect

```cpp
Rect datalogics_interface::DrawParams::get_dest_rect() const
```

**Returns:** [`Rect`](https://docs.datalogics.com/apdfl21/ModernCPP/21.2.0/struct/Rect.md)

Only used when drawing to a bitmap.

### get_enable_black_point_compensation

```cpp
bool datalogics_interface::DrawParams::get_enable_black_point_compensation() const
```

**Returns:** `bool`

Enable/disable black point compensation.

### get_enable_thin_line_heuristics

```cpp
bool datalogics_interface::DrawParams::get_enable_thin_line_heuristics() const
```

**Returns:** `bool`

Enable/disable thin line adjustments when drawing rectangles.

### get_flags

```cpp
DrawFlags datalogics_interface::DrawParams::get_flags() const
```

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

Drawing flags.

### get_icc_profile

```cpp
ColorProfile datalogics_interface::DrawParams::get_icc_profile() const
```

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

NOTE: The ICCProfileCustomPath must not be set for this property to be used. The profile must be compatible with the ColorSpace property value, which can't be set to ICCBased either.

### get_icc_profile_custom_path

```cpp
std::string datalogics_interface::DrawParams::get_icc_profile_custom_path() const
```

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

NOTE: The ICCProfile is ignored when this property is a non-empty string. The profile must be compatible with the ColorSpace property value, which can't be set to ICCBased either.

### get_matrix

```cpp
Matrix datalogics_interface::DrawParams::get_matrix() const
```

**Returns:** [`Matrix`](https://docs.datalogics.com/apdfl21/ModernCPP/21.2.0/struct/Matrix.md)

Useful for converting from page to window coordinates and for scaling.

### get_optional_content_context

```cpp
std::unique_ptr< OptionalContentContext > datalogics_interface::DrawParams::get_optional_content_context() const
```

**Returns:** [`std::unique_ptr< OptionalContentContext >`](https://docs.datalogics.com/apdfl21/ModernCPP/21.2.0/class/OptionalContentContext.md)

The optional content context, or NULL if using the document's default.

Get the optional-content context used for visibility state information.

### get_render_intent

```cpp
RenderIntent datalogics_interface::DrawParams::get_render_intent() const
```

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

Default rendering intent is RelColorimetric (relative colorimetric). Only used when drawing to a bitmap.

### get_smooth_flags

```cpp
SmoothFlags datalogics_interface::DrawParams::get_smooth_flags() const
```

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

Smoothing flags. Only used when drawing to a bitmap.

### get_update_rect

```cpp
Rect datalogics_interface::DrawParams::get_update_rect() const
```

**Returns:** [`Rect`](https://docs.datalogics.com/apdfl21/ModernCPP/21.2.0/struct/Rect.md)

A rectangle represented by the coordinates of its four sides. If unset (degenerate), the page's CropBox is used instead.

### operator=

```cpp
DrawParams & datalogics_interface::DrawParams::operator=(const DrawParams &other)
```

**Parameters**

- `other` ([`const DrawParams &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.2.0/class/DrawParams.md))

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

Copy assignment.

### operator=

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

**Parameters**

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

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

### set_bypass_copy_perm

```cpp
void datalogics_interface::DrawParams::set_bypass_copy_perm(bool value)
```

**Parameters**

- `value` (`bool`)

**Returns:** `void`

Bypass copy permissions. Only used when drawing to a bitmap.

### set_color_space

```cpp
void datalogics_interface::DrawParams::set_color_space(ColorSpace &color_space)
```

**Parameters**

- `color_space` ([`ColorSpace &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.2.0/class/ColorSpace.md)): the color space in which the bitmap data is represented

**Returns:** `void`

Must be one of DeviceGray, DeviceRGB, DeviceRGBA, DeviceCMYK, Lab, or LabA. Only used when drawing to a bitmap.

### set_dest_rect

```cpp
void datalogics_interface::DrawParams::set_dest_rect(const Rect &rect)
```

**Parameters**

- `rect` ([`const Rect &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.2.0/struct/Rect.md))

**Returns:** `void`

Only used when drawing to a bitmap.

### set_enable_black_point_compensation

```cpp
void datalogics_interface::DrawParams::set_enable_black_point_compensation(bool value)
```

**Parameters**

- `value` (`bool`)

**Returns:** `void`

Enable/disable black point compensation.

### set_enable_thin_line_heuristics

```cpp
void datalogics_interface::DrawParams::set_enable_thin_line_heuristics(bool value)
```

**Parameters**

- `value` (`bool`)

**Returns:** `void`

Enable/disable thin line adjustments when drawing rectangles.

### set_flags

```cpp
void datalogics_interface::DrawParams::set_flags(DrawFlags flags)
```

**Parameters**

- `flags` ([`DrawFlags`](https://docs.datalogics.com/apdfl21/ModernCPP/21.2.0/enum/DrawFlags.md))

**Returns:** `void`

Drawing flags.

### set_icc_profile

```cpp
void datalogics_interface::DrawParams::set_icc_profile(ColorProfile profile)
```

**Parameters**

- `profile` ([`ColorProfile`](https://docs.datalogics.com/apdfl21/ModernCPP/21.2.0/enum/ColorProfile.md))

**Returns:** `void`

NOTE: The ICCProfileCustomPath must not be set for this property to be used. The profile must be compatible with the ColorSpace property value, which can't be set to ICCBased either.

### set_icc_profile_custom_path

```cpp
void datalogics_interface::DrawParams::set_icc_profile_custom_path(const std::string &path)
```

**Parameters**

- `path` (`const std::string &`)

**Returns:** `void`

NOTE: The ICCProfile is ignored when this property is a non-empty string. The profile must be compatible with the ColorSpace property value, which can't be set to ICCBased either.

### set_matrix

```cpp
void datalogics_interface::DrawParams::set_matrix(const Matrix &matrix)
```

**Parameters**

- `matrix` ([`const Matrix &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.2.0/struct/Matrix.md))

**Returns:** `void`

Useful for converting from page to window coordinates and for scaling.

### set_optional_content_context

```cpp
void datalogics_interface::DrawParams::set_optional_content_context(OptionalContentContext &context)
```

**Parameters**

- `context` ([`OptionalContentContext &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.2.0/class/OptionalContentContext.md)): The optional content context, or NULL for the default.

**Returns:** `void`

Set to NULL to use the document's current states in the default context.

### set_render_intent

```cpp
void datalogics_interface::DrawParams::set_render_intent(RenderIntent intent)
```

**Parameters**

- `intent` ([`RenderIntent`](https://docs.datalogics.com/apdfl21/ModernCPP/21.2.0/enum/RenderIntent.md))

**Returns:** `void`

Default rendering intent is RelColorimetric (relative colorimetric). Only used when drawing to a bitmap.

### set_smooth_flags

```cpp
void datalogics_interface::DrawParams::set_smooth_flags(SmoothFlags flags)
```

**Parameters**

- `flags` ([`SmoothFlags`](https://docs.datalogics.com/apdfl21/ModernCPP/21.2.0/enum/SmoothFlags.md))

**Returns:** `void`

Smoothing flags. Only used when drawing to a bitmap.

### set_update_rect

```cpp
void datalogics_interface::DrawParams::set_update_rect(const Rect &rect)
```

**Parameters**

- `rect` ([`const Rect &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.2.0/struct/Rect.md))

**Returns:** `void`

A rectangle represented by the coordinates of its four sides. If unset (degenerate), the page's CropBox is used instead.
