Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

ImageCreateNoise Class Reference

Create noise. More...

Inheritance diagram for ImageCreateNoise:

Inheritance graph
[legend]
Collaboration diagram for ImageCreateNoise:

Collaboration graph
[legend]
List of all members.

Public Member Functions

char * GetDescription () const
void CreateFrame (uint8_t *pixels, int width, int height, double position, double frame_delta)
void AttachWidgets (GtkBin *bin)
void DetachWidgets (GtkBin *bin)
void InterpretWidgets (GtkBin *bin)

Detailed Description

Create noise.

Definition at line 170 of file image_create.cc.


Member Function Documentation

void ImageCreateNoise::AttachWidgets GtkBin *  bin  )  [inline, virtual]
 

Reimplemented from ImageCreateColour.

Definition at line 191 of file image_create.cc.

References ImageCreateColour::AddFrameCollector().

00192     {
00193         GtkWidget * table = gtk_table_new ( 2, 2, FALSE );
00194         gtk_table_set_row_spacings( GTK_TABLE( table ), 6 );
00195         gtk_table_set_col_spacings( GTK_TABLE( table ), 6 );
00196         AddFrameCollector( table, 0 );
00197         gtk_widget_show( table );
00198         gtk_container_add( GTK_CONTAINER( bin ), table );
00199     }

void ImageCreateNoise::CreateFrame uint8_t *  pixels,
int  width,
int  height,
double  position,
double  frame_delta
[inline, virtual]
 

Reimplemented from ImageCreateColour.

Definition at line 178 of file image_create.cc.

00179     {
00180         uint8_t value;
00181         uint8_t *p = pixels;
00182         while ( p < ( pixels + width * height * 3 ) )
00183         {
00184             value = ( uint8_t ) ( 255.0 * rand() / ( RAND_MAX + 1.0 ) );
00185             *p ++ = value;
00186             *p ++ = value;
00187             *p ++ = value;
00188         }
00189     }

void ImageCreateNoise::DetachWidgets GtkBin *  bin  )  [inline, virtual]
 

Reimplemented from ImageCreateColour.

Definition at line 201 of file image_create.cc.

References ImageCreateColour::InterpretFrameCollector().

00202     {
00203         if ( bin->child != NULL )
00204         {
00205             InterpretFrameCollector( );
00206             gtk_container_remove( GTK_CONTAINER( bin ), bin->child );
00207         }
00208     }

char* ImageCreateNoise::GetDescription  )  const [inline, virtual]
 

Reimplemented from ImageCreateColour.

Definition at line 173 of file image_create.cc.

00174     {
00175         return _( "Random noise" );
00176     }

void ImageCreateNoise::InterpretWidgets GtkBin *  bin  )  [inline, virtual]
 

Reimplemented from ImageCreateColour.

Definition at line 210 of file image_create.cc.

References ImageCreateColour::InterpretFrameCollector().

00211     {
00212         if ( bin->child != NULL )
00213             InterpretFrameCollector( );
00214     }


The documentation for this class was generated from the following file:
Generated on Sun Mar 11 22:13:02 2007 for Kino by  doxygen 1.4.2