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

Method setFontShadowColor

src/eepp/ui/uitextview.cpp:294–310  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

292}
293
294UITextView* UITextView::setFontShadowColor( const Color& color ) {
295 if ( mFontStyleConfig.ShadowColor != color ) {
296 mFontStyleConfig.ShadowColor = color;
297 if ( mFontStyleConfig.ShadowColor != Color::Transparent )
298 mFontStyleConfig.Style |= Text::Shadow;
299 else
300 mFontStyleConfig.Style &= ~Text::Shadow;
301 Color newColor( color.r, color.g, color.b, color.a * mAlpha / 255.f );
302 mTextCache.setShadowColor( newColor );
303 mTextCache.setStyle( mFontStyleConfig.Style );
304 onFontStyleChanged();
305 recalculate();
306 invalidateDraw();
307 }
308
309 return this;
310}
311
312const Vector2f& UITextView::getFontShadowOffset() const {
313 return mFontStyleConfig.ShadowOffset;

Callers

nothing calls this directly

Calls 2

setShadowColorMethod · 0.80
setStyleMethod · 0.80

Tested by

no test coverage detected