| 1535 | } |
| 1536 | |
| 1537 | void clear_rectangle( canvas &that, float width, float height ) |
| 1538 | { |
| 1539 | that.set_color( stroke_style, 1.0f, 1.0f, 1.0f, 1.0f ); |
| 1540 | that.set_color( fill_style, 0.4f, 0.05f, 0.2f, 1.0f ); |
| 1541 | that.move_to( 0.0f, 0.0f ); |
| 1542 | that.line_to( width, 0.0f ); |
| 1543 | that.line_to( width, height ); |
| 1544 | that.line_to( 0.0f, height ); |
| 1545 | that.fill(); |
| 1546 | that.rotate( 0.2f ); |
| 1547 | that.begin_path(); |
| 1548 | that.move_to( 0.2f * width, 0.2f * height ); |
| 1549 | that.line_to( 0.8f * width, 0.2f * height ); |
| 1550 | that.line_to( 0.8f * width, 0.8f * height ); |
| 1551 | that.shadow_offset_x = 5.0f; |
| 1552 | that.set_shadow_color( 0.0f, 0.0f, 0.0f, 1.0f ); |
| 1553 | that.global_composite_operation = destination_atop; |
| 1554 | that.set_global_alpha( 0.5f ); |
| 1555 | for ( float y = -1.0f; y <= 1.0f; y += 1.0f ) |
| 1556 | for ( float x = -1.0f; x <= 1.0f; x += 1.0f ) |
| 1557 | that.clear_rectangle( ( 0.5f + 0.05f * x ) * width, |
| 1558 | ( 0.5f + 0.05f * y ) * height, |
| 1559 | x * 0.2f * width, y * 0.2f * height ); |
| 1560 | that.set_global_alpha( 1.0f ); |
| 1561 | that.global_composite_operation = source_over; |
| 1562 | that.set_shadow_color( 0.0f, 0.0f, 0.0f, 0.0f ); |
| 1563 | that.line_to( 0.2f * width, 0.8f * height ); |
| 1564 | that.close_path(); |
| 1565 | that.stroke(); |
| 1566 | } |
| 1567 | |
| 1568 | void fill_rectangle( canvas &that, float width, float height ) |
| 1569 | { |
nothing calls this directly
no test coverage detected