• Home
  • Raw
  • Download

Lines Matching full:shape

17  *  genpng width height { shape }
18 * shape ::= color width shape x1 y1 x2 y2
28 * 'shape' is:
34 * Each shape is followed by four numbers, these are two points in the output
36 * line. The shape is filled if it is preceded by 'filled' (not valid for
38 * precede the shape.
42 * shape ::= color width shape x1 y1 x2 y2
48 * shape ::= circle|square|line
58 * precision image: Each shape from the last to the first is checked to see if
60 * color of the shape and the alpha is 1, if not the previous shape is checked.
63 * inside or outside each shape and 'close' points do not contribute to the
160 /* A function to determine if (x,y) is inside the shape.
166 * -1: the point is outside the shape by more than the filter width (2)
167 * 0: the point may be inside the shape
168 * +1: the point is inside the shape by more than the filter width
184 * We want the contribution of each shape to the sample corresponding to each
186 * dimensions, finding each point within the shape and assigning that a value
187 * '1' while leaving every point outside the shape with value '0' then
192 * 1) If the pixel coordinate is within the shape assume the sample has the
193 * shape color and is opaque, else assume there is no contribution from
194 * the shape.
200 * 2) If the shape is within a square of size 1x1 centered on the pixel assume
201 * that the shape obscures an amount of the pixel equal to its area within
216 * shape, unfortunately this means evaluating Si(x), the integral of sinc(x),
221 * 0 or 1, depending on whether the sub-pixel is within or outside the shape.
297 * which tells us whether a point is inside or outside the shape. First in alpha_calc()
303 return 0; /* all samples outside the shape */ in alpha_calc()
306 return 1; /* all samples inside the shape */ in alpha_calc()
341 /* These are the shape functions. */
669 fprintf(stderr, "genpng: %s: not a valid shape name\n", arg); in shape_of()
676 /* shape ::= color width shape x1 y1 x2 y2 */ in parse_arg()
704 /* Fill in the pixel by checking each shape (args[nargs]) for effects on in pixel()
825 fprintf(stderr, "genpng: usage: genpng [--8bit] width height {shape}\n" in main()
827 " containing the given shape or shapes. Shapes are defined:\n" in main()
829 " shape ::= color width shape x1 y1 x2 y2\n" in main()
833 " shape ::= circle|square|line\n" in main()
840 " to draw the shape or 'filled' to indicate that the shape should\n" in main()