[comp.windows.interviews] Making a Bitmap from a Graphic

gss@edsdrd.eds.com (Gary Schiltz) (05/07/91)

I'm using InterViews 2.6 on an application in which I'm "dragging"
arbitrary Graphic instances around within a parent Picture, which
is the graphic of a GraphicBlock.  I use a Rubband or one of its
subclasses for visual feedback in places where performance is too
slow to animate the movement of the dragged graphic.  In the special
case where the graphic is a Stencil, visual feedback is provided by
changing the cursor of the graphic block to the Bitmap and mask used 
to create the Stencil.  In other cases, feedback is provided by 
repeatedly incurring damage on the graphic, translating it and 
repairing the damage.

I would like to be able to drag the graphics between graphic blocks.
This will work fine for the Stencil case, as I could set the cursor
of the World using the bitmap of the dragged graphic.  For the other
cases (Rubband and animation by translation/redraw), I would lose the 
visual feedback when I leave the area above the graphic block.  

It seems that what I need is some way to create a bitmap from a 
graphic, so I could use the bitmap to create a cursor.  Has anyone
done this?  Or, does anyone have any other ideas how to create a
cursor from an arbitrary graphic?  I'm most interested in the case
of dragging a Label from one graphic block to another, but would
be interested in seeing a more general purpose solution.

Many thanks in advance,

----

Gary Schiltz
EDS Research and Development
3551 Hamlin Rd., 4th Floor
Auburn Hills, MI  48326
(313) 370-1737
gss@edsdrd.eds.com

gss@edsdrd.eds.com (Gary Schiltz) (05/16/91)

******************************************************************
I posted the following a week ago, but it apparently never went
out, as our news feed has been down.  My apologies if you've seen
it before.
******************************************************************

I'm using InterViews 2.6 on an application in which I'm "dragging"
arbitrary Graphic instances around within a parent Picture, which
is the graphic of a GraphicBlock.  In some cases, feedback is provided 
by repeatedly incurring damage on the graphic, translating it and 
repairing the damage.  I use a Rubband or one of its subclasses for 
visual feedback in places where performance is too slow to animate 
movement in this way.  In the special case where the graphic is a 
Stencil, visual feedback is provided by changing the cursor of the 
graphic block to the Bitmap and mask used to create the Stencil.  

I would like to be able to drag graphics between graphic blocks.
This will work for the Stencil case, as I can set the cursor of 
the World using the bitmap of the dragged graphic, so the visual 
feedback continues between the grahic blocks.  For the other cases 
(Rubband and animation by repeated translation), I would lose the 
visual feedback when I leave the area above the graphic block.  

It seems that what I need is some way to create a bitmap from a 
graphic, so I could use the bitmap to create a cursor.  Has anyone
done this?  Or, does anyone have any other ideas how to create a
cursor from an arbitrary graphic?  I'm most interested in the case
of dragging a Label from one graphic block to another, but would
be interested in seeing a more general purpose solution.

Many thanks in advance,

----

Gary Schiltz
EDS Research and Development
3551 Hamlin Rd., 4th Floor
Auburn Hills, MI  48326
(313) 370-1737
gss@edsdrd.eds.com