🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.x
Article #36580

Re: XView and image display

#36580
From: Heather Rose
Date: Fri, 09 Feb 1990 00:23
33 lines
1420 bytes
In article <1990Feb6.202148.14508@elroy.jpl.nasa.gov> alan@judy.Jpl.Nasa.Gov (Alan S. Mazer) writes:
>Has anyone out there successfully displayed an image in OpenWindows without
>using pw_ calls?  I can't find any examples that do this and everything I've
>tried simply core dumps.  If you have, would you PLEASE send (or post) sample
>code?  Thanks.

Just use XPutImage(display, xid, gc, image, src_x, src_y, dst_x, dst_y,
	width, height);

i.e.

    canvas = xv_create(frame, CANVAS,
        CANVAS_REPAINT_PROC,    canvas_repaint,
        CANVAS_X_PAINT_WINDOW,  TRUE,
...

canvas_repaint(canvas, pw, display, xid, xrects)
Canvas          canvas;
Xv_Window       pw;
Display         *display;
Window          xid;
Xv_xrectlist    *xrects;
{

...

    XPutImage(display, xid, gc, image,
        0, 0, x, y, w, h);
...

Regards,

Heather
Technical Details
Message-ID: <131499@sun.Eng.Sun.COM>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!mailrus!tut.cis.ohio-state.edu!snorkelwacker!apple!sun-barr!newstop!sun!kimba!hvr
References: <1990Feb6.202148.14508@elroy.jpl.nasa.gov>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!mailrus!tut.cis.ohio-state.edu!snorkelwacker!apple!sun-barr!newstop!sun!kimba!hvr
From: hvr@kimba.Sun.COM (Heather Rose)
Newsgroups: comp.windows.x
Subject: Re: XView and image display
Keywords: XView, Sun
Message-ID: <131499@sun.Eng.Sun.COM>
Date: 9 Feb 90 00:23:38 GMT
References: <1990Feb6.202148.14508@elroy.jpl.nasa.gov>
Sender: news@sun.Eng.Sun.COM
Reply-To: hvr@sun.UUCP (Heather Rose)
Distribution: na
Organization: Sun Microsystems, Mountain View
Lines: 33