<< Click to Display Table of Contents >> Navigation: 3. Script Language > Image/Pixel-Color Operations > ANA. - Imageworks > Paint Operations > Image/Pixel-Color Operations |
MiniRobotLanguage (MRL)
ANA.VGradient
Generate a Vertical Gradient between two Colors in an Image-Register (IR)
Intention
This command will generate an Gradient in vertical direction, between two Colors.
1. Generate a V-Gradient and Mix it with a H-Gradient to get a Multi-Gradient
This will generate a V- and a H- Grradient and Mix them together using Blitmode 7 to get a Multi-Gradient.
ANA.New|0|800|400
ANA.vgradient|0|&HFF00FF|&H000000
ANA.Show|0!
ANA.New|2|800|400
ANA.hgradient|2|&H0000FF|&H00FFFF
ANA.Show|2!
ANA.Mix|0|2|7
ANA.Show|2!
ENR.
+ =
2. If you omit P3, you will get an automatic selected color
If you om,it P3, the second Color will be automatically calculated using the Formula: &HFFFFFF-P2
ANA.New|0|800|400
ANA.vgradient|0|&HFF00FF
ANA.Show|0!
ANA.New|2|800|400
ANA.hgradient|2|&H0000FF
ANA.Show|2!
ANA.Mix|0|2|7
ANA.Show|2!
ENR.
+ =
Syntax
ANA.VGradient[|P1][|P2][|P3]
Parameter Explanation
P1 - opt. Target Image-Register number, if omitted, IR 0 will be used. There must be Content in that IR, it must exist.
P2 - opt. Color A (Top Color)
P3 - opt. Color B (Bottom Color)
The Command will leave a 0/1 on the TOS. As always, a 0 means Error, while a 1 means "all fine".
Example
'***********************************
' ANA.H/VGradient-Sample
'***********************************
ANA.New|0|1200|600
ANA.vgradient|0|&HFF00FF|&H00FF00
ANA.Show|0!
ANA.New|2|800|400
ANA.hgradient|2|&H0000ff|&H00FFFF
ANA.Show|2!
ANA.Mix|0|2|7
ANA.Show|2!
ENR.
' Here we mix two Gradients of different resolution.
Remarks
A V-Gradient on a 6000x4000 large Picture will need 1429447 Ticks, that is on my Computer 0.89 Seconds.
Using the SPR for commercial Pictures?
Yes, is possible.
I have set this Picture for Sale on Dreamstime, see: "Color Whee Background".
Limitations:
-
See also:
•