/* * First, clear the area of the line to the background color for the text * widget. */ display = Tk_Display(textPtr->tkwin); Tk_Fill3DRectangle(textPtr->tkwin, pixmap, textPtr->border, 0, 0, Tk_Width(textPtr->tkwin), dlPtr->height, 0, TK_RELIEF_FLAT);Every routine from this point on simply draws on top of that pixmap with the background colour already in place.So, what if we were to insert some extra code in here to allow arbitrary drawing on the 'pixmap' first? We could imagine any of:
- Allow an image to be specified which will then be tiled onto 'pixmap'
- Allow a canvas to be specified which will again be tiled onto 'pixmap'
tonytraductor I haven't the slightest idea how to implement that, but, I was looking for something similar just the other day. Actually, I was hoping to be able to alter the alpha/transparency of a text widget, then lay the text widget over an image viewer, for the purposes of making ascii art. If the bg of a text widget could be set to an image, that would produce a similar effect.