Correction du bug de l'affichage du premier point en pbp manuel
This commit is contained in:
@ -88,28 +88,7 @@ Point** affichageLogs(sfRenderWindow *const window, sfRenderTexture *renderTextu
|
||||
afficherPoint(renderTexture, tabPoint[i].posConv, &tabPointeursCercle[(*nbPointsAffiches)++], COULEUR_POINT);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
if(tabPoint[i].type != AGGLOMERAT)
|
||||
{
|
||||
if(i>0)
|
||||
{
|
||||
free(tabPointeursCercle[*nbPointsAffiches]);
|
||||
afficherPoint(renderTexture, tabPoint[i-1].posConv, &tabPointeursCercle[*nbPointsAffiches], COULEUR_POINT);
|
||||
}
|
||||
tmpPtsAffiches[i - nbPtsNonAffiches] = tabPoint + i;
|
||||
afficherPoint(renderTexture, tabPoint[i].posConv, &tabPointeursCercle[(*nbPointsAffiches)++], COULEUR_POINT_ACTUEL);
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
afficherAgglo(renderTexture, &agglos[numAgglo], &tabPointeursCercleAgglos[numAgglo], nbPointAgglosMin, carte, COULEUR_AGGLO);
|
||||
i += agglos[numAgglo].nbPts;
|
||||
nbPtsNonAffiches += agglos[numAgglo].nbPts;
|
||||
numAgglo++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
tmpPtsAffiches[i - nbPtsNonAffiches] = tabPoint + i;
|
||||
}
|
||||
@ -150,6 +129,7 @@ Point** affichageLogs(sfRenderWindow *const window, sfRenderTexture *renderTextu
|
||||
if(optimisation)
|
||||
{
|
||||
displayBackgroundSprite(window, renderSprite);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -229,6 +209,26 @@ Point** affichageLogs(sfRenderWindow *const window, sfRenderTexture *renderTextu
|
||||
|
||||
sfTexture_destroy(originalTexture);
|
||||
}
|
||||
if(mode == MODE_PBP_MANUAL || mode == MODE_PBP_AUTOMATIC)
|
||||
{
|
||||
if(tabPoint[i].type != AGGLOMERAT)
|
||||
{
|
||||
if(i>0)
|
||||
{
|
||||
free(tabPointeursCercle[*nbPointsAffiches]);
|
||||
afficherPoint(renderTexture, tabPoint[i-1].posConv, &tabPointeursCercle[*nbPointsAffiches], COULEUR_POINT);
|
||||
}
|
||||
tmpPtsAffiches[i - nbPtsNonAffiches] = tabPoint + i;
|
||||
afficherPoint(renderTexture, tabPoint[i].posConv, &tabPointeursCercle[(*nbPointsAffiches)++], COULEUR_POINT_ACTUEL);
|
||||
}
|
||||
else
|
||||
{
|
||||
afficherAgglo(renderTexture, &agglos[numAgglo], &tabPointeursCercleAgglos[numAgglo], nbPointAgglosMin, carte, COULEUR_AGGLO);
|
||||
i += agglos[numAgglo].nbPts;
|
||||
nbPtsNonAffiches += agglos[numAgglo].nbPts;
|
||||
numAgglo++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Pour le mode MODE_GLOBAL, une fois l'affichage terminé, on y rajoute les agglomérats
|
||||
|
@ -106,6 +106,10 @@
|
||||
* @brief Couleur utilisée par défaut pour afficher un agglomérat.*/
|
||||
#define COULEUR_AGGLO (sfColor){0, 0, 255, 128}
|
||||
|
||||
/** @def COULEUR_AGGLO_ACTUEL
|
||||
* @brief Couleur utilisée pour afficher le dernier agglo affiché en mode point par point.*/
|
||||
#define COULEUR_AGGLO_ACTUEL (sfColor){1, 215, 88, 128}
|
||||
|
||||
/** @def COULEUR_AGGLO_SUPPRIME
|
||||
* @brief Couleur utilisée pour afficher un agglomérat sélectionné pour être supprimé.*/
|
||||
#define COULEUR_AGGLO_SUPPRIME (sfColor){0, 0, 0, 128}
|
||||
|
Reference in New Issue
Block a user