rem: W_Screen	*scr = WMWidgetScreen(panel->win); RColor		from; RColor		to; RHSVColor	hsvcolor; RImage		*sliderImg; WMPixmap	*sliderPxmp;  hsvcolor = panel->hsvcolor; hsvcolor.saturation = 0; RHSVtoRGB(&hsvcolor, &from);  hsvcolor.saturation = 255; RHSVtoRGB(&hsvcolor, &to);  sliderImg = RRenderGradient(141, 16, &from, &to, RGRD_HORIZONTAL); sliderPxmp = WMCreatePixmapFromRImage(scr, sliderImg, 0); RDestroyImage(sliderImg); if (hsvcolor.value < 128) W_PaintText(W_VIEW(panel->hsbSaturationS), sliderPxmp->pixmap, WMSystemFontOfSize(scr, 12), 2, 0, 100, WALeft, W_GC(scr->white), False, "Saturation", strlen("Saturation")); else W_PaintText(W_VIEW(panel->hsbSaturationS), sliderPxmp->pixmap, WMSystemFontOfSize(scr, 12), 2, 0, 100, WALeft, W_GC(scr->black), False, "Saturation", strlen("Saturation"));  WMSetSliderImage(panel->hsbSaturationS, sliderPxmp); WMReleasePixmap(sliderPxmp);
add: W_Screen    *scr = WMWidgetScreen(panel->win); RColor        from; RColor        to; RHSVColor    hsvcolor; RImage        *sliderImg; WMPixmap    *sliderPxmp;  hsvcolor = panel->hsvcolor; hsvcolor.saturation = 0; RHSVtoRGB(&hsvcolor, &from);  hsvcolor.saturation = 255; RHSVtoRGB(&hsvcolor, &to);  sliderImg = RRenderGradient(141, 16, &from, &to, RGRD_HORIZONTAL); sliderPxmp = WMCreatePixmapFromRImage(scr, sliderImg, 0); RDestroyImage(sliderImg); if (hsvcolor.value < 128) W_PaintText(W_VIEW(panel->hsbSaturationS), sliderPxmp->pixmap, panel->font12, 2, 0, 100, WALeft, W_GC(scr->white), False, "Saturation", strlen("Saturation")); else W_PaintText(W_VIEW(panel->hsbSaturationS), sliderPxmp->pixmap, panel->font12, 2, 0, 100, WALeft, W_GC(scr->black), False, "Saturation", strlen("Saturation"));  WMSetSliderImage(panel->hsbSaturationS, sliderPxmp); WMReleasePixmap(sliderPxmp);
context: hsbUpdateSaturationGradient(W_ColorPanel *panel){	W_Screen	*scr = WMWidgetScreen(panel->win);	RColor		from;	RColor		to;	RHSVColor	hsvcolor;	RImage		*sliderImg;	WMPixmap	*sliderPxmp;		hsvcolor = panel->hsvcolor;	hsvcolor.saturation = 0;	RHSVtoRGB(&hsvcolor, &from);		hsvcolor.saturation = 255;	RHSVtoRGB(&hsvcolor, &to);		sliderImg = RRenderGradient(141, 16, &from, &to, RGRD_HORIZONTAL);	sliderPxmp = WMCreatePixmapFromRImage(scr, sliderImg, 0);	RDestroyImage(sliderImg);	if (hsvcolor.value < 128)		W_PaintText(W_VIEW(panel->hsbSaturationS), sliderPxmp->pixmap, WMSystemFontOfSize(scr, 12), 2, 0, 100, WALeft, W_GC(scr->white), False, "Saturation", strlen("Saturation"));	else		W_PaintText(W_VIEW(panel->hsbSaturationS), sliderPxmp->pixmap, WMSystemFontOfSize(scr, 12), 2, 0, 100, WALeft, W_GC(scr->black), False, "Saturation", strlen("Saturation"));	WMSetSliderImage(panel->hsbSaturationS, sliderPxmp);	WMReleasePixmap(sliderPxmp);}