Panda3D
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | List of all members
Icon Class Reference

Public Member Functions

 __init__ (self)
 
 addImage (self, image)
 
 generateMissingImages (self)
 
 makeICNS (self, fn)
 
 makeICO (self, fn)
 

Public Attributes

 images
 

Static Public Attributes

 notify = directNotify.newCategory("Icon")
 

Protected Member Functions

 _write_bitmap (self, fp, image, size, bpp)
 

Detailed Description

 This class is used to create an icon for various platforms. 

Constructor & Destructor Documentation

◆ __init__()

__init__ ( self)

Member Function Documentation

◆ _write_bitmap()

_write_bitmap ( self,
fp,
image,
size,
bpp )
protected
 Writes the bitmap header and data of an .ico file. 

◆ addImage()

addImage ( self,
image )
 Adds an image to the icon.  Returns False on failure, True on success.
Only one image per size can be loaded, and the image size must be square. 

◆ generateMissingImages()

generateMissingImages ( self)
 Generates image sizes that should be present but aren't by scaling
from the next higher size. 

◆ makeICNS()

makeICNS ( self,
fn )
 Writes the images to an Apple ICNS file.  Returns True on success. 

◆ makeICO()

makeICO ( self,
fn )
 Writes the images to a Windows ICO file.  Returns True on success. 

Member Data Documentation

◆ images

images

◆ notify

notify = directNotify.newCategory("Icon")
static