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

Method getScreenPosition

src/eepp/ui/uicodeeditor.cpp:1357–1366  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1355}
1356
1357Rectf UICodeEditor::getScreenPosition( const TextPosition& position ) const {
1358 Float lineHeight = getLineHeight();
1359 Vector2f screenStart( getScreenStart() );
1360 Vector2f start( screenStart.x + getGutterWidth(), screenStart.y + getPluginsTopSpace() );
1361 Vector2f startScroll( start - mScroll );
1362 auto offset = getTextPositionOffsetSanitized( position, lineHeight );
1363 return { { static_cast<Float>( startScroll.x + offset.x ),
1364 static_cast<Float>( startScroll.y + offset.y ) },
1365 { getGlyphWidth(), lineHeight } };
1366}
1367
1368const Float& UICodeEditor::getPluginsTopSpace() const {
1369 return mPluginsTopSpace;

Callers 2

blameMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected