Image/Pixel-Color Operations

<< Click to Display Table of Contents >>

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

Image/Pixel-Color Operations

ANA.Fill - Fill IR with Colour or Line-Pattern

Previous Top Next


MiniRobotLanguage (MRL)

 

ANA.Fill

Fill Register (IR) with Color or Line-Pattern

 

 

Intention

 

This command will fill an IR with a solid Background-Color. Optionally it will then draw a Pattern on this.

In case there is another picture in the IR, this will be overwritten.

 

STW.ct|#32770|Basic-NAV Matrix 02

' We snap into the IR 2 here

ANA.Snap|2

' Copy IR 2 into IR 1

ANA.Fill|2|1

' Display IR 1

ANA.Show|1!

ENR.

 

 

This will create a series of Patterns. Note that you can not just fill an empty IR, you need to create an IR first, using the ANA.New-Command.
 

ANA.New|0|320|200

FOR.$$LOP|0|6

  ANA.Fill|0|&H00FFFF|$$LOP|&HF020F0

  ANA.Save|0|?path\Pat_$$LOP.png

NEX.

ENR.

 

Pat_0 Pat_1   Pat_2 Pat_3

 

Pat_4 Pat_5   Pat_6  

 

 

Syntax

 

ANA.Fill[|P1][|P2][|P3]

 

Parameter Explanation

 

P1 - opt. Source Image-Register Number, if omitted 0 is used.

P2 - opt. Color for Background, if omitted White (&HFFFFFF) is used.

P3 - opt. Number for Pattern, if omitted 0 is used.

0 - Solid (default)

1 - Horizontal Lines

2 - Vertical Lines

3 - Upward Diagonal Lines

4 - Downward Diagonal Lines

5 - Crossed Lines

6 - Diagonal Crossed Lines

P4 - opt. Color for Pattern, if omitted Black (&H0) 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.Fill-Sample

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

ANA.New|0|320|200

ANA.Fill|0|&HFFFFFF|1|&HFF0000

ANA.Show|0!  

ANA.Save|0|?path\Lines01.png

ENR.

 

' Below you can see the result of the Operation.

 

Lines01

 

 

 

 

 

 

Remarks

  Currently there is no way to change the distance between the lines or the thickness of the lines.

 

 

 

Limitations:

 

-

 

 

See also: