correção da impressão por nivel

parent 83f0ea91
......@@ -261,15 +261,18 @@ void cutRange(quadtree* qt) {
}
void printarCompacto(quadtree* qt, SDL_Surface* img, SDL_Renderer *renderer, int &pixels) {
pixels++;
if (qt->nivel == nivelCompacto ) {
pixels++;
SDL_SetRenderDrawColor(renderer, qt->r, qt->g, qt->b, 0);
for (int i = qt->x1; i < (qt->x2 + qt->x1); i++) {
for (int j = qt->y1; j < (qt->y2 + qt->y1); j++) {
SDL_RenderDrawPoint(renderer, i, j);
}
if (qt->x2 > 0) {
SDL_Rect rect;
rect.x = qt->x1; rect.y = qt->y1;
rect.w = qt->x2 ; rect.h = qt->y2;
SDL_RenderFillRect(renderer,&rect);
}
else
SDL_RenderDrawPoint(renderer, qt->x, qt->y);
}
else {
......
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