Multiple Image Resizer .NET v4.5.2
Help Documentation
Contents

Scripting Function - AddTextByPositionWithRotation

The function adds text rotated by a specified angle to each image. The location of the text is specified by position and x and y offsets.

 

Syntax

AddTextByPositionWithRotation text As StringValue, userfontname As StringValue, userfillname As StringValue, angle As IntegerValueAny, position As PositionValue, xoffset As IntegerValueGreaterEqualZero, yoffset As IntegerValueGreaterEqualZero, alignment As AlignmentValue, transparencyPercentage As IntegerValuePercentage

 

Parameters

text - the text the add each processed image. Note you may also use Special Text Tags within your text.

userfontname - the name of the font that you would like to apply to the text. Note that you must create the font specified in this parameter using the CreateFont function before you use this function.

userfillname - the name of the font fill color/pattern that you would like to apply to the text. Note that you must create the fill specified in this parameter using either the CreateFillSolid or CreateFillLinearGradient function before you use this function.

angle - the angle of the text in degrees (note the angle can be specified as a positive or negative number)

position - the position of the text

xoffset - the x offset from the edge of the image relative the position

yoffset - the y offset from the edge of the image relative the position

alignment - the alignment of the text (note only works for multi-line text)

transparencyPercentage - the transparency of the text in percent (0 = solid non transparent text, 100 = fully transparent text)

 

Example

The following example creates a new font, creates a linear gradient fill for the font and then adds a text message at an angle of 75 degrees to the top right of the image that is offset 25 pixels from the top right edges of the image, with the text left aligned and 20% transparent:

CreateFont "myFont2", "Arial", Bold, False, False, 40
CreateFillLinearGradient "myGradientFill", Argb(255, 128, 128, 40), Argb(255, 255, 38, 68), 45
AddTextByPositionWithRotation "This is some text", "myFont2", "myGradientFill", 75, TopRight, 25, 25, Left, 20

 

Version Information

Supported in Multiple Image Resizer .NET v2.3.0.0

 

See Also