Logo Search packages:      
Sourcecode: cairo-dock version File versions

void cairo_dock_add_reflection_to_icon ( cairo_t *  pIconContext,
Icon *  pIcon,
CairoContainer *  pContainer 
)

Cree les surfaces de reflection d'une icone.

Parameters:
pIconContext le contexte de dessin lie a la surface de l'icone; est modifie par la fonction.
pIcon l'icone.
pContainer le container de l'icone.

Definition at line 113 of file cairo-dock-applet-facility.c.

{
      g_return_if_fail (pIcon != NULL && pContainer!= NULL);
      if (pIcon->pReflectionBuffer != NULL)
      {
            cairo_surface_destroy (pIcon->pReflectionBuffer);
            pIcon->pReflectionBuffer = NULL;
      }
      
      double fMaxScale = (CAIRO_DOCK_IS_DOCK (pContainer) ? (1 + g_fAmplitude) / CAIRO_DOCK (pContainer)->fRatio : 1);
      gboolean bIsHorizontal = pContainer->bIsHorizontal;
      pIcon->pReflectionBuffer = cairo_dock_create_reflection_surface (pIcon->pIconBuffer,
            pIconContext,
            (bIsHorizontal ? pIcon->fWidth : pIcon->fHeight) * fMaxScale,
            (bIsHorizontal ? pIcon->fHeight : pIcon->fWidth) * fMaxScale,
            bIsHorizontal,
            fMaxScale,
            pContainer->bDirectionUp);

      if (pIcon->pFullIconBuffer != NULL)
      {
            cairo_surface_destroy (pIcon->pFullIconBuffer);
            pIcon->pFullIconBuffer = NULL;
      }
      pIcon->pFullIconBuffer = cairo_dock_create_icon_surface_with_reflection (pIcon->pIconBuffer,
            pIcon->pReflectionBuffer,
            pIconContext,
            (bIsHorizontal ? pIcon->fWidth : pIcon->fHeight) * fMaxScale,
            (bIsHorizontal ? pIcon->fHeight : pIcon->fWidth) * fMaxScale,
            bIsHorizontal,
            fMaxScale,
            pContainer->bDirectionUp);
}


Generated by  Doxygen 1.6.0   Back to index