Rev 1673 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1673 | Rev 1709 | ||
---|---|---|---|
Line 73... | Line 73... | ||
73 | 73 | ||
74 | /** Draw PPM pixmap |
74 | /** Draw PPM pixmap |
75 | * |
75 | * |
76 | * @param data Pointer to PPM data |
76 | * @param data Pointer to PPM data |
77 | * @param datasz Maximum data size |
77 | * @param datasz Maximum data size |
78 | * @param x Coordinate of upper left corner |
78 | * @param sx Coordinate of upper left corner |
79 | * @param y Coordinate of upper left corner |
79 | * @param sy Coordinate of upper left corner |
80 | * @param maxwidth Maximum allowed width for picture |
80 | * @param maxwidth Maximum allowed width for picture |
81 | * @param maxheight Maximum allowed height for picture |
81 | * @param maxheight Maximum allowed height for picture |
82 | * @param putpixel Putpixel function used to print bitmap |
82 | * @param putpixel Putpixel function used to print bitmap |
83 | */ |
83 | */ |
84 | int ppm_draw(unsigned char *data, size_t datasz, unsigned int sx, |
84 | int ppm_draw(unsigned char *data, size_t datasz, unsigned int sx, |
85 | unsigned int sy, |
85 | unsigned int sy, |
86 | unsigned int maxwidth, unsigned int maxheight, |
86 | unsigned int maxwidth, unsigned int maxheight, |
87 | putpixel_cb_t putpixel,void *vport) |
87 | putpixel_cb_t putpixel, void *vport) |
88 | { |
88 | { |
89 | unsigned int width, height; |
89 | unsigned int width, height; |
90 | unsigned int maxcolor; |
90 | unsigned int maxcolor; |
91 | int i; |
91 | int i; |
92 | void *maxdatap = data + datasz; |
92 | void *maxdatap = data + datasz; |