Marblecore Imaging Library Documentation

Documentation Introduction
Documentation / Marblecore Imaging / Methods / DrawTextInGradientWithBorderAndShadowUsingWarp

DrawTextInGradientWithBorderAndShadowUsingWarp method

Draws text with border, shadow and warp effect on the current image canvas and fills the text with a gradient color.

Syntax

Boolean DrawTextInGradientWithBorderAndShadowUsingWarp(strText As String, nX1 As Number, nY1 As Number, nX2 As Number, nY2 As Number, nX3 As Number, nY3 As Number, nX4 As Number, nY4 As Number, nColorA As Number, nOpacityA As Number, nColorB As Number, nOpacityB As Number, nGradient As Gradient, nPenColor As Number, nPenOpacity As Number, nPenStyle As Pen, nPenWidth As Number, nShadowColor As Number, nShadowOpacity As Number, nShadowOffset As Number, strFontFace As String, nFontSize As Number, bFontBold As State, bFontItalic As State, bFontUnderline As State, bFontStrikeout As State, bFontAntiAliasing As State, nFontAlignment As Alignment, nFontRotation As Number, nFontShearX As Number, nFontShearY As Number)

Return value

Returns true if the function succeeded.

Parameters

ParameterTypeRequiredDescription
strTextStringYesText to draw.
nX1NumberYesLeft top horizontal coordinate for the text warp.
nY1NumberYesLeft top vertical coordinate for the text warp.
nX2NumberYesRight top horizontal coordinate for the text warp.
nY2NumberYesRight top vertical coordinate for the text warp.
nX3NumberYesLeft bottom horizontal coordinate for the text warp.
nY3NumberYesLeft bottom vertical coordinate for the text warp.
nX4NumberYesRight bottom horizontal coordinate for the text warp.
nY4NumberYesRight bottom vertical coordinate for the text warp.
nColorANumberYesSpecifies the first color for the gradient.
nOpacityANumberYesParameter containing the opacity percentage (where 0% is completely transparent) for the first color.
nColorBNumberYesSpecifies the second color for the gradient.
nOpacityBNumberYesParameter containing the opacity percentage (where 0% is completely transparent) for the second color.
nGradientGradient (Enumeration)NoOptional parameter containing the gradient style.
nPenColorNumberNoOptional parameter containing a color value. If no color is specified, the current pen color will be used instead.
nPenOpacityNumberNoOptional parameter containing the opacity percentage (where 0% is completely transparent). If no opacity is specified, the current pen opacity will be used instead.
nPenStylePen (Enumeration)NoOptional parameter containing the desired line style. If no style is specified, the current pen style will be used instead.
nPenWidthNumberNoOptional parameter containing the desired line width (thickness) in pixels (ranging from 1...100). If no width is specified, the current pen width will be used instead.
nShadowColorNumberNoOptional parameter which specifies the shadow color.
nShadowOpacityNumberNoOptional parameter which specifies the shadow opacity.
nShadowOffsetNumberNoOptional parameter which specifies the shadow distance or offset. If not specified or 0 (zero) an offset is calculated.
strFontFaceStringNoOptional parameter which specifies the font face.
nFontSizeNumberNoOptional parameter which specifies the font size.
bFontBoldState (Enumeration)NoOptional parameter which enables or disables the bold font style.
bFontItalicState (Enumeration)NoOptional parameter which enables or disables the italic font style.
bFontUnderlineState (Enumeration)NoOptional parameter which enables or disables the underline font style.
bFontStrikeoutState (Enumeration)NoOptional parameter which enables or disables the strikeout font style.
bFontAntiAliasingState (Enumeration)NoOptional parameter which enables or disables the font anti-aliasing.
nFontAlignmentAlignment (Enumeration)NoOptional parameter which specifies the alignment of the text.
nFontRotationNumberNoOptional parameter which specifies the rotation angle of the text in degrees.
nFontShearXNumberNoOptional parameter which specifies the horizontal shear percentage of the text.
nFontShearYNumberNoOptional parameter which specifies the vertical shear percentage of the text.

Example

The example below shows how to use the method. If you take a look at the example code, assume there is a reference to the Marblecore Imaging object with the name 'MarblecoreImaging'. Transparent parts of the image are displayed using a checkerboard pattern.
 
 
1 // Creates a new transparent image
2 MarblecoreImaging.Create(150, 150, true);
3 
4 // Execute the operation
5 MarblecoreImaging.DrawTextInGradientWithBorderAndShadowUsingWarp("Demo", 25, 25, 130, 40, 15, 100, 110, 100, 16711680, 100, 65280, 100, "Horizontal", 0, 100, "Solid", 3, 0, 75, 8);
6 
7 // Save the modified image to the specified file
8 MarblecoreImaging.SaveToFile("example-drawtextingradientwithborderandshadowusingwarp.jpg");

Category

Text drawing

See also

DrawTextInGradient | DrawTextInGradientUsingWarp | DrawTextInGradientWithBorder | DrawTextInGradientWithBorderAndShadow | DrawTextInGradientWithBorderUsingWarp | DrawTextInGradientWithShadow | DrawTextInGradientWithShadowUsingWarp | DrawTextNormal | DrawTextUsingWarp | DrawTextWithBorder | DrawTextWithBorderUsingWarp | DrawTextWithShadow | DrawTextWithShadowUsingWarp | GetTextHeight | GetTextWidth