Marblecore Imaging Library Documentation

Documentation Introduction
Documentation / Marblecore Imaging / Methods / EffectBorder

EffectBorder method

Draws a border around the image. The border is always a rectangle around the image.

Syntax

Boolean EffectBorder(nRadius As Number, bKeepSize As Boolean, nPenColor As Number, nPenOpacity As Number, nPenStyle As Pen, nPenWidth As Number, bPenAntiAliasing As State, nBackgroundColor As Number, nBackgroundOpacity As Number)

Return value

Returns true if the function succeeded.

Parameters

ParameterTypeRequiredDescription
nRadiusNumberNoSpecifies the corner radius of the border.
bKeepSizeBooleanNoOptional parameter which enables or disables automatic resizing of the image. If this parameter is true, the orginial image width and height are retained.
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.
bPenAntiAliasingState (Enumeration)NoOptional parameter enabling or disabling line anti-aliasing. If not specified the current pen anti-aliasing setting will be used instead.
nBackgroundColorNumberNoOptional parameter containing the background color. If no color is specified the current background color will be used.
nBackgroundOpacityNumberNoOptional parameter containing the background opacity.

Example

The example below shows the effect of this method and how to use it. You can slide the marker in the before/after picture to see the difference. 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.
 
before
after
 
1 // Load the specified image in memory
2 MarblecoreImaging.LoadFromFile("example-effectborder-before.jpg");
3 
4 // Execute the operation
5 MarblecoreImaging.EffectBorder(40, false, 0, 100, "Solid", 5, "True");
6 
7 // Save the modified image to the specified file
8 MarblecoreImaging.SaveToFile("example-effectborder-after.jpg");

Category

Effects

See also

EffectButton | EffectColorOverlay | EffectInnerBevel | EffectInnerGlow | EffectMask | EffectOuterGlow | EffectShadow | EffectSoftenBorder