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
Parameter | Type | Required | Description |
nRadius | Number | No | Specifies the corner radius of the border. |
bKeepSize | Boolean | No | Optional parameter which enables or disables automatic resizing of the image. If this parameter is true, the orginial image width and height are retained. |
nPenColor | Number | No | Optional parameter containing a color value. If no color is specified, the current pen color will be used instead. |
nPenOpacity | Number | No | Optional parameter containing the opacity percentage (where 0% is completely transparent). If no opacity is specified, the current pen opacity will be used instead. |
nPenStyle | Pen (Enumeration) | No | Optional parameter containing the desired line style. If no style is specified, the current pen style will be used instead. |
nPenWidth | Number | No | Optional 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. |
bPenAntiAliasing | State (Enumeration) | No | Optional parameter enabling or disabling line anti-aliasing. If not specified the current pen anti-aliasing setting will be used instead. |
nBackgroundColor | Number | No | Optional parameter containing the background color. If no color is specified the current background color will be used. |
nBackgroundOpacity | Number | No | Optional 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.
1
2 MarblecoreImaging.LoadFromFile("example-effectborder-before.jpg");
3
4
5 MarblecoreImaging.EffectBorder(40, false, 0, 100, "Solid", 5, "True");
6
7
8 MarblecoreImaging.SaveToFile("example-effectborder-after.jpg");
Category
Effects
See also
EffectButton |
EffectColorOverlay |
EffectInnerBevel |
EffectInnerGlow |
EffectMask |
EffectOuterGlow |
EffectShadow |
EffectSoftenBorder