Back to FabImage Library website

You are here: Start » Function Reference » Image » Image Drawing » DrawString

DrawString


Header: FIL.h
Namespace: fil
Module: FoundationLite

Draws a string on an image.

Syntax

C++
C#
 
void fil::DrawString
(
	fil::Image& ioImage,
	const ftl::String& inString,
	const fil::Location& inLocation,
	ftl::Optional<const fil::CoordinateSystem2D&> inLocationAlignment,
	const fil::Anchor2D::Type inLocationAnchor,
	const fil::Pixel& inColor,
	const fil::DrawingStyle& inDrawingStyle,
	float inSize,
	float inOrientationAngle,
	ftl::Optional<const fil::Pixel&> inBackgroundColor
)

Parameters

Name Type Default Description
Input will be modified
ioImage Image&
Input value
inString const String&
Input value
inLocation const Location&
Input value
inLocationAlignment Optional<const CoordinateSystem2D&> NIL
Input value
inLocationAnchor const Anchor2D::Type MiddleCenter
Input value
inColor const Pixel&
Input value
inDrawingStyle const DrawingStyle&
Input value
inSize float 12.0f Height of a character
Input value
inOrientationAngle float 0.0f
Input value
inBackgroundColor Optional<const Pixel&> NIL

Description

The operation draws a string on the ioImage aligning the inLocationAnchor location of the text at the inLocation of the ioImage. The height of the font is fixed and equals 16 pixels.

Usage of DrawString with various settings.

See Also

  • DrawLine – Draws a line on an image.
  • DrawPath – Draws a path on an image.