Hi community! I want to use the DisplayPipeline.DrawSprite() Method to draw a Bitmap onto only one of my RhinoViewport.
I’ve read this post: Rhino - Display Conduits (rhino3d.com). It indeed provides some pretty useful code snippet, and I successfully use the code to draw a Bitmap on to all the RhinoViewports.
I find that the Conduit Class doesn’t have any API for me to draw onto only one viewport.
So here is the code snippet that I tried to draw the Bitmap onto only one of my RhinoViewport, but it doesn’t work well:
RhinoView myRhinoView;
Bitmap bmp;
bool run;
if(run)
{
DisplayPipeline ppl = myRhinoView.DisplayPipeline;
DisplayBitmap d_bmp = new DisplayBitmap(bmp);
int width = myRhinoView.MainViewport.Bounds.Width;
int height = myRhinoView.MainViewport.Bounds.Height;
ppl.DrawSprite(d_bmp, new Point2d(width/2, height/2), width, height);
myRhinoView.Redraw();
}