phoenix_title wx.ImageDataObject

wx.ImageDataObject is a specialization of wx.DataObject for image data.

It can be used e.g. when you need to put on and retrieve from the clipboard a wx.Image with its metadata (like image resolution).

New in version 4.1/wxWidgets-3.1.5.

See also

Drag and Drop Overview, wx.DataObject, wx.CustomDataObject, wx.BitmapDataObject


class_hierarchy Class Hierarchy

Inheritance diagram for class ImageDataObject:

method_summary Methods Summary

__init__

Constructor, optionally passing an image (otherwise use SetImage later).

GetAllFormats

Returns a list of wx.DataFormat objects which this data object

GetImage

Returns the image associated with the data object.

SetData

SetImage

Sets the image stored by the data object.


property_summary Properties Summary

AllFormats

See GetAllFormats

Image

See GetImage and SetImage


api Class API

class wx.ImageDataObject(CustomDataObject)

Possible constructors:

ImageDataObject(image=NullImage)

ImageDataObject is a specialization of DataObject for image data.


Methods

__init__(self, image=NullImage)

Constructor, optionally passing an image (otherwise use SetImage later).

Parameters:

image (wx.Image) –



GetAllFormats(self, dir=DataObject.Get)

Returns a list of wx.DataFormat objects which this data object supports transferring in the given direction.



GetImage(self)

Returns the image associated with the data object.

Return type:

wx.Image



SetData(self, format, buf)
Return type:

bool



SetImage(self, image)

Sets the image stored by the data object.

Parameters:

image (wx.Image) –


Properties

AllFormats

See GetAllFormats



Image

See GetImage and SetImage