Documentation / Marblecore Imaging / Methods / EffectButton
EffectButton method
Applies a button effect on the image.
Syntax
Boolean EffectButton(nSize As Number, bSunken As Boolean, bSmooth As Boolean, nLightColor As Number, nLightOpacity As Number, nDarkColor As Number, nDarkOpacity As Number)
Return value
Returns true if the function succeeded.
Parameters
Parameter | Type | Required | Description |
nSize | Number | No | Size of the button border. |
bSunken | Boolean | No | Optional parameter which enables or disables a sunken (inverted border). Disabled by default. |
bSmooth | Boolean | No | Optional parameter which enables or disables the smooth border effect. Enabled by default. |
nLightColor | Number | No | Optional parameter which specifies the light color of the border. |
nLightOpacity | Number | No | Optional parameter containing the opacity percentage (where 0% is completely transparent) for the light color. |
nDarkColor | Number | No | Optional parameter which specifies the dark color of the border. |
nDarkOpacity | Number | No | Optional parameter containing the opacity percentage (where 0% is completely transparent) for the dark color. |
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-effectbutton-before.jpg");
3
4
5 MarblecoreImaging.EffectButton();
6
7
8 MarblecoreImaging.SaveToFile("example-effectbutton-after.jpg");
Category
Effects
See also
EffectBorder |
EffectColorOverlay |
EffectInnerBevel |
EffectInnerGlow |
EffectMask |
EffectOuterGlow |
EffectShadow |
EffectSoftenBorder