Hellow!
I need to draw widgets (including that have PhImage_t* resources) to memory context. Text, background, borders etc of any widget draw normal, but instead any image I get some trash. How solve this problem?
My code is:
PhPoint_t o = GetPositionRelativeToWin(widget);
PmMemoryContext_t *mc;
PhDrawContext_t *prevContext;
PtFlush();
mc = PmMemCreateMC(image, &image->size, &o);
prevContext = PmMemStart(mc);
PtDamageWidget(widget);
PtFlush();
PmMemStop(mc);
PmMemReleaseMC(mc);
PhDCSetCurrent(prevContext);