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.Blit - Copy or Mix IR Content

Previous Top Next


MiniRobotLanguage (MRL)

 

ANA.Blit

Use GPU to copy or mix Image-Register(s) (IR)

 

 

Intention

 

This command has a lot of Options to copy or mix Image Registers.

It uses the GPU and offers the Option to use several different Logic ways to get the final result.

Using this Command, Source IR and Target IR must have the same Resolution.

If that is not the case, use "ANA.EqualRes" to enforce the same resolution on the target-Side.

 

You can simply copy a IR over another or you can make logical combinations using

Blit-Modes

 

Here are two examples:

 

Img25 +    Img14    Img31

Img08  +  Img14      Img16

You will find much more examples on the Blit-Modes Page.

 

 

Sometimes the result depends on whether you "Blit A on B" or you "Blit B on A"

This will include all Screens on a Dual-Screen System. Here we search a Pattern on the complete Desktop.

 

' Generate two Bitmaps with Colours

ANA.New|0|800|400

ANA.vgradient|0|&H000000|&HFFFFFF

ANA.New|1|800|400

ANA.hgradient|1|&H0000F1|&H1FFF0F

 

' Show you the Pictures

ANA.Show|0!

ANA.Show|1!

 

' Set Blitmode to 5

$$BLI=5

 

' Make a Copy of the Original IR for later use

ANA.Copy|1|2

 

' Blit 0 over 2 using Style "5"

ANA.blit|0|2|$$BLI

 

' Show you IR 2 (Result)

ANA.Show|2!

 

' Copy new Target to IR 2

ANA.Copy|0|2

 

' Blit 1 over 2 using same Blitmode

ANA.blit|1|2|$$BLI

 

' Show you IR 2

ANA.Show|2!

ENR.

 

 

 

Syntax

 

ANA.Blit[|P1]

 

Parameter Explanation

 

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

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

P3 - opt. Blit-Mode (default is 4)

 

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

 

 

Example

 

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

' ANA.Blit-Sample

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

ANA.New|0|800|400

ANA.vgradient|0|&H00FF00|&HFFFF

ANA.Show|0!

$$BLI=2

ANA.blit|0|0|$$BLI

ANA.Show|0!

ENR.

 

The Command can blit over itself, see Sample.

 

 

 

 

 

Remarks

 

-

 

 

 

Limitations:

 

-

 

 

See also:

 

    Blit-Modes