PutText

Write text into an image.

Syntax

Definition:

HRESULT PutText(
    HRESULT            hrPrev,
    PCCH               sText,
    ITcVnImage*        ipDestImage,
    ULONG              nX,
    ULONG              nY,
    ETcVnFontType      eFontType,
    double             fFontScale,
    TcVnVector4_LREAL& aColor,
    LONG               nThickness = 1,
    ETcVnLineType      eLineType = LT_8_CONNECTED,
    bool               bBottomLeftOrigin = false
)

Parameters

Name

Type

Default

Description

hrPrev

HRESULT

HRESULT indicating the result of previous operations (If SUCCEEDED(hrPrev) equals false, no operation is executed.)

sText

PCCH

Text

ipDestImage

ITcVnImage*

Destination image

nX

ULONG

x coordinate (bottom left)

nY

ULONG

y coordinate (bottom left)

eFontType

ETcVnFontType

Font type

fFontScale

double

Scaling factor

aColor

TcVnVector4_LREAL&

Text color

nThickness

LONG

1

Line thickness

eLineType

ETcVnLineType

LT_8_CONNECTED

Line type

bBottomLeftOrigin

bool

false

Sets the image origin to the bottom left corner, if true

PutText 1: Return value

HRESULT

Required License

TC3 Vision Base

System Requirements

Development environment

Target platform

PLC libraries to include

TwinCAT V3.1.4024.59 or later

PC or CX (x64) with min. PL50, e.g. Intel Atom® 4-core CPU

Tc3_Vision