---
name: "PS_begin_pattern"
section: "3"
platform: "linux"
package: "pslib-dev"
version: "0.4.8-1+b1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/PS_begin_pattern"
---

# PS\_begin\_pattern(3)

Starts a new pattern

## NAME

PS\_begin\_pattern — Starts a new pattern

## SYNOPSIS

\#include \<pslib.h\>

int PS\_begin\_pattern(PSDoc \*psdoc, float width, float height, float xstep, float ystep, int painttype)

## DESCRIPTION

A pattern can be thought of like a color for drawing and filling.  Actually, **PS\_setcolor** is used to apply a pattern.  The pattern itself has given dimension an a stepping in horizontal and  vertical direction. The stepping comes into effect when the area to be  fill is larger than the pattern itself. In such a case the pattern will  be repeated with a distance of **xstep** in horizontal  and **ystep** in vertical direction.

Each call of **PS\_begin\_pattern** must be accompanied  by a call to **[PS\_end\_pattern(3)](/PS_end_pattern/3.md)**.

## RETURN VALUE

Returns identifier of the pattern or zero in case of an error.  The identifier is a positiv number greater 0.

## SEE ALSO

[PS\_end\_pattern(3)](/PS_end_pattern/3.md), PS\_set\_color(3)

## AUTHOR

This manual page was written by Uwe Steinmann uwe@steinmann.cx.
