/*********************************************** * * file d:\cips\hour.c * * Functions: This file contains * main * draw_hour_glass * is_inside_the_image * * Purpose: * I use this program to create simple * patterns in images for illustrations. * * External Calls: * wtiff.c - create_allocate_tiff_file * write_array_into_tiff_image * * Modifications: * 14 February 1996 - created * ***********************************************/ #include "cips.h" short the_image[ROWS][COLS]; main(argc, argv) int argc; char *argv[]; { int i, ie, ii, il, j, jj, le, l, ll, size; struct tiff_header_struct image_header; if(argc != 3 ){ printf("\n usage: hour file-name size"); exit(-1); } size = atoi(argv[2]); image_header.lsb = 1; image_header.bits_per_pixel = 8; image_header.image_length = ROWS; image_header.image_width = COLS;; image_header.strip_offset = 1000; create_allocate_tiff_file(argv[1], &image_header, the_image); il = 1; ie = 1; ll = ROWS+1; le = COLS+1; /********************************************/ for(i=0; i= COLS || y < 0 || y >= ROWS) result = 0; return(result); } /* ends is_inside_the_image */