## enlightenment-devel

 [E-devel] Clipping without color mul? From: Mikael Liljeroth - 2008-10-27 16:02:56 ```evas_object_clip_set(..): "the resulting color for the clipped object is RESULT = (OBJ * CLIP) / (255 * 255) per color element" First of all, I do not understand what this really means, if OBJ and CLIP are 8 bit values the RESULT would be between 0 and 1, so I assume that RESULT is some kind of factor of 255? My real problem is that I want to clip an Evas_Object without having its color multiplied, is this possible? I think it is a little bit strange that evas_object_clip_set would have anything to do with color manipulation in the first place. Are there any benefits of having the clipper affecting the color? /Mikael ```
 Re: [E-devel] Clipping without color mul? From: Gustavo Sverzut Barbieri - 2008-10-27 17:45:45 ```On Mon, Oct 27, 2008 at 2:02 PM, Mikael Liljeroth wrote: > evas_object_clip_set(..): > > "the resulting color for the clipped object is RESULT = (OBJ * CLIP) / (255 > * 255) per color element" > > First of all, I do not understand what this really means, if OBJ and CLIP > are 8 bit values the RESULT > would be between 0 and 1, so I assume that RESULT is some kind of factor of > 255? > My real problem is that I want to clip an Evas_Object without having its > color multiplied, is this possible? > I think it is a little bit strange that evas_object_clip_set would have > anything to do with color > manipulation in the first place. Are there any benefits of having the > clipper affecting the color? use white color. if you think in terms of relative color, white is 1.0, so color * 1.0 = color, of course this is optimized inside Evas and will have no extra overhead at all. clip + color modulation is used in many ways, the most common is to do "fade-in/out" effects, you just iterate the clipper's colors from 0 to 255 to fade in and 255 to 0 to fade out. -- Gustavo Sverzut Barbieri http://profusion.mobi embedded systems -------------------------------------- MSN: barbieri@... Skype: gsbarbieri Mobile: +55 (19) 9225-2202 ```