# DrawTextField | @vladmandic/face-api - v1.7.6
Documentation for @vladmandic/face-api - v1.7.6

# Class DrawTextField

#### Hierarchy

- DrawTextField

- Defined in draw/DrawTextField.ts:53

#####
Index

### Constructors

constructor

### Properties

anchor
options
text

### Methods

draw
getUpperLeft
measureHeight
measureWidth

## Constructors

### constructor

- new DrawTextField(text: string | string[] | DrawTextField, anchor: IPoint, options?: IDrawTextFieldOptions ): DrawTextField

- #### Parameters

  - ##### text: string | string[] | DrawTextField

  - ##### anchor: IPoint

  - ##### options: IDrawTextFieldOptions = {}

  #### Returns DrawTextField

  - Defined in draw/DrawTextField.ts:60

## Properties

### anchor

anchor: IPoint

- Defined in draw/DrawTextField.ts:56

### options

options: DrawTextFieldOptions

- Defined in draw/DrawTextField.ts:58

### text

text: string[]

- Defined in draw/DrawTextField.ts:54

## Methods

### draw

- draw(canvasArg: string | HTMLCanvasElement | CanvasRenderingContext2D): void

- #### Parameters

  - ##### canvasArg: string | HTMLCanvasElement | CanvasRenderingContext2D

  #### Returns void

  - Defined in draw/DrawTextField.ts:103

### getUpperLeft

- getUpperLeft(ctx: CanvasRenderingContext2D, canvasDims?: IDimensions ): IPoint

- #### Parameters

  - ##### ctx: CanvasRenderingContext2D

  - ##### `Optional` canvasDims: IDimensions

  #### Returns IPoint

  - Defined in draw/DrawTextField.ts:83

### measureHeight

- measureHeight(): number

- #### Returns number

  - Defined in draw/DrawTextField.ts:78

### measureWidth

- measureWidth(ctx: CanvasRenderingContext2D): number

- #### Parameters

  - ##### ctx: CanvasRenderingContext2D

  #### Returns number

  - Defined in draw/DrawTextField.ts:73