MCPcopy Create free account
hub / github.com/SpartanJ/eepp / drawPixelPerfectLineRectangle

Method drawPixelPerfectLineRectangle

src/eepp/graphics/primitives.cpp:574–586  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

572}
573
574void Primitives::drawPixelPerfectLineRectangle( const Rectf& rect ) {
575 auto fillMode = getFillMode();
576 auto lw = getLineWidth();
577 setFillMode( PrimitiveFillMode::DRAW_FILL );
578 drawRectangle( { rect.getPosition(), { lw, rect.getHeight() } } );
579 drawRectangle( { { rect.getPosition().x + lw, rect.getPosition().y },
580 { rect.getWidth() - lw, lw } } );
581 drawRectangle( { { rect.getPosition().x + lw, rect.getPosition().y + rect.getHeight() - lw },
582 { rect.getWidth() - lw, lw } } );
583 drawRectangle( { { rect.getPosition().x + rect.getWidth() - lw, rect.getPosition().y + lw },
584 { lw, rect.getHeight() - lw } } );
585 setFillMode( fillMode );
586}
587
588}} // namespace EE::Graphics

Callers 2

UTESTFunction · 0.80
UTESTFunction · 0.80

Calls 3

getPositionMethod · 0.45
getHeightMethod · 0.45
getWidthMethod · 0.45

Tested by 2

UTESTFunction · 0.64
UTESTFunction · 0.64