baker@wbc.enet.dec.com (04/04/91)
I'm trying to create off-screen bitmaps (not associated with any particular window) into which I can draw or copy, and from which I can copy to a window's bitmap. I have the further constraint that I want clipping to be enforced on all drawing/copying operations into the bitmap. Bascally, I'm trying to imitate an X-11 Pixmap drawable. What I do: 1) malloc space for a BitMap 2) call InitBitmap 3) AllocRaster each of the bitplanes and store their addresses in the BitMap Planes array. 4) Get a Layer_Info from NewLayerInfo() 5) CreateUpfrontLayer using the Layer_Info and the BitMap (the Layer covers the entire BitMap). Layer-type is LAYERSIMPLE. 6) InstallClipRect around the boundaries of the BitMap (this step is probably superfluous). 7) Grab the RastPort pointer from the Layer and stash it someplace. 8) Set draw mode to JAM1, Mask to #FF, FgPen to some color. Okay. Now, if I draw into the RastPort from step (7), the bits in my pixmap get set; using ReadPixel, I was able to probe a few places and check. But, when I try to use ClipBlit to copy stuff into the pixmap using a window's RastPort as the source, or when I try to copy from the pixmap's RastPort into a window's RastPort -- nothing happens. I've successfully used ClipBlit to copy from window to window, but I can't seem to get it to copy using the pixmap. (BTW, my minTerm arg is C0 -- vanilla copy). Any thoughts, suggestions ? Thanks, ********************************************************* * Art Baker | "Whatever happened * * baker@wbc.enet.dec.com | to Fay Wray..." * * PLINK: A*BAKER | * *********************************************************
baker@wbc.enet.dec.com (04/05/91)
If there's anyone still pondering my difficulties with ClipBlit's to off-screen bitmaps, you can stop. The problem was mine -- I was trying to do some very, very non-Euclidian things in a Cartesian coordinate system. (sigh) Regards, ********************************************************* * Art Baker | "Whatever happened * * baker@wbc.enet.dec.com | to Fay Wray..." * * PLINK: A*BAKER | * *********************************************************