home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Frozen Fish 1: Amiga
/
FrozenFish-Apr94.iso
/
bbs
/
alib
/
d7xx
/
d724
/
donsgenies.lha
/
DonsGenies
/
DonsGenies.lha
/
Don'sGenies
/
ImportBitmap1to1.pprx
< prev
next >
Wrap
Text File
|
1992-07-16
|
1KB
|
56 lines
/* Import bitmap with a scale of 1:1, assuming a screen resolution of 75 dpi in hi-res.
Written by Don Cox July '92 */
signal on error
signal on syntax
address command
call ppm_AutoUpdate(0)
call SafeEndEdit.rexx()
oldunits = ppm_GetUnits()
call ppm_SetUnits(1)
box = ppm_ClickOnBox("Click on destination...")
if box=0 then
do
call ppm_Inform(1,"No box selected",)
call ppm_ClearStatus()
exit
end
gone = ppm_DeleteContents(box)
filespec = ppm_GetFileName("Select bitmap image file","","")
worked = ppm_ImportBM(box,filespec)
info = ppm_GetBoxInfo(box)
width = word(info,2)
height = word(info,3)
if width>400 then do
width = width/75 /* screen images at 75dpi for high res */
xscale = 1
end
else do
width = width/37.5
xscale = 2
end
if height>360 then do
height = height/75
yscale = 1
end
else do
height = height/37.5
yscale = 2
end
call ppm_SetBoxScale(box,xscale,yscale)
call ppm_SetBoxSize(box,width,height)
call ppm_SetUnits(oldunits)
call ppm_AutoUpdate(1)
exit