/* XXX ToDo: intead of iterating pixel-by-pixel, use a look-up table.
*/
for (i = 0; i < length; i++) {
- int result = stipple_test( stipple->counter+i,
- stipple->pattern, stipple->factor );
+ int result = stipple_test( (int) stipple->counter+i,
+ (ushort) stipple->pattern, stipple->factor );
if (result != state) {
/* changing from "off" to "on" or vice versa */
if (state) {
}
else {
/* starting an "on" segment */
- start = i;
+ start = (float) i;
}
state = result;
}
}
+static void
+stipple_destroy( struct draw_stage *stage )
+{
+ FREE( stage );
+}
+
+
/**
* Create line stippler stage
*/
stipple->stage.tri = passthrough_tri;
stipple->stage.reset_stipple_counter = reset_stipple_counter;
stipple->stage.end = stipple_end;
+ stipple->stage.destroy = stipple_destroy;
return &stipple->stage;
}