-
Notifications
You must be signed in to change notification settings - Fork 4
Adding Images from Raster Master to FreePascal
Nick's Hardware Youtube Channel edited this page Feb 20, 2021
·
6 revisions
Draw your Image. I have made a little truck for the example!
Click on the select tool and mark the area you want to include in your program.
From the File menu select Export->FreePascal Const
Save the file where your program is located - it will have a *.con extension.
I will call mine truck.con
In your Freepascal program include the truck.con. You can do a Control Kr
from the fp editor to insert the
code fragment to your program.
Here is the complete listing of the program that includes the truck.con that was generated by Raster Master Export option.
Program Demo4;
Uses Crt,Graph;
Const
(* FreePascal, Width= 21 Height= 13 Colors= 16 *)
truck : Array[1..558] of Byte = (
$15,$00,$00,$00,$0D,$00,$00,$00,$00,$00,$00,$00,
$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,
$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,
$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,
$00,$00,$00,$00,$00,$00,$00,$00,$0A,$00,$0A,$00,
$0A,$00,$0A,$00,$0A,$00,$0A,$00,$0A,$00,$0A,$00,
$0A,$00,$0A,$00,$0A,$00,$0A,$00,$0A,$00,$00,$00,
$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,
$00,$00,$0A,$00,$0A,$00,$02,$00,$02,$00,$02,$00,
$0A,$00,$02,$00,$02,$00,$02,$00,$0A,$00,$0A,$00,
$0A,$00,$0A,$00,$00,$00,$00,$00,$00,$00,$00,$00,
$00,$00,$00,$00,$00,$00,$00,$00,$0A,$00,$0A,$00,
$02,$00,$0A,$00,$0A,$00,$0A,$00,$02,$00,$0A,$00,
$02,$00,$0A,$00,$0A,$00,$0A,$00,$0A,$00,$00,$00,
$0A,$00,$0A,$00,$0A,$00,$0A,$00,$0A,$00,$00,$00,
$00,$00,$0A,$00,$0A,$00,$02,$00,$02,$00,$0A,$00,
$0A,$00,$02,$00,$02,$00,$02,$00,$0A,$00,$0A,$00,
$0A,$00,$0A,$00,$00,$00,$0A,$00,$00,$00,$00,$00,
$00,$00,$0A,$00,$00,$00,$00,$00,$0A,$00,$0A,$00,
$02,$00,$0A,$00,$0A,$00,$0A,$00,$02,$00,$0A,$00,
$0A,$00,$0A,$00,$0A,$00,$0A,$00,$0A,$00,$00,$00,
$0A,$00,$0A,$00,$00,$00,$00,$00,$0A,$00,$00,$00,
$00,$00,$0A,$00,$0A,$00,$0A,$00,$0A,$00,$0A,$00,
$0A,$00,$0A,$00,$0A,$00,$0A,$00,$0A,$00,$0A,$00,
$0A,$00,$0A,$00,$0A,$00,$0A,$00,$0A,$00,$0A,$00,
$0A,$00,$0A,$00,$00,$00,$00,$00,$0A,$00,$0A,$00,
$0A,$00,$0A,$00,$0A,$00,$0A,$00,$0A,$00,$0A,$00,
$0A,$00,$0A,$00,$0A,$00,$0A,$00,$0A,$00,$00,$00,
$0A,$00,$0A,$00,$0A,$00,$0A,$00,$0A,$00,$00,$00,
$00,$00,$00,$00,$0A,$00,$0A,$00,$0A,$00,$00,$00,
$00,$00,$00,$00,$00,$00,$00,$00,$0A,$00,$0A,$00,
$0A,$00,$00,$00,$00,$00,$0A,$00,$0A,$00,$0A,$00,
$0A,$00,$0A,$00,$00,$00,$00,$00,$00,$00,$00,$00,
$0F,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,
$00,$00,$00,$00,$0F,$00,$00,$00,$00,$00,$00,$00,
$00,$00,$00,$00,$0F,$00,$00,$00,$00,$00,$00,$00,
$00,$00,$00,$00,$0F,$00,$0F,$00,$0F,$00,$00,$00,
$00,$00,$00,$00,$00,$00,$00,$00,$0F,$00,$0F,$00,
$0F,$00,$00,$00,$00,$00,$00,$00,$0F,$00,$0F,$00,
$0F,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,
$0F,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,
$00,$00,$00,$00,$0F,$00,$00,$00,$00,$00,$00,$00,
$00,$00,$00,$00,$0F,$00,$00,$00,$00,$00,$00,$00,
$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,
$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,
$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,
$00,$00,$00,$00,$00,$00);
Var
Gd, Gm : Integer;
Begin
Gd:=EGA;
Gm:=EGALo;
InitGraph(Gd,Gm,'');
PutImage(0,0,truck,NormalPut);
Repeat Until KeyPressed;
CloseGraph;
end.