src/hbcore/ovgeffects/hbvgoutlineeffect.cpp
changeset 7 923ff622b8b9
parent 5 627c4a0fd0e7
child 21 4633027730f5
equal deleted inserted replaced
6:c3690ec91ef8 7:923ff622b8b9
   152     Q_D(HbVgOutlineEffect);
   152     Q_D(HbVgOutlineEffect);
   153     VGImage srcImage = vgImage.value<VGImage>();
   153     VGImage srcImage = vgImage.value<VGImage>();
   154     VGImage dstImage = d->ensurePixmap(&d->dstPixmap, vgImageSize);
   154     VGImage dstImage = d->ensurePixmap(&d->dstPixmap, vgImageSize);
   155 
   155 
   156     if (d->paramsChanged) {
   156     if (d->paramsChanged) {
   157         VGubyte stpc = (VGubyte) clamp(d->steepness, 0.0f, 32.0f);
   157         VGubyte stpc = (VGubyte) clamp(d->steepness, 0.0f, 255.0f);
   158         VGubyte unnormalisedOpacity = (VGubyte)(clamp(d->opacity, 0.0f, 1.0f) * 255.0f);
   158         VGubyte unnormalisedOpacity = (VGubyte)(clamp(d->opacity, 0.0f, 1.0f) * 255.0f);
   159         for (int i = 0; i < 256; ++i) {
   159         for (int i = 0; i < 256; ++i) {
   160             VGubyte alpha = (i * stpc > unnormalisedOpacity) ? unnormalisedOpacity : i * stpc;
   160             VGubyte alpha = (i * stpc > unnormalisedOpacity) ? unnormalisedOpacity : i * stpc;
   161             d->lut[i] = 0x00000000
   161             d->lut[i] = 0x00000000
   162                         | (d->color.red() << 24)
   162                         | (d->color.red() << 24)