qwt_pixel_matrix.cpp
Go to the documentation of this file.
00001 /* -*- mode: C++ ; c-file-style: "stroustrup" -*- *****************************
00002  * Qwt Widget Library
00003  * Copyright (C) 1997   Josef Wilgen
00004  * Copyright (C) 2002   Uwe Rathmann
00005  *
00006  * This library is free software; you can redistribute it and/or
00007  * modify it under the terms of the Qwt License, Version 1.0
00008  *****************************************************************************/
00009 
00010 #include "qwt_pixel_matrix.h"
00011 
00017 QwtPixelMatrix::QwtPixelMatrix( const QRect& rect ):
00018     QBitArray( qMax( rect.width() * rect.height(), 0 ) ),
00019     d_rect( rect )
00020 {
00021 }
00022 
00024 QwtPixelMatrix::~QwtPixelMatrix()
00025 {
00026 }
00027 
00035 void QwtPixelMatrix::setRect( const QRect& rect )
00036 {
00037     if ( rect != d_rect )
00038     {
00039         d_rect = rect;
00040         const int sz = qMax( rect.width() * rect.height(), 0 );
00041         resize( sz );
00042     }
00043 
00044     fill( false );
00045 }
00046 
00048 QRect QwtPixelMatrix::rect() const
00049 {
00050     return d_rect;
00051 }


plotjuggler
Author(s): Davide Faconti
autogenerated on Fri Sep 1 2017 02:41:56