source: trunk/src/astrometry/render/render_solid.c @ 8905

Revision 8905, 1.4 KB checked in by dstn, 2 years ago (diff)

test out -fstrict-aliasing and fix some mman.h-before-sys/types.h bugs

Line 
1/*
2   This file is part of the Astrometry.net suite.
3   Copyright 2007 Keir Mierle and Dustin Lang.
4
5   The Astrometry.net suite is free software; you can redistribute
6   it and/or modify it under the terms of the GNU General Public License
7   as published by the Free Software Foundation, version 2.
8
9   The Astrometry.net suite is distributed in the hope that it will be
10   useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
11   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12   General Public License for more details.
13
14   You should have received a copy of the GNU General Public License
15   along with the Astrometry.net suite ; if not, write to the Free Software
16   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
17*/
18#include <stdio.h>
19#include <math.h>
20#include <stdarg.h>
21
22#include "tilerender.h"
23#include "render_solid.h"
24
25static void logmsg(char* format, ...) {
26    va_list args;
27    va_start(args, format);
28    fprintf(stderr, "render_solid: ");
29    vfprintf(stderr, format, args);
30    va_end(args);
31}
32
33int render_solid(unsigned char* img, render_args_t* args) {
34    int i, j;
35
36    logmsg("render_solid: filling with RGBA=(0,0,0,255)\n");
37
38    for (j=0; j<args->H; j++) {
39        for (i=0; i<args->W; i++) {
40            uchar* pix = pixel(i, j, img, args);
41            pix[0] = 0;
42            pix[1] = 0;
43            pix[2] = 0;
44            pix[3] = 255;
45        }
46    }
47    return 0;
48}
49
Note: See TracBrowser for help on using the repository browser.