<s> """<STR_LIT>""" <EOL> __version__ = "<STR_LIT>" <EOL> from . import types as S <EOL> from . MplArtistStyle import MplArtistStyle <EOL> from . MplFontStyle import MplFontStyle <EOL> import matplotlib . text as mpltext <EOL> __all__ = [ '<STR_LIT>' ] <EOL> class MplTextStyle ( MplArtistStyle ) : <EOL> """<STR_LIT>""" <EOL> font = S . property . SubStyle ( MplFontStyle , doc = """<STR_LIT>""" ) <EOL> bgColor = S . property . MplColor ( doc = "<STR_LIT>" ) <EOL> color = S . property . MplColor ( doc = """<STR_LIT>""" ) <EOL> fgColor = S . property . Alias ( '<STR_LIT>' , isProperty = True , doc = """<STR_LIT>""" ) <EOL> vertAlign = S . property . Enum ( { '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : '<STR_LIT>' , } , doc = """<STR_LIT>""" ) <EOL> horizAlign = S . property . Enum ( { '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT:left>' : '<STR_LIT:left>' , <EOL> '<STR_LIT:right>' : '<STR_LIT:right>' , } , doc = """<STR_LIT>""" ) <EOL> multiAlign = S . property . Enum ( { '<STR_LIT:left>' : '<STR_LIT:left>' , <EOL> '<STR_LIT:right>' : '<STR_LIT:right>' , <EOL> '<STR_LIT>' : '<STR_LIT>' } , doc = """<STR_LIT>""" ) <EOL> lineSpacing = S . property . Float ( min = <NUM_LIT:0.0> , doc = """<STR_LIT>""" ) <EOL> rotation = S . property . Float ( min = - <NUM_LIT> , max = <NUM_LIT> , doc = """<STR_LIT>""" ) <EOL> def apply ( self , obj , defaults = { } , ** kwargs ) : <EOL> """<STR_LIT>""" <EOL> if not isinstance ( obj , mpltext . Text ) : <EOL> msg = "<STR_LIT>" "<STR_LIT>" "<STR_LIT>" % ( obj , ) <EOL> raise Exception ( msg ) <EOL> properties = { <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> } <EOL> subKwargs = kwargs . get ( '<STR_LIT>' , { } ) <EOL> subDefaults = S . lib . resolveDefaults ( defaults , [ '<STR_LIT>' ] ) <EOL> self . font . apply ( obj . get_font_properties ( ) , subDefaults , ** subKwargs ) <EOL> MplArtistStyle . apply ( self , obj , defaults , ** kwargs ) <EOL> kw = { } <EOL> for p in properties : <EOL> mplProp = properties [ p ] <EOL> value = self . getValue ( p , defaults , ** kwargs ) <EOL> if value is not None : <EOL> kw [ mplProp ] = value <EOL> if kw : <EOL> obj . update ( kw ) </s>
