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

Function repeatYdraw

src/eepp/ui/uinodedrawable.cpp:308–323  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

306}
307
308static void repeatYdraw( Drawable* drawable, const Vector2f& position, const Vector2f& offset,
309 const Sizef& size, const Sizef& drawableSize ) {
310 if ( drawableSize.getHeight() > 0 ) {
311 Float startY = position.y + offset.y - drawableSize.getHeight();
312 while ( startY > position.y - drawableSize.getHeight() ) {
313 drawable->draw( Vector2f( position.x + offset.x, startY ), drawableSize );
314 startY -= drawableSize.getHeight();
315 };
316 drawable->draw( position + offset, drawableSize );
317 startY = position.y + offset.y + drawableSize.getHeight();
318 while ( startY < position.y + size.getHeight() ) {
319 drawable->draw( Vector2f( position.x + offset.x, startY ), drawableSize );
320 startY += drawableSize.getHeight();
321 };
322 }
323}
324
325void UINodeDrawable::LayerDrawable::draw( const Vector2f& position, const Sizef& size ) {
326 if ( position != mPosition ) {

Callers 1

drawMethod · 0.85

Calls 2

getHeightMethod · 0.45
drawMethod · 0.45

Tested by

no test coverage detected