Commit 55aaa7cf authored by Ziirish's avatar Ziirish

fix a big when 'mask' alpha is smaller than the 'normal' background alpha

parent 908fa27d
......@@ -697,7 +697,7 @@ cid_set_render (cairo_t *pContext, gpointer *pData)
}
else
{
if (cid->runtime->dAnimationProgress < 1)
if (cid->runtime->dAnimationProgress < 1 && cid->runtime->dAnimationProgress > 0)
cairo_paint_with_alpha (cr, cid->runtime->dAnimationProgress);
else
cairo_paint (cr);
......@@ -715,56 +715,21 @@ cid_set_render (cairo_t *pContext, gpointer *pData)
cairo_translate (cr, (cid->config->iWidth - cid->config->iPlayPauseSize)/2, (cid->config->iHeight - cid->config->iPlayPauseSize)/2);
cairo_set_source_surface (cr, !musicData.playing ? cid->p_cPlay_big : cid->p_cPause_big, 0, 0);
/*
cairo_set_line_width(cr, 1);
cairo_move_to (cr, (cid->config->iWidth - cid->config->iPlayPauseSize)/2, (cid->config->iHeight - cid->config->iPlayPauseSize)/2);
cairo_rel_line_to (cr, cid->config->iPlayPauseSize, cid->config->iPlayPauseSize/2);
cairo_rel_line_to (cr, - cid->config->iPlayPauseSize, cid->config->iPlayPauseSize/2);
cairo_close_path (cr);
*/
if (cid->runtime->iCursorX < (cid->config->iWidth + cid->config->iPlayPauseSize)/2 &&
cid->runtime->iCursorX > (cid->config->iWidth - cid->config->iPlayPauseSize)/2 &&
cid->runtime->iCursorY < (cid->config->iHeight + cid->config->iPlayPauseSize)/2 &&
cid->runtime->iCursorY > (cid->config->iHeight - cid->config->iPlayPauseSize)/2) {
cairo_paint_with_alpha (cr, .5);
/*
cairo_set_source_rgba(cr, 0, 0, 0, .5);
cairo_stroke_preserve(cr);
cairo_set_source_rgba(cr, 1, 1, 1, .5);
cairo_fill(cr);
cairo_restore (cr);
*/
}
else
{
if (cid->runtime->dAnimationProgress < 1)
if (cid->runtime->dAnimationProgress < 1 && cid->runtime->dAnimationProgress > 0)
{
cairo_paint_with_alpha (cr, cid->runtime->dAnimationProgress);
/*
cairo_set_source_rgba(cr, 0, 0, 0, cid->runtime->dAnimationProgress);
cairo_stroke_preserve(cr);
cairo_set_source_rgba(cr, 1, 1, 1, cid->runtime->dAnimationProgress);
cairo_fill(cr);
cairo_restore (cr);
*/
}
else
{
/*
cairo_set_source_rgb(cr, 0, 0, 0);
cairo_stroke_preserve(cr);
cairo_set_source_rgb(cr, 1, 1, 1);
cairo_fill(cr);
cairo_restore (cr);
*/
cairo_paint (cr);
}
}
......@@ -787,7 +752,7 @@ cid_set_render (cairo_t *pContext, gpointer *pData)
}
else
{
if (cid->runtime->dAnimationProgress < 1)
if (cid->runtime->dAnimationProgress < 1 && cid->runtime->dAnimationProgress > 0)
cairo_paint_with_alpha (cr, cid->runtime->dAnimationProgress);
else
cairo_paint (cr);
......
......@@ -22,6 +22,7 @@ typedef struct _CidRuntime CidRuntime;
typedef struct _CidDefault CidDefault;
typedef struct _CidLabelDescription CidLabelDescription;
typedef struct _CidControlFunctionsList CidControlFunctionsList;
typedef struct _CidColorContainer CidColorContainer;
typedef struct _CidModule CidModule;
typedef struct _CidModuleInterface CidModuleInterface;
......@@ -114,6 +115,18 @@ typedef enum {
CID_RED
} SymbolColor;
/// Structure de couleurs
struct _CidColorContainer {
/// red
gdouble dRed;
/// green
gdouble dGreen;
/// blue
gdouble dBlue;
/// alpha;
gdouble dAlpha;
};
/// Fonctions de controle des lecteurs
struct _CidControlFunctionsList {
/// fonction 'play/pause'
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment