---
name: "dtk_draw_shape"
section: "3"
platform: "linux"
package: "libdrawtk-dev"
version: "2.0-2.1"
release: "Debian 8 (Jessie)"
platforms: ["linux"]
url: "https://new.carta.tech/dtk_draw_shape"
---

# dtk\_draw\_shape(3)

Draw a shape in the window

## NAME

dtk\_draw\_shape - Draw a shape in the window

## SYNOPSIS

**#include \<drawtk.h\>**

**void dtk\_draw\_shape(const dtk\_hshape** *shp***);**\

## DESCRIPTION

**dtk\_draw\_shape**() draw the shape referenced by *shp* in the current window. The position of the drawing depends on the rotation and translation previously set by **dtk\_\*move\_shape**() and **dtk\_\*rotate\_shape**() (the rotation is first applied to the shape and then the translation).

This function assumes there is a valid OpenGL rendering context in the calling thread. So a successfull call to **dtk\_make\_current\_window**() should have been performed previously in the **current** thread.

## RETURN VALUE

None.

## SEE ALSO

[**dtk\_move\_shape**(3)](/dtk_move_shape/3.md), [**dtk\_make\_current\_window**(3)](/dtk_make_current_window/3.md)
