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.PrintAt - Print Text inside of IR

Previous Top Next


MiniRobotLanguage (MRL)

 

ANA.PrintAt

Print Text inside of an Image-Register (IR)

 

 

Intention

 

This command will Print a Text inside of an IR.

 

 

 

1. Print a Text into an IR

This will will just Print a Text into an IR.

You can Print Text in all Colors and Sizes. You can also Print Text with an own Background-Color or with transparent Background (use -2 as Background-Color).

Here is a Sample for that.

 

ANA.New|0|800|400

ANA.vgradient|0|&HFF00FF|&H000000

ANA.New|2|800|400

ANA.hgradient|2|&H0000FF|&H00FFFF

ANA.Mix|0|2|7

' Backgroundcolor

$$LAA=-2

' Fontname

$$LAC=Segoe UI

$$TXT=Relations

FOR.$$LU3|1|2550

  RND.1|799|$$XP1 

  RND.1|799|$$XP2

  RND.1|399|$$YP1 

  RND.1|399|$$YP2   

  RND.-1|1|$$COA

' Textfarbe

  RND.0|&HFFFFFF|$$COL

  ANA.PrintAt|2|$$TXT|$$COL|$$LAA|$$XP1|$$YP1|9|$$LAC|1

NEX.

DMP.1

ANA.Show|2!

ENR.

 

Print_At

This is the result of the Script above. As we used "-2" as Background, the Text has no own Background-Color.

 

 

Speedump_Print_At

Here you can see the Speed-Dump of the Script in "FreeRun"-Mode from the Editor.

 

 

 

We can also dynamically change the size of the used Font:

 

 

ANA.New|0|800|400

ANA.vgradient|0|&HFF00FF|&H000000

ANA.New|2|800|400

ANA.hgradient|2|&H0000FF|&H00FFFF

ANA.Mix|0|2|7

' Fontname

$$LAC=Segoe UI

$$TXT=Relations

FOR.$$LU3|1|255

  RND.1|799|$$XP1 

  RND.1|799|$$XP2

  RND.1|399|$$YP1 

  RND.1|399|$$YP2   

  RND.-1|1|$$COA

' Textfarbe

  RND.0|&HFFFFFF|$$COL

' Hintergrundfarbe

  RND.0|1|$$SWI

  IVV.$$SWI=0

    $$LAA=0       

  ELS.

    $$LAA=&HFFFFFF

  EIF.

  RND.4|14|$$SIZ

  ANA.PrintAt|2|$$TXT|$$COL|$$LAA|$$XP1|$$YP1|$$SIZ|$$LAC|1

NEX.

ANA.Show|2!

ENR.

 

 

 

PrintAt5

 

 

 

 

Syntax

 

ANA.PrintAt|P1|P2[|P3][|P4][|P5][|P6][|P7][|P8][|P9][|P10]

 

Parameter Explanation

 

P1 - Image-Register number

P2 - Text to Print

P3 - opt. Text-Color

P4 - opt. Background-Color

P5 - opt. X-Pos for Text

P6 - opt. Y-Pos. for Text

P7 - opt. FontSize for Text

P8 - opt. FontName for Text

P9 - opt. FontSmoothing 0/1

P10 - opt. Use Cleartype 0/1

 

 

 

 

Example

 

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

' ANA.PrintAt

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

ANA.New|0|100|64

' Hintergrundfarbe

$$LAA=&H585858

ANA.Fill|0|$$LAA

' Fontname

$$LAC=Segoe UI

' Textfarbe

$$LAB=&HFFFFFF

$$TXT=Relations

ANA.PrintAt|0|$$TXT|$$LAB|$$LAA|0|0|9|$$LAC|1

ANA.Show|0#!

ENR.

 

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

' ANA.PrintAt - Sample 2

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

ANA.New|0|800|400

ANA.vgradient|0|&HFF00FF|&H000000

ANA.New|2|800|400

ANA.hgradient|2|&H0000FF|&H00FFFF

ANA.Mix|0|2|7

' Fontname

$$LAC=Segoe UI

 

$$TXT=Relations

 

FOR.$$LU3|1|255

  RND.1|799|$$XP1 

  RND.1|799|$$XP2

  RND.1|399|$$YP1 

  RND.1|399|$$YP2   

  RND.-1|1|$$COA

' Textfarbe

  RND.0|&HFFFFFF|$$COL

' Hintergrundfarbe

  RND.0|1|$$SWI

  IVV.$$SWI=0

    $$LAA=0       

  ELS.

    $$LAA=&HFFFFFF

  EIF.

  ANA.PrintAt|2|$$TXT|$$COL|$$LAA|$$XP1|$$YP1|9|$$LAC|1

NEX.

ANA.Show|2!

ENR.

 

Prinjt_At45

 

 

Remarks

 

This Command may use up to 20000 Ticks per call. This means it can be called about 800 times in a second.

 

 

 

Limitations:

 

-

 

 

See also: