---
name: "tickit_pen_copy"
section: "3"
platform: "linux"
package: "libtickit-dev"
version: "0.4.3-2"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/tickit_pen_copy"
---

# tickit\_pen\_copy(3)

copy attributes from one pen to another

## NAME

tickit\_pen\_copy, tickit\_pen\_copy\_attr - copy attributes from one pen to another

## SYNOPSIS

```
#include <tickit.h>

void tickit_pen_copy(TickitPen *dst, TickitPen *src,
    bool overwrite);
void tickit_pen_copy_attr(TickitPen *dst, TickitPen *src,
    TickitPenAttr attr);
```

Link with *-ltickit*.

## DESCRIPTION

**tickit\_pen\_copy**() copies attributes that are defined on *src* into *dst*. If an attribute is already defined on *dst* then it will only be changed if *overwrite* is true; otherwise the existing value will be left alone. It will invoke the **TICKIT\_EV\_CHANGE** event on the *dst* pen instance if the value of at least one attribute has actually changed.

**tickit\_pen\_copy\_attr**() copies the value of a single attribute from *src* into *dst*, or clears it in *dst* if it is not present in *src*. It will invoke the **TICKIT\_EV\_CHANGE** event on the *dst* pen instance.

## RETURN VALUE

**tickit\_pen\_copy**() and **tickit\_pen\_copy\_attr**() return no value.

## SEE ALSO

[**tickit\_pen\_new**(3)](/tickit_pen_new/3.md), [**tickit\_pen\_set\_bool\_attr**(3)](/tickit_pen_set_bool_attr/3.md), [**tickit\_pen\_set\_int\_attr**(3)](/tickit_pen_set_int_attr/3.md), [**tickit\_pen\_set\_colour\_attr**(3)](/tickit_pen_set_colour_attr/3.md), [**tickit\_pen\_clear**(3)](/tickit_pen_clear/3.md), [**tickit\_pen**(7)](/tickit_pen/7.md), [**tickit**(7)](/tickit/7.md)
