| 577 | } |
| 578 | |
| 579 | void line_width( canvas &that, float width, float height ) |
| 580 | { |
| 581 | that.set_color( stroke_style, 0.0f, 0.0f, 0.0f, 1.0f ); |
| 582 | that.set_line_width( 4.0f ); |
| 583 | for ( float step = 0.0f; step < 16.0f; step += 1.0f ) |
| 584 | { |
| 585 | float left = ( step + 0.25f ) / 16.0f * width; |
| 586 | float right = ( step + 0.75f ) / 16.0f * width; |
| 587 | that.begin_path(); |
| 588 | that.move_to( left, 0.0f ); |
| 589 | that.bezier_curve_to( left, 0.5f * height, |
| 590 | right, 0.5f * height, |
| 591 | right, height ); |
| 592 | that.set_line_width( 0.5f * ( step - 1 ) ); |
| 593 | that.stroke(); |
| 594 | } |
| 595 | that.set_color( fill_style, 1.0f, 1.0f, 1.0f, 1.0f ); |
| 596 | that.global_composite_operation = source_atop; |
| 597 | that.fill_rectangle( 0.0f, 0.5f * height, width, 0.5f * height ); |
| 598 | that.global_composite_operation = destination_over; |
| 599 | that.fill_rectangle( 0.0f, 0.25f * height, width, 0.25f * height ); |
| 600 | that.set_color( fill_style, 0.0f, 0.0f, 0.0f, 1.0f ); |
| 601 | that.fill_rectangle( 0.0f, 0.5f * height, width, 0.25f * height ); |
| 602 | } |
| 603 | |
| 604 | void line_width_angular( canvas &that, float width, float height ) |
| 605 | { |
nothing calls this directly
no test coverage detected