Image/Pixel-Color Operations

<< Click to Display Table of Contents >>

Navigation:  3. Script Language > Image/Pixel-Color Operations > ANA. - Imageworks > Blit-Operations >

Image/Pixel-Color Operations

ANA.BlitCol - Mix IR with Color

Previous Top Next


MiniRobotLanguage (MRL)

 

ANA.BlitCol

Mix an Image-Register (IR) with a solid color using Blitmodes

 

 

Intention

 

This command will generate an internal IR that is completely filled with a specified color.

It will then Blit this IR over the Source IR and store the result in destination.

 

1. Blit a defined Color over a IR

See the result below.

 

ANA.New|0|800|400

ANA.vgradient|0|&HFFFFFF|&H000000

ANA.Show|0!

'  Source|Target|Color|Blitmode

ANA.BlitCol|0|1|&HFFFF0F|2

ANA.Show|1!

ENR.

 

Img38     Img39

 

If we change the Color here to:

 

ANA.BlitCol|0|1|&HFFFF00|2

' We get less stripes

 

 

 

Img40   Img41

 

ANA.BlitCol|0|1|&HFFFF00|2                    ANA.BlitCol|0|1|&HFFFF20|2 

' We get less stripes                         'We get more stripes  

 

 

2. Use different Blitmodes to get different results.

 

Note that we used Blitmode 2. Depending on the Blitmode you get different result. Here a result using Blitmode 5 and Blitmode 7.

 

Img42   Img43

 

 

ANA.New|0|800|400

ANA.vgradient|0|&HFFFFFF|&H000000

ANA.Show|0!

'  Source|Target|Color|Mixmode

ANA.BlitCol|0|1|&HFFFF10|5

ANA.Show|1!

ENR.

 

 

Syntax

 

ANA.BlitCol[|P1][|P2][|P3][|P4]

 

Parameter Explanation

 

P1 - opt. Image-Register number, if omitted, IR 0 will be used.

P2 - opt.Image-Register number, if omitted, P1 will be used.

 

P3 - opt. Color, if omitted &H808080 (Grey Color) is used.

P4 - opt. Blitmode, if omitted Blitmode 12 "MergeNotSource" is used.

 

The Command will leave a 0/1 on the TOS. As always, a 0 means Error, while a 1 means "all fine".

 

 

Example

 

'***********************************

' ANA.BlitCol-Sample

'***********************************

ANA.New|0|800|400

ANA.vgradient|0|&HFF00FF|&H000000

ANA.Show|0!

'  Source|Target|Color|Mixmode

ANA.BlitCol|0|1|&HFF0010|7

ANA.Show|1!

ENR.

 

' Here you can see a part of the result of the Operation.

 

Img44

 

 

 

 

Remarks

 

-

 

 

 

Limitations:

 

-

 

 

See also: