.. wxPython Phoenix documentation

   This file was generated by Phoenix's sphinx generator and associated
   tools, do not edit by hand.

   Copyright: (c) 2011-2020 by Total Control Software
   License:   wxWindows License

.. include:: headings.inc

.. currentmodule:: wx.lib.ogl.bmpshape

.. highlight:: python



.. _wx.lib.ogl.bmpshape.BitmapShape:

==========================================================================================================================================
|phoenix_title|  **wx.lib.ogl.bmpshape.BitmapShape**
==========================================================================================================================================

The :class:`wx.BitmapShape` class draws a bitmap (non-resizable).



|

|class_hierarchy| Class Hierarchy
=================================

.. raw:: html

   <div id="toggleBlock" onclick="return toggleVisibility(this)" class="closed" style="cursor:pointer;">
   <img id="toggleBlock-trigger" src="_static/images/closed.png"/>
   Inheritance diagram for class <strong>BitmapShape</strong>:
   </div>
   <div id="toggleBlock-summary" style="display:block;"></div>
   <div id="toggleBlock-content" style="display:none;">
   <p class="graphviz">
   <center><img src="_static/images/inheritance/wx.lib.ogl.bmpshape.BitmapShape_inheritance.png" alt="Inheritance diagram of BitmapShape" usemap="#dummy" class="inheritance"/></center>
   <script type="text/javascript">toggleVisibilityOnLoad(document.getElementById('toggleBlock'))</script>
   <map id="dummy" name="dummy"> <area shape="rect" id="node1" href="wx.lib.ogl.bmpshape.BitmapShape.html" title="wx.lib.ogl.bmpshape.BitmapShape" alt="" coords="5,237,253,267"/> <area shape="rect" id="node2" href="wx.lib.ogl.basic.RectangleShape.html" title="wx.lib.ogl.basic.RectangleShape" alt="" coords="14,160,245,189"/> <area shape="rect" id="node3" href="wx.lib.ogl.basic.Shape.html" title="wx.lib.ogl.basic.Shape" alt="" coords="46,83,213,112"/> <area shape="rect" id="node4" href="wx.lib.ogl.basic.ShapeEvtHandler.html" title="wx.lib.ogl.basic.ShapeEvtHandler" alt="" coords="10,5,249,35"/> </map> 
   </p>
   </div>

|


|super_classes| Known Superclasses
==================================

:class:`wx.lib.ogl.basic.RectangleShape`

|


|method_summary| Methods Summary
================================

================================================================================ ================================================================================
:meth:`~wx.lib.ogl.bmpshape.BitmapShape.__init__`                                Default class constructor.
:meth:`~wx.lib.ogl.bmpshape.BitmapShape.GetBitmap`                               Get the associated bitmap.
:meth:`~wx.lib.ogl.bmpshape.BitmapShape.GetFilename`                             Return the bitmap filename.
:meth:`~wx.lib.ogl.bmpshape.BitmapShape.OnDraw`                                  The draw handler.
:meth:`~wx.lib.ogl.bmpshape.BitmapShape.SetBitmap`                               Set the associated bitmap.
:meth:`~wx.lib.ogl.bmpshape.BitmapShape.SetFilename`                             Set the bitmap filename.
:meth:`~wx.lib.ogl.bmpshape.BitmapShape.SetSize`                                 Set the size.
================================================================================ ================================================================================


|


|api| Class API
===============


.. class:: BitmapShape(RectangleShape)

   The :class:`wx.BitmapShape` class draws a bitmap (non-resizable).

   .. method:: __init__(self)

      Default class constructor.


   .. method:: GetBitmap(self)

      Get the associated bitmap.


   .. method:: GetFilename(self)

      Return the bitmap filename.


   .. method:: OnDraw(self, dc)

      The draw handler.


   .. method:: SetBitmap(self, bitmap)

      Set the associated bitmap.
      
      :param `bitmap`: a :class:`wx.Bitmap` instance
      
      :note: You can delete the bitmap from the calling application, since
       reference counting will take care of holding on to the internal bitmap
       data.


   .. method:: SetFilename(self, f)

      Set the bitmap filename.
      
      :param str `f`: the bitmap file name


   .. method:: SetSize(self, w, h, recursive = True)

      Set the size.
      
      :param `w`: the width
      :param `h`: the heigth
      :param `recursive`: not used


