class_docstr: An internal class to manage widgets.
  
  It also manages and other helper methods involving widgets.
class_docstr_tok: ["An","internal","class","to","manage","widgets",".","It","also","manages","and","other","helper","methods","involving","widgets","."]
docstr: Add a logo widget to the top of the viewport.
  
  If no logo is passed, the PyVista logo will be used.
  
  Parameters
  ----------
  logo : pyvista.ImageData or pathlib.Path, optional
      The logo to display. If a pathlike is passed, it is assumed to be a
      file path to an image.
  
  position : tuple(float), optional
      The position of the logo in the viewport. The first value is the
      horizontal position and the second value is the vertical position.
      Both values must be between 0 and 1.
  
  size : tuple(float), optional
      The size of the logo in the viewport. The first value is the
      horizontal size and the second value is the vertical size. Both
      values must be between 0 and 1.
  
  opacity : float, optional
      The opacity of the logo. Must be between 0 and 1.
  
  Returns
  -------
  vtkLogoWidget
      The logo widget.
  
  Examples
  --------
  Add a logo widget to the scene.
  
  >>> import pyvista as pv
  >>> pl = pv.Plotter()
  >>> _ = pl.add_logo_widget()
  >>> _ = pl.add_mesh(pv.Sphere(), show_edges=True)
  >>> pl.show()
docstr_tok: ["Add","a","logo","widget","to","the","top","of","the","viewport",".","If","no","logo","is","passed",",","the","PyVista","logo","will","be","used",".","Parameters","--","--","--","--","--","logo",":","pyvista.ImageData","or","pathlib.Path",",","optional","The","logo","to","display",".","If","a","pathlike","is","passed",",","it","is","assumed","to","be","a","file","path","to","an","image",".","position",":","tuple","(","float",")",",","optional","The","position","of","the","logo","in","the","viewport",".","The","first","value","is","the","horizontal","position","and","the","second","value","is","the","vertical","position",".","Both","values","must","be","between","0","and","1.","size",":","tuple","(","float",")",",","optional","The","size","of","the","logo","in","the","viewport",".","The","first","value","is","the","horizontal","size","and","the","second","value","is","the","vertical","size",".","Both","values","must","be","between","0","and","1.","opacity",":","float",",","optional","The","opacity","of","the","logo",".","Must","be","between","0","and","1",".","Returns","--","--","--","-","vtkLogoWidget","The","logo","widget",".","Examples","--","--","--","--","Add","a","logo","widget","to","the","scene",".",">",">",">","import","pyvista","as","pv",">",">",">","pl","=","pv.Plotter","(",")",">",">",">","_","=","pl.add_logo_widget","(",")",">",">",">","_","=","pl.add_mesh","(","pv.Sphere","(",")",",","show_edges=True",")",">",">",">","pl.show","(",")"]
code: def add_logo_widget(
      self,
      logo: Optional[
          Union[pyvista.ImageData, str, pathlib.Path]
      ] = None,
      position: Union[
          Tuple[float, float], Sequence[float], np.ndarray
      ] = (0.75, 0.8),
      size: Union[Tuple[float, float], Sequence[float], np.ndarray] = (
          0.2,
          0.2,
      ),
      opacity: float = 1.0,
  ):
      """Add a logo widget to the top of the viewport.
  
      If no logo is passed, the PyVista logo will be used.
  
      Parameters
      ----------
      logo : pyvista.ImageData or pathlib.Path, optional
          The logo to display. If a pathlike is passed, it is assumed to be a
          file path to an image.
  
      position : tuple(float), optional
          The position of the logo in the viewport. The first value is the
          horizontal position and the second value is the vertical position.
          Both values must be between 0 and 1.
  
      size : tuple(float), optional
          The size of the logo in the viewport. The first value is the
          horizontal size and the second value is the vertical size. Both
          values must be between 0 and 1.
  
      opacity : float, optional
          The opacity of the logo. Must be between 0 and 1.
  
      Returns
      -------
      vtkLogoWidget
          The logo widget.
  
      Examples
      --------
      Add a logo widget to the scene.
  
      >>> import pyvista as pv
      >>> pl = pv.Plotter()
      >>> _ = pl.add_logo_widget()
      >>> _ = pl.add_mesh(pv.Sphere(), show_edges=True)
      >>> pl.show()
  
      """
      if logo is None:
          logo = pyvista.global_theme.logo_file
      if logo is None:
          # Fallback to PyVista logo
          from pyvista import examples
  
          logo = examples.logofile
      if isinstance(logo, (str, pathlib.Path)):
          logo = pyvista.read(logo)
      if not isinstance(logo, pyvista.ImageData):
          raise TypeError(
              "Logo must be a pyvista.ImageData or a file path to an image."
          )
      representation = _vtk.vtkLogoRepresentation()
      representation.SetImage(logo)
      representation.SetPosition(position)
      representation.SetPosition2(size)
      representation.GetImageProperty().SetOpacity(opacity)
      widget = _vtk.vtkLogoWidget()
      widget.SetInteractor(self.iren.interactor)  # type: ignore
      widget.SetRepresentation(representation)
      widget.On()
      self.logo_widgets.append(widget)
      return widget
  
imports: import pathlib
  from typing import Optional, Sequence, Tuple, Union
  import numpy
  import pyvista
  from pyvista.core.utilities.arrays import get_array, get_array_association
  from pyvista.core.utilities.geometric_objects import NORMALS
  from pyvista.core.utilities.helpers import generate_plane
  from pyvista.core.utilities.misc import assert_empty_kwargs, try_callback
  from .None import _vtk
  from .affine_widget import AffineWidget3D
  from .colors import Color
  from .opts import PickerType
  from .utilities.algorithms import add_ids_algorithm, algorithm_to_mesh_handler, crinkle_algorithm, outline_algorithm, pointset_to_polydata_algorithm, set_algorithm_input
label_desc: Use image node_id 30 for calling the WidgetHelper obj's underlying member method code with example usage: obj.add_logo_widget(logo, position, size, opacity) and returns: widget