- renderbuf_internal*i = (renderbuf_internal)dest->internal;
-
- SHAPELINE*line = shape->lines;
- int x=0,y=0;
-
- while(line)
- {
- if(line->type == moveTo) {
- /* max 31 bits + sign */
- x = line->x;
- y = line->y;
- } else if(line->type == lineTo) {
- /* max 17 bits + sign */
- int diffx = line->x - x;
- int diffy = line->y - y;
- int stepx,posx=0,posy=0;
- if(diffy<0) {
- x = line->x;
- y = line->y;
- diffx = -diffx;
- diffy = -diffy;
- }
- stepx = (diffx*0x1000) / diffy;
-
- while(posy<diffy) {
- int xx = x + ((posx)/0x1000);
- int yy = posy;
- // TODO: add pixel to dest
- posx+=stepx;
- posy++;
- }
-
- x = line->x;
- y = line->y;
- } else if(line->type == splineTo) {
- }
-
- line = line->next;
+ printf("\n");
+ printf("Usage: %s file.swf [-o output.png]\n", name);
+ printf("\n");
+ printf("-h , --help Print short help message and exit\n");
+ printf("-o , --output Output file (default: output.png)\n");
+ printf("\n");
+}
+int args_callback_command(char*name,char*val)
+{
+ if(filename) {
+ fprintf(stderr, "Only one file allowed. You supplied at least two. (%s and %s)\n",
+ filename, name);