[comp.sys.amiga] fast graphics

pawn@wpi.wpi.edu (Kevin Goroway) (02/10/89)

I have a View/ViewPort/RastPort (no intuition stuff as far as screens/windows)
and I want to put graphics on it quickly.  I tried DrawImage, which is an
Intuition Function, and that bombed, even though I had the Image structure
set up correctly, but I guess that's to be expected.  I would Use ClipBlit
but that coppies from one bitmap to another, which is no help if I can't
get the graphic onto a bitmap in the first place!  As of now the image is
stored as an intuition Image, should I change the format?  How would I go
about writing it directly into the bitmap? Should the DrawImage function 
work even though I'm not using intuition, but have a RastPort?
Thanks in advance!
I'm
Pawn@wpi.wpi.edu
Pawn@wpi.bitnet

jimm@amiga.UUCP (Jim Mackraz) (02/11/89)

In article <733@wpi.WPI.EDU> pawn@wpi.wpi.edu (Kevin Goroway) writes:
)I have a View/ViewPort/RastPort (no intuition stuff as far as screens/windows)
)and I want to put graphics on it quickly.  I tried DrawImage, which is an
)Intuition Function, and that bombed, even though I had the Image structure
)set up correctly, but I guess that's to be expected.  I would Use ClipBlit
)but that coppies from one bitmap to another, which is no help if I can't
)get the graphic onto a bitmap in the first place!  As of now the image is
)stored as an intuition Image, should I change the format?  How would I go
)about writing it directly into the bitmap? Should the DrawImage function 
)work even though I'm not using intuition, but have a RastPort?
)Thanks in advance!
)I'm
)Pawn@wpi.wpi.edu
)Pawn@wpi.bitnet

DrawImage() should work just fine with any old RastPort you have, so you've
got a problem to solve in any case.

It is faster to use BltBitMapRastPort().  It is very easy to set up a bitmap
to accompany an Image (set up a BitMap structure and point the Planes[] pointers
in the data offset by RASSIZE( im->Width, im->Height );

I often set up not only a bitmap for an Image, but also a RastPort for that
bitmap, so that I can initialize the Image with drawing commands, such as
AreaEllipse(), when I want to use rounded rect gadgets or something.

I'd say the first thing, though is to get your DrawImage() working.  Make
sure you're pointing at somewhere legal.  Try sending it to a good old
Window RastPort first: that will clip (maybe not crash) and not be vulnerable
to any mistakes you might have made setting up your rastport.

Good lucks.  (Also, you might try Text() to your rastport, to see if the easy
stuff works ....).
	jimm

-- 
Jim Mackraz, I and I Computing	   	"Like you said when we crawled down
{cbmvax,well,oliveb}!amiga!jimm          from the trees: We're in transition."
							- Gang of Four
Opinions are my own.  Comments are not to be taken as Commodore official policy.