---
name: "EMF_EMRCREATEPEN"
section: "3"
platform: "linux"
package: "libemf-doc"
version: "1.0.13-8"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/EMF_EMRCREATEPEN"
---

# EMF\_EMRCREATEPEN(3)

EMF Pen.

## NAME

EMF::EMRCREATEPEN - EMF Pen.

## SYNOPSIS

`#include <libemf.h>`

Inherits **EMF::METARECORD**, and EMRCREATEPEN.

### Public Member Functions

**EMRCREATEPEN** (**PEN** \*pen, HGDIOBJ handle)\
 **EMRCREATEPEN** (**DATASTREAM** &ds)\
 bool **serialize** (**DATASTREAM** ds)\
 int **size** (void) const\
 void **execute** (**METAFILEDEVICECONTEXT** \*source, HDC dc) const\

Public Member Functions inherited from **EMF::METARECORD** virtual **~METARECORD** ()\

## Detailed Description

EMF Pen.

Create a new pen (used for drawing lines, arcs, rectangles, etc.).

## Constructor & Destructor Documentation

### EMRCREATEPEN::EMRCREATEPEN (PEN \* pen, HGDIOBJ handle)

**Parameters**

*pen* an instance of a **PEN** object. \
 *handle* the **PEN** object's handle.

### EMRCREATEPEN::EMRCREATEPEN (DATASTREAM & ds)

Construct a CreatePen record from the input stream.

**Parameters**

*ds* Metafile datastream.

## Member Function Documentation

### void EMRCREATEPEN::execute (METAFILEDEVICECONTEXT \* source, HDC dc) const` [virtual]`

Execute this record in the context of the given device context.

**Parameters**

*source* the device context from which this record is taken. \
 *dc* device context for execute.

Implements **EMF::METARECORD**.

References **EMF::METAFILEDEVICECONTEXT::emf\_handles**.

### bool EMF::EMRCREATEPEN::serialize (DATASTREAM ds)` [inline]`, ` [virtual]`

**Parameters**

*ds* Metafile datastream.

Implements **EMF::METARECORD**.

### int EMF::EMRCREATEPEN::size (void) const` [inline]`, ` [virtual]`

Internally computed size of this record.

Implements **EMF::METARECORD**.

## Author

Generated automatically by Doxygen for libemf from the source code.
