.. 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 .. _wx.ImageDataObject: ========================================================================================================================================== |phoenix_title| **wx.ImageDataObject** ========================================================================================================================================== :ref:`wx.ImageDataObject` is a specialization of :ref:`wx.DataObject` for image data. It can be used e.g. when you need to put on and retrieve from the clipboard a :ref:`wx.Image` with its metadata (like image resolution). .. versionadded:: 4.1/wxWidgets-3.1.5 .. seealso:: :ref:`Drag and Drop Overview `, :ref:`wx.DataObject`, :ref:`wx.CustomDataObject`, :ref:`wx.BitmapDataObject` | |class_hierarchy| Class Hierarchy ================================= .. raw:: html
Inheritance diagram for class ImageDataObject:
| |method_summary| Methods Summary ================================ ================================================================================ ================================================================================ :meth:`~wx.ImageDataObject.__init__` Constructor, optionally passing an image (otherwise use :meth:`~ImageDataObject.SetImage` later). :meth:`~wx.ImageDataObject.GetAllFormats` Returns a list of wx.DataFormat objects which this data object :meth:`~wx.ImageDataObject.GetImage` Returns the image associated with the data object. :meth:`~wx.ImageDataObject.SetData` :meth:`~wx.ImageDataObject.SetImage` Sets the image stored by the data object. ================================================================================ ================================================================================ | |property_summary| Properties Summary ===================================== ================================================================================ ================================================================================ :attr:`~wx.ImageDataObject.AllFormats` See :meth:`~wx.ImageDataObject.GetAllFormats` :attr:`~wx.ImageDataObject.Image` See :meth:`~wx.ImageDataObject.GetImage` and :meth:`~wx.ImageDataObject.SetImage` ================================================================================ ================================================================================ | |api| Class API =============== .. class:: wx.ImageDataObject(CustomDataObject) **Possible constructors**:: ImageDataObject(image=NullImage) ImageDataObject is a specialization of DataObject for image data. .. method:: __init__(self, image=NullImage) Constructor, optionally passing an image (otherwise use :meth:`SetImage` later). :param `image`: :type `image`: wx.Image .. method:: GetAllFormats(self, dir=DataObject.Get) Returns a list of wx.DataFormat objects which this data object supports transferring in the given direction. .. method:: GetImage(self) Returns the image associated with the data object. :rtype: :ref:`wx.Image` .. method:: SetData(self, format, buf) :rtype: `bool` .. method:: SetImage(self, image) Sets the image stored by the data object. :param `image`: :type `image`: wx.Image .. attribute:: AllFormats See :meth:`~wx.ImageDataObject.GetAllFormats` .. attribute:: Image See :meth:`~wx.ImageDataObject.GetImage` and :meth:`~wx.ImageDataObject.SetImage`