36
36
extern double my_fRainbowColor[4];
37
37
extern double my_fRainbowLineColor[4];
39
void cd_rendering_calculate_max_dock_size_rainbow (CairoDock *pDock)
39
static double *pCosSinTab = NULL;
40
static GLfloat *pVertexTab = NULL;
41
static GLfloat* pColorTab = NULL;
43
static void cd_rendering_calculate_max_dock_size_rainbow (CairoDock *pDock)
41
45
pDock->fMagnitudeMax = my_fRainbowMagnitude;
42
46
pDock->pFirstDrawnElement = cairo_dock_calculate_icons_positions_at_rest_linear (pDock->icons, pDock->fFlatDockWidth, pDock->iScrollOffset);
64
void cd_rendering_render_rainbow (cairo_t *pCairoContext, CairoDock *pDock)
68
static void cd_rendering_render_rainbow (cairo_t *pCairoContext, CairoDock *pDock)
66
70
//g_print ("pDock->fFoldingFactor : %.2f\n", pDock->fFoldingFactor);
67
71
double fMaxScale = 1. + my_fRainbowMagnitude * g_fAmplitude;
414
418
Icon *pFirstIcon = pFirstDrawnElement->data;
416
420
int iNbRow = -1, iNbIconsOnRow = 0, iNbInsertedIcons = 0;
417
double fCurrentRadius=0, fNormalRadius=0, fCurrentTheta, fThetaStart, fDeltaTheta, fCurrentScale;
421
double fCurrentRadius=0, fNormalRadius=0, fCurrentTheta, fThetaStart=0, fDeltaTheta=0, fCurrentScale=1;
538
542
return pTabValues;
541
static double *pCosSinTab = NULL;
542
static GLfloat *pVertexTab = NULL;
543
static GLfloat* pColorTab = NULL;
544
void cd_rendering_reload_rainbow_buffers (void)
552
void cd_rendering_render_rainbow_opengl (CairoDock *pDock)
545
static void cd_rendering_render_rainbow_opengl (CairoDock *pDock)
554
547
static double fDelta = 1.;
555
548
if (pCosSinTab == NULL)
622
615
_generate_sector_path (my_fRainbowConeOffset,
623
616
fRadius + .5 * pDock->iMaxIconHeight * fMaxScale,
624
617
fRadius - my_iSpaceBetweenRows/2,
626
618
fDelta/180.*G_PI, pCosSinTab, pVertexTab);
628
620
glVertexPointer(3, GL_FLOAT, 0, pVertexTab);
681
673
my_fRainbowLineColor[0], my_fRainbowLineColor[1], my_fRainbowLineColor[2], 0.};
682
674
glEnableClientState(GL_COLOR_ARRAY);
683
675
glColorPointer(4, GL_FLOAT, 0, color);
684
glVertexPointer(3, GL_FLOAT, 0, pVertexTab);
676
glVertexPointer(2, GL_FLOAT, 0, pVertexTab);
686
pVertexTab[3*0+0] = - (fRadius + .5 * pDock->iMaxIconHeight * fMaxScale + my_iSpaceBetweenRows/2) * pCosSinTab[2*0];
687
pVertexTab[3*0+1] = (fRadius + .5 * pDock->iMaxIconHeight * fMaxScale + my_iSpaceBetweenRows/2) * pCosSinTab[2*0+1];
688
pVertexTab[3*1+0] = - fRadius * cos (my_fRainbowConeOffset);
689
pVertexTab[3*1+1] = fRadius * sin (my_fRainbowConeOffset);
690
pVertexTab[3*2+0] = 0.;
691
pVertexTab[3*2+1] = 0.;
692
pVertexTab[3*3+0] = - pVertexTab[3*1+0];
693
pVertexTab[3*3+1] = pVertexTab[3*1+1];
694
pVertexTab[3*4+0] = - pVertexTab[3*0+0];
695
pVertexTab[3*4+1] = pVertexTab[3*0+1];
678
pVertexTab[2*0+0] = - (fRadius + .5 * pDock->iMaxIconHeight * fMaxScale + my_iSpaceBetweenRows/2) * pCosSinTab[2*0];
679
pVertexTab[2*0+1] = (fRadius + .5 * pDock->iMaxIconHeight * fMaxScale + my_iSpaceBetweenRows/2) * pCosSinTab[2*0+1];
680
pVertexTab[2*1+0] = - fRadius * cos (my_fRainbowConeOffset);
681
pVertexTab[2*1+1] = fRadius * sin (my_fRainbowConeOffset);
682
pVertexTab[2*2+0] = 0.;
683
pVertexTab[2*2+1] = 0.;
684
pVertexTab[2*3+0] = - pVertexTab[2*1+0];
685
pVertexTab[2*3+1] = pVertexTab[2*1+1];
686
pVertexTab[2*4+0] = - pVertexTab[2*0+0];
687
pVertexTab[2*4+1] = pVertexTab[2*0+1];
697
689
cairo_dock_draw_current_path_opengl (myBackground.iDockLineWidth, my_fRainbowLineColor, 5);