MCPcopy Create free account
hub / github.com/a-e-k/canvas_ity / stroke_rectangle

Function stroke_rectangle

test/test.cpp:1586–1602  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1584}
1585
1586void stroke_rectangle( canvas &that, float width, float height )
1587{
1588 that.set_color( stroke_style, 0.0f, 0.0f, 0.0f, 1.0f );
1589 that.rotate( 0.2f );
1590 that.begin_path();
1591 that.move_to( 0.2f * width, 0.2f * height );
1592 that.line_to( 0.8f * width, 0.2f * height );
1593 that.line_to( 0.8f * width, 0.8f * height );
1594 for ( float y = -1.0f; y <= 1.0f; y += 1.0f )
1595 for ( float x = -1.0f; x <= 1.0f; x += 1.0f )
1596 that.stroke_rectangle( ( 0.5f + 0.05f * x ) * width,
1597 ( 0.5f + 0.05f * y ) * height,
1598 x * 0.2f * width, y * 0.2f * height );
1599 that.line_to( 0.2f * width, 0.8f * height );
1600 that.close_path();
1601 that.stroke();
1602}
1603
1604void text_align( canvas &that, float width, float height )
1605{

Callers

nothing calls this directly

Calls 8

set_colorMethod · 0.80
rotateMethod · 0.80
begin_pathMethod · 0.80
move_toMethod · 0.80
line_toMethod · 0.80
stroke_rectangleMethod · 0.80
close_pathMethod · 0.80
strokeMethod · 0.80

Tested by

no test coverage detected