.. highlightlang:: us .. index:: PenCreate .. _pencreate: PenCreate ========= .. us.tag PenCreate ENGLISH Changed427 Creates a pen object. .. function:: hPen = PenCreate() hPen = PenCreate(hPenOther) hPen = PenCreate(nStyle, nWidth, rvColorRGB) .. us.return **Return Value** *hPen* is the pen handle. If the pen cannot be created, *hPen* is 0. .. us.params **Parameters** .. uparam:: nStyle *nStyle* is one of the following values: .. list-table:: :header-rows: 1 * - Value - Meaning * - PS_SOLID - solid line pen * - PS_DASH - dash pen * - PS_DOT - dot pen * - PS_DASHDOT - dash dot pen * - PS_DASHDOTDOT - dash dot dot pen * - PS_NULL - invisible pen .. uparam:: nWidth *nWidth* is the width of the pen in 0.1 mm. .. uparam:: rvColorRGB *rvColorRGB* is a vector with 3 elements that set the pen color: .. list-table:: :header-rows: 1 * - Value - Meaning * - rvColorRGB[1] - Red (0 to 255) * - rvColorRGB[2] - Green (0 to 255) * - rvColorRGB[3] - Blue (0 to 255) .. us.history **History** .. list-table:: :header-rows: 1 * - Version - Description * - 4.2.7 - Function can be invoked with one parameter (copy constructor). .. seealso:: :ref:`overview-pens`, :ref:`PenDestroy`, :ref:`ObjCopy` :sub:`id-246394`