#-----------------------------------------------------------------------------# Copyright (c) 2012 - 2022, Anaconda, Inc., and Bokeh Contributors.# All rights reserved.## The full license is in the file LICENSE.txt, distributed with this software.#-----------------------------------------------------------------------------''' Models for various kinds of arrow heads that can be added toArrow annotations.'''#-----------------------------------------------------------------------------# Boilerplate#-----------------------------------------------------------------------------from__future__importannotationsimportlogging# isort:skiplog=logging.getLogger(__name__)#-----------------------------------------------------------------------------# Imports#-----------------------------------------------------------------------------# Bokeh importsfrom..core.has_propsimportabstractfrom..core.propertiesimportInclude,NumberSpec,Overridefrom..core.property_mixinsimportFillProps,LinePropsfrom..modelimportModel#-----------------------------------------------------------------------------# Globals and constants#-----------------------------------------------------------------------------__all__=('ArrowHead','NormalHead','OpenHead','TeeHead','VeeHead',)#-----------------------------------------------------------------------------# General API#-----------------------------------------------------------------------------
[docs]@abstractclassArrowHead(Model):''' Base class for arrow heads. '''size=NumberSpec(default=25,help=""" The size, in pixels, of the arrow head. """)
[docs]classOpenHead(ArrowHead):''' Render an open-body arrow head. '''line_props=Include(LineProps,help=""" The {prop} values for the arrow head outline. """)
[docs]classNormalHead(ArrowHead):''' Render a closed-body arrow head. '''line_props=Include(LineProps,help=""" The {prop} values for the arrow head outline. """)fill_props=Include(FillProps,help=""" The {prop} values for the arrow head interior. """)fill_color=Override(default="black")
[docs]classTeeHead(ArrowHead):''' Render a tee-style arrow head. '''line_props=Include(LineProps,help=""" The {prop} values for the arrow head outline. """)
[docs]classVeeHead(ArrowHead):''' Render a vee-style arrow head. '''line_props=Include(LineProps,help=""" The {prop} values for the arrow head outline. """)fill_props=Include(FillProps,help=""" The {prop} values for the arrow head interior. """)fill_color=Override(default="black")
#-----------------------------------------------------------------------------# Dev API#-----------------------------------------------------------------------------#-----------------------------------------------------------------------------# Private API#-----------------------------------------------------------------------------#-----------------------------------------------------------------------------# Code#-----------------------------------------------------------------------------