Anthony.Worrall@reading.ac.uk (Anthony Worrall) writes:
> I have some C code linked into pop11 which uses XDrawLine.
> I want to get this code to draw on the XpwGraphic Widget in the rc_window.
> It draws the lines in the corrct place but does not use the colour as set by
> XpwSetColor. Also my lines do not get redisplayed.
> Can any one suggest what I am doing wrong or how to use the XpwDrawline
> method from C.
>
> I am passing the Drawable and GC values as
>
> XtWindow(rc_window),
> XptValue(rc_window,XtN privateGC, TYPESPEC(:XptGC))
To fix the colour problem you may want to try:
XptValue(rc_window,XtN usersGC, TYPESPEC(:XptGC))
^^^^^
Your lines aren't being redisplayed because they weren't being drawn
on the backing pixmap used for refreshing. XpwDrawline does that
automatically (but it can be switched by a flag).
To call XpwDrawline from C see REF * XpwCallMethod.
Ian.
|