class KPixmapSplitter


Table of contents
Modules
kdefx Classes
All Classes
Module kdefx
Namespace global
Class KPixmapSplitter
Inherits

A class to split a pixmap into several items.

If you have a pixmap containing several items (icons), you can use this class to get the coordinates of each item.

For example, if you have a pixmap with 25 items and you want to get the 4th item as a pixmap (every item being 20x10 pixels):

KPixmapSplitter splitter;
splitter.setPixmap( somePixmap );
splitter.setItemSize( QSize( 20, 10 ));

QPixmap item( 20, 10 ); item.fill( Qt.white ); QRect rect = splitter.coordinates( 4 ); if ( !rect.isEmpty() ) bitBlt( &item, QPoint(0,0), &somePixmap, rect, CopyROP );

Author Carsten Pfeiffer



methods