Last change
on this file since 9407 was 8127, checked in by stoecker, 8 years ago |
update qwt and qwtpolar, many QT5 fixes (unfinished)
|
File size:
1.1 KB
|
Line | |
---|
1 | /* -*- mode: C++ ; c-file-style: "stroustrup" -*- *****************************
|
---|
2 | * Qwt Widget Library
|
---|
3 | * Copyright (C) 1997 Josef Wilgen
|
---|
4 | * Copyright (C) 2002 Uwe Rathmann
|
---|
5 | *
|
---|
6 | * This library is free software; you can redistribute it and/or
|
---|
7 | * modify it under the terms of the Qwt License, Version 1.0
|
---|
8 | *****************************************************************************/
|
---|
9 |
|
---|
10 | #include "qwt_pixel_matrix.h"
|
---|
11 |
|
---|
12 | /*!
|
---|
13 | \brief Constructor
|
---|
14 |
|
---|
15 | \param rect Bounding rectangle for the matrix
|
---|
16 | */
|
---|
17 | QwtPixelMatrix::QwtPixelMatrix( const QRect& rect ):
|
---|
18 | QBitArray( qMax( rect.width() * rect.height(), 0 ) ),
|
---|
19 | d_rect( rect )
|
---|
20 | {
|
---|
21 | }
|
---|
22 |
|
---|
23 | //! Destructor
|
---|
24 | QwtPixelMatrix::~QwtPixelMatrix()
|
---|
25 | {
|
---|
26 | }
|
---|
27 |
|
---|
28 | /*!
|
---|
29 | Set the bounding rectangle of the matrix
|
---|
30 |
|
---|
31 | \param rect Bounding rectangle
|
---|
32 |
|
---|
33 | \note All bits are cleared
|
---|
34 | */
|
---|
35 | void QwtPixelMatrix::setRect( const QRect& rect )
|
---|
36 | {
|
---|
37 | if ( rect != d_rect )
|
---|
38 | {
|
---|
39 | d_rect = rect;
|
---|
40 | const int sz = qMax( rect.width() * rect.height(), 0 );
|
---|
41 | resize( sz );
|
---|
42 | }
|
---|
43 |
|
---|
44 | fill( false );
|
---|
45 | }
|
---|
46 |
|
---|
47 | //! \return Bounding rectangle
|
---|
48 | QRect QwtPixelMatrix::rect() const
|
---|
49 | {
|
---|
50 | return d_rect;
|
---|
51 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.