FX::FXIFFIcon Class Reference

#include <FXIFFIcon.h>

Inheritance diagram for FX::FXIFFIcon:

Inheritance graph
[legend]

List of all members.


Detailed Description

The IFF Icon provides support for the EA/Amiga Image File Format.

Public Member Functions

 FXIFFIcon (FXApp *a, const void *pix=NULL, FXColor clr=FXRGB(192, 192, 192), FXuint opts=0, FXint w=1, FXint h=1)
virtual bool savePixels (FXStream &store) const
virtual bool loadPixels (FXStream &store)
virtual ~FXIFFIcon ()
virtual void create ()
virtual void detach ()
virtual void destroy ()
virtual void render ()
virtual void resize (FXint w, FXint h)
FXColor getTransparentColor () const
void setTransparentColor (FXColor color)
void setOptions (FXuint opts)
FXuint getOptions () const
virtual void setData (FXColor *pix, FXuint opts=0)
virtual void setData (FXColor *pix, FXuint opts, FXint w, FXint h)
FXColor * getData () const
FXColor getPixel (FXint x, FXint y) const
void setPixel (FXint x, FXint y, FXColor color)
bool hasAlpha () const
virtual void restore ()
virtual void release ()
virtual void scale (FXint w, FXint h, FXint quality=0)
virtual void mirror (bool horizontal, bool vertical)
virtual void rotate (FXint degrees)
virtual void crop (FXint x, FXint y, FXint w, FXint h, FXColor color=0)
virtual void fill (FXColor color)
virtual void fade (FXColor color, FXint factor=255)
virtual void xshear (FXint shear, FXColor clr=0)
virtual void yshear (FXint shear, FXColor clr=0)
virtual void hgradient (FXColor left, FXColor right)
virtual void vgradient (FXColor top, FXColor bottom)
virtual void gradient (FXColor topleft, FXColor topright, FXColor bottomleft, FXColor bottomright)
virtual void blend (FXColor color)
virtual void save (FXStream &store) const
virtual void load (FXStream &store)
FXint getWidth () const
FXint getHeight () const
FXVisualgetVisual () const
void setVisual (FXVisual *vis)
FXAppgetApp () const
FXEventLoopgetEventLoop () const
FXID id () const
void setUserData (void *ptr)
void * getUserData () const
virtual long onDefault (FXObject *, FXSelector, void *)
const FXchar * getClassName () const
bool isMemberOf (const FXMetaClass *metaclass) const
virtual long tryHandle (FXObject *sender, FXSelector sel, void *ptr)
QTransString tr (const char *text, const char *hint=0)
virtual void * getPythonObject () const
virtual void decouplePythonObject () const

Static Public Attributes

static const FXchar * fileExt
static const FXchar * mimeType

Protected Member Functions

FXColor guesstransp ()

Protected Attributes

FXID shape
FXID etch
FXColor transp
FXColor * data
FXuint options
FXVisualvisual
FXint width
FXint height
FXID xid

Constructor & Destructor Documentation

FX::FXIFFIcon::FXIFFIcon ( FXApp a,
const void *  pix = NULL,
FXColor  clr = FXRGB(192, 192, 192),
FXuint  opts = 0,
FXint  w = 1,
FXint  h = 1 
)

Construct an icon from memory stream formatted as IFF format.

virtual FX::FXIFFIcon::~FXIFFIcon (  )  [virtual]

Destroy.


Member Function Documentation

virtual bool FX::FXIFFIcon::savePixels ( FXStream store  )  const [virtual]

Save pixels into stream in IFF format.

Reimplemented from FX::FXImage.

virtual bool FX::FXIFFIcon::loadPixels ( FXStream store  )  [virtual]

Load pixels from stream in IFF format.

Reimplemented from FX::FXImage.

virtual void FX::FXIcon::create (  )  [virtual, inherited]

Create the server side pixmap, the shape bitmap, and the etch bitmap, then call render() to fill it with the pixel data from the client-side buffer. After the server-side pixmap and bitmaps have been created, the client-side pixel buffer will be deleted unless IMAGE_KEEP has been specified. If the pixel buffer is not owned, i.e. the flag IMAGE_OWNED is not set, the pixel buffer will not be deleted; however the pixel buffer will be set to NULL.

Reimplemented from FX::FXImage.

virtual void FX::FXIcon::detach (  )  [virtual, inherited]

Detach the server side pixmap, shape bitmap, and etch bitmap from the Icon. Afterwards, the Icon is left as if it never had a server-side resources.

Reimplemented from FX::FXImage.

virtual void FX::FXIcon::destroy (  )  [virtual, inherited]

Destroy the server-side pixmap and the shape bitmap and etch bitmap. The client-side pixel buffer is not affected.

Reimplemented from FX::FXImage.

virtual void FX::FXIcon::render (  )  [virtual, inherited]

Render the server-side pixmap, shape bitmap and etch bitmap for the icon from the client-side pixel buffer.

Reimplemented from FX::FXImage.

virtual void FX::FXIcon::resize ( FXint  w,
FXint  h 
) [virtual, inherited]

Resize both client-side and server-side representations (if any) to the given width and height. The new representations typically contain garbage after this operation and need to be re-filled.

Reimplemented from FX::FXImage.

FXColor FX::FXIcon::getTransparentColor (  )  const [inline, inherited]

Obtain transparency color.

void FX::FXIcon::setTransparentColor ( FXColor  color  )  [inline, inherited]

Change transparency color.

void FX::FXImage::setOptions ( FXuint  opts  )  [inherited]

Change options.

FXuint FX::FXImage::getOptions (  )  const [inline, inherited]

To get to the option flags.

virtual void FX::FXImage::setData ( FXColor *  pix,
FXuint  opts = 0 
) [virtual, inherited]

Populate the image with new pixel data of the same size; it will assume ownership of the pixel data if image IMAGE_OWNED option is passed. The server-side representation of the image, if it exists, is not updated. This can be done by calling render().

virtual void FX::FXImage::setData ( FXColor *  pix,
FXuint  opts,
FXint  w,
FXint  h 
) [virtual, inherited]

Populate the image with new pixel data of a new size; it will assume ownership of the pixel data if image IMAGE_OWNED option is passed. The size of the server- side representation of the image, if it exists, is adjusted but the contents are not updated yet. This can be done by calling render().

FXColor* FX::FXImage::getData (  )  const [inline, inherited]

Return pointer to the pixel data of the image.

FXColor FX::FXImage::getPixel ( FXint  x,
FXint  y 
) const [inline, inherited]

Get pixel at x,y.

void FX::FXImage::setPixel ( FXint  x,
FXint  y,
FXColor  color 
) [inline, inherited]

Change pixel at x,y.

bool FX::FXImage::hasAlpha (  )  const [inherited]

Scan the image and return false if fully opaque.

virtual void FX::FXImage::restore (  )  [virtual, inherited]

Retrieves pixels from the server-side image. For example, to make screen snapshots, or to retrieve an image after it has been drawn into by various means.

virtual void FX::FXImage::release (  )  [virtual, inherited]

Release the client-side pixels buffer, free it if it was owned. If it is not owned, the image just forgets about the buffer.

virtual void FX::FXImage::scale ( FXint  w,
FXint  h,
FXint  quality = 0 
) [virtual, inherited]

Rescale pixels image to the specified width and height; this calls resize() to adjust the client and server side representations.

virtual void FX::FXImage::mirror ( bool  horizontal,
bool  vertical 
) [virtual, inherited]

Mirror image horizontally and/or vertically.

virtual void FX::FXImage::rotate ( FXint  degrees  )  [virtual, inherited]

Rotate image by degrees ccw; this calls resize() to adjust the client and server side representations if necessary.

virtual void FX::FXImage::crop ( FXint  x,
FXint  y,
FXint  w,
FXint  h,
FXColor  color = 0 
) [virtual, inherited]

Crop image to given rectangle; this calls resize() to adjust the client and server side representations. The new image may be smaller or larger than the old one; blank areas are filled with color. There must be at least one pixel of overlap between the old and the new image.

virtual void FX::FXImage::fill ( FXColor  color  )  [virtual, inherited]

Fill image with uniform color.

virtual void FX::FXImage::fade ( FXColor  color,
FXint  factor = 255 
) [virtual, inherited]

Fade image to uniform color.

virtual void FX::FXImage::xshear ( FXint  shear,
FXColor  clr = 0 
) [virtual, inherited]

Shear image horizontally; the number of pixels is equal to the shear parameter times 256. The area outside the image is filled with transparent black, unless another color is specified.

virtual void FX::FXImage::yshear ( FXint  shear,
FXColor  clr = 0 
) [virtual, inherited]

Shear image vertically; the number of pixels is equal to the shear parameter times 256. The area outside the image is filled with transparent black, unless another color is specified.

virtual void FX::FXImage::hgradient ( FXColor  left,
FXColor  right 
) [virtual, inherited]

Fill horizontal gradient.

virtual void FX::FXImage::vgradient ( FXColor  top,
FXColor  bottom 
) [virtual, inherited]

Fill vertical gradient.

virtual void FX::FXImage::gradient ( FXColor  topleft,
FXColor  topright,
FXColor  bottomleft,
FXColor  bottomright 
) [virtual, inherited]

Fill with gradient.

virtual void FX::FXImage::blend ( FXColor  color  )  [virtual, inherited]

Blend image over uniform color.

virtual void FX::FXImage::save ( FXStream store  )  const [virtual, inherited]

Save object to stream.

Reimplemented from FX::FXDrawable.

virtual void FX::FXImage::load ( FXStream store  )  [virtual, inherited]

Load object from stream.

Reimplemented from FX::FXDrawable.

FXint FX::FXDrawable::getWidth (  )  const [inline, inherited]

Width of drawable.

FXint FX::FXDrawable::getHeight (  )  const [inline, inherited]

Height of drawable.

FXVisual* FX::FXDrawable::getVisual (  )  const [inline, inherited]

Get the visual.

void FX::FXDrawable::setVisual ( FXVisual vis  )  [inherited]

Change visual.

FXApp* FX::FXId::getApp (  )  const [inline, inherited]

Get application.

FXEventLoop* FX::FXId::getEventLoop (  )  const [inline, inherited]

Get event loop which owns this.

FXID FX::FXId::id (  )  const [inline, inherited]

Get XID handle.

void FX::FXId::setUserData ( void *  ptr  )  [inline, inherited]

Set user data pointer.

void* FX::FXId::getUserData (  )  const [inline, inherited]

Get user data pointer.

virtual long FX::FXObject::onDefault ( FXObject ,
FXSelector  ,
void *   
) [virtual, inherited]

Called for unhandled messages.

Reimplemented in FX::FXDelegator, FX::FXGLViewer, FX::FXMDIChild, and FX::FXMDIClient.

const FXchar* FX::FXObject::getClassName (  )  const [inherited]

Get class name of some object.

bool FX::FXObject::isMemberOf ( const FXMetaClass metaclass  )  const [inherited]

Check if object is member of metaclass.

virtual long FX::FXObject::tryHandle ( FXObject sender,
FXSelector  sel,
void *  ptr 
) [virtual, inherited]

Try handle message safely.

QTransString FX::FXObject::tr ( const char *  text,
const char *  hint = 0 
) [inherited]

Returns a human translated version of the text to the locale language (warning: uses a virtual method call, so can't use before construction)

virtual void* FX::FXObject::getPythonObject (  )  const [inline, virtual, inherited]

Returns the python object representing this instance (if created in python).

virtual void FX::FXObject::decouplePythonObject (  )  const [inline, virtual, inherited]

Causes decoupling of python object from this object (deletes self).


The documentation for this class was generated from the following file:

(C) 2002-2008 Niall Douglas. Some parts (C) to assorted authors.
Generated on Fri Jun 13 22:01:51 2008 for TnFOX by doxygen v1.5.6