11 #include "ViewportBuffer.h"
12 #include "ViewportBufferAction.h"
13 #include "ViewportBufferStretch.h"
14 #include "ViewportBufferFill.h"
15 #include "ViewportBufferTransform.h"
17 #include <QApplication>
23 #include "CubeDataThread.h"
24 #include "CubeViewport.h"
25 #include "SpecialPixel.h"
26 #include "PixelType.h"
29 #define round(x) ((x) > 0.0 ? (x) + 0.5 : (x) - 0.5)
47 p_dataThread = cubeData;
53 p_viewport = viewport;
54 p_bufferInitialized =
false;
57 p_initialStretchDone =
false;
58 p_viewportHeight = p_viewport->viewport()->height();
59 p_oldViewportHeight = p_viewport->viewport()->height();
60 p_vertScrollBarPos = p_viewport->verticalScrollBar()->value();
61 p_oldVertScrollBarPos = p_viewport->verticalScrollBar()->value();
63 p_requestedFillArea = 0.0;
64 p_bricksOrdered =
true;
66 connect(
this, SIGNAL(ReadCube(
int,
int,
int,
int,
int,
int,
void *)),
67 p_dataThread, SLOT(ReadCube(
int,
int,
int,
int,
int,
int,
void *)));
69 connect(p_dataThread, SIGNAL(ReadReady(
void *,
int,
const Isis::Brick *)),
70 this, SLOT(DataReady(
void *,
int,
const Isis::Brick *)));
72 connect(
this, SIGNAL(DoneWithData(
int,
const Isis::Brick *)),
73 p_dataThread, SLOT(DoneWithData(
int,
const Isis::Brick *)));
80 ViewportBuffer::~ViewportBuffer() {
81 disconnect(
this, SIGNAL(ReadCube(
int,
int,
int,
int,
int,
int,
void *)),
82 p_dataThread, SLOT(ReadCube(
int,
int,
int,
int,
int,
int,
void *)));
84 disconnect(p_dataThread, SIGNAL(ReadReady(
void *,
int,
const Isis::Brick *)),
85 this, SLOT(DataReady(
void *,
int,
const Isis::Brick *)));
87 disconnect(
this, SIGNAL(DoneWithData(
int,
const Isis::Brick *)),
88 p_dataThread, SLOT(DoneWithData(
int,
const Isis::Brick *)));
93 while(!p_actions->empty()) {
114 void ViewportBuffer::fillBuffer(QRect rect) {
116 throw IException(IException::Programmer,
"invalid band", _FILEINFO_);
120 rect.intersected(bufferXYRect()),
false);
121 enqueueAction(newFill);
133 void ViewportBuffer::fillBuffer(QRect rect,
const Brick *data) {
135 throw IException(IException::Programmer,
"invalid band", _FILEINFO_);
138 rect = rect.intersected(bufferXYRect());
150 for(
int x = rect.left(); x <= rect.right(); x ++) {
158 if (samp < data->Sample())
162 if (line < data->Line())
169 int brickIndex = data->
Index((
int)(samp + 0.5), (
int)(line + 0.5),
173 p_buffer.at(yIndex).at(xIndex) = data->
at(0);
175 else if(brickIndex >= data->
size()) {
176 p_buffer.at(yIndex).at(xIndex) = data->
at(data->
size() - 1);
179 if(yIndex < 0 || xIndex < 0 || yIndex >= (
int) p_buffer.size() ||
180 xIndex >= (
int) p_buffer.at(yIndex).size()) {
182 "index out of range",
186 p_buffer.at(yIndex).at(xIndex) = data->
at(brickIndex);
193 throw IException(e, IException::Programmer,
"Failed to load brick "
194 "into buffer", _FILEINFO_);
208 void ViewportBuffer::DataReady(
void *requester,
int cubeId,
209 const Brick *brick) {
210 if(
this != requester)
213 if(p_actions->empty()) {
214 throw IException(IException::Programmer,
"no actions", _FILEINFO_);
219 if(curAction->
getActionType() != ViewportBufferAction::fill ||
221 throw IException(IException::Programmer,
"not a fill action", _FILEINFO_);
226 const QRect *rect = fill->
getRect();
234 bool brickOrderCorrection = p_bricksOrdered;
235 if (curBrickLine != nextBrickLine &&
236 nextBrickLine == (
int) (brick->
Line() + 0.5)) {
238 p_bricksOrdered =
false;
241 p_bricksOrdered =
true;
247 for(
int x = rect->left(); x <= rect->right(); x++) {
256 int brickIndex = (int)(samp + 0.5) - brick->
Sample();
259 p_buffer.at(yIndex).at(xIndex) = brick->
at(0);
261 else if(brickIndex >= brick->
size()) {
262 p_buffer.at(yIndex).at(xIndex) = brick->
at(brick->
size() - 1);
265 if(yIndex < 0 || xIndex < 0 || yIndex >= (
int) p_buffer.size() ||
266 xIndex >= (int) p_buffer.at(yIndex).size()) {
267 IString msg =
"An index out of range error was detected. ";
270 msg +=
"The Y-Index [" +
IString(yIndex) +
"] is less than 0";
272 msg +=
"The X-Index [" +
IString(xIndex) +
"] is less than 0";
273 else if(yIndex > (
int)p_buffer.size())
274 msg +=
"The Y-Index [" +
IString(yIndex) +
"] is greater than the "
275 "Y-Size of [" +
IString((
int)p_buffer.size()) +
"]";
276 else if(xIndex > (
int)p_buffer.at(yIndex).size())
277 msg +=
"The X-Index [" +
IString(xIndex) +
" is greater than the "
278 "X-Size of [" +
IString((
int) p_buffer.at(yIndex).size()) +
"]";
280 throw IException(IException::Programmer, msg, _FILEINFO_);
283 p_buffer.at(yIndex).at(xIndex) = brick->
at(brickIndex);
291 if (p_bricksOrdered) {
292 requestCubeLine(fill);
295 if (brickOrderCorrection) {
296 requestCubeLine(fill);
297 requestCubeLine(fill);
304 p_actions->dequeue();
308 emit DoneWithData(cubeId, brick);
323 p_requestedFillArea += fillRect->width() * fillRect->height();
326 if(p_actions->empty()) {
327 p_viewport->enableProgress();
330 p_actions->enqueue(action);
342 const vector<double> &ViewportBuffer::getLine(
int line) {
343 if(!p_bufferInitialized || !p_enabled) {
344 throw IException(IException::Programmer,
"no data", _FILEINFO_);
347 if(line < 0 || line >= (
int)p_buffer.size()) {
349 "Invalid call to getLine",
353 return p_buffer.at(line);
364 QRect ViewportBuffer::getXYBoundingRect() {
365 int startx, starty, endx, endy;
366 p_viewport->cubeToViewport(0.5, 0.5, startx, starty);
370 double startSamp, startLine;
371 p_viewport->viewportToCube(startx, starty, startSamp, startLine);
379 double rightmost = p_viewport->cubeSamples() + 0.5;
380 double bottommost = p_viewport->cubeLines() + 0.5;
382 p_viewport->cubeToViewport(rightmost, bottommost, endx, endy);
384 if(endx < 0 || endy < 0)
387 double endSamp = -1, endLine = -1;
388 p_viewport->viewportToCube(endx, endy, endSamp, endLine);
390 if(endSamp > rightmost)
393 if(endLine > bottommost)
405 if(endx >= p_viewport->viewport()->width()) {
406 endx = p_viewport->viewport()->width() - 1;
409 if(endy >= p_viewport->viewport()->height()) {
410 endy = p_viewport->viewport()->height() - 1;
413 return QRect(startx, starty, endx - startx + 1, endy - starty + 1);
423 bool ViewportBuffer::hasEntireCube() {
424 double sampTolerance = 0.05 * p_viewport->cubeSamples();
425 double lineTolerance = 0.05 * p_viewport->cubeLines();
429 hasCube &= !working();
430 hasCube &= p_sampLineBoundingRect[rectLeft] <= (1 + sampTolerance);
431 hasCube &= p_sampLineBoundingRect[rectTop] <= (1 + lineTolerance);
432 hasCube &= p_sampLineBoundingRect[rectRight] >= (p_viewport->cubeSamples() -
434 hasCube &= p_sampLineBoundingRect[rectBottom] >= (p_viewport->cubeLines() -
448 QRect xyRect = getXYBoundingRect();
449 double ssamp, esamp, sline, eline;
450 p_viewport->viewportToCube(xyRect.left(), xyRect.top(), ssamp, sline);
451 p_viewport->viewportToCube(xyRect.right(), xyRect.bottom(), esamp, eline);
455 boundingRect.insert(rectLeft, ssamp);
456 boundingRect.insert(rectTop, sline);
457 boundingRect.insert(rectRight, esamp);
458 boundingRect.insert(rectBottom, eline);
468 void ViewportBuffer::updateBoundingRects() {
469 p_oldXYBoundingRect = p_XYBoundingRect;
470 p_XYBoundingRect = getXYBoundingRect();
472 p_oldSampLineBoundingRect = p_sampLineBoundingRect;
473 p_sampLineBoundingRect = getSampLineBoundingRect();
475 p_oldViewportHeight = p_viewportHeight;
476 p_viewportHeight = p_viewport->viewport()->height();
478 p_oldVertScrollBarPos = p_vertScrollBarPos;
480 p_vertScrollBarPos = p_viewport->verticalScrollBar()->value() + 1;
497 QRect someRect,
bool useOldY) {
498 QScrollBar *hsb = p_viewport->horizontalScrollBar();
499 int xConstCoef = hsb->value();
500 xConstCoef -= p_viewport->viewport()->width() / 2;
505 if(!someRect.isValid()) {
506 throw IException(IException::Programmer,
"Fill rect invalid", _FILEINFO_);
509 double xScale = p_viewport->scale();
514 yConstCoef = (p_vertScrollBarPos) - p_viewportHeight / 2 - 1;
516 yConstCoef = (p_oldVertScrollBarPos) - p_oldViewportHeight / 2 - 1;
518 double yScale = xScale;
523 topLeft = p_XYBoundingRect.topLeft();
526 topLeft = QPoint(p_XYBoundingRect.left(), p_oldXYBoundingRect.top());
530 xScale, yConstCoef, yScale, topLeft);
543 throw IException(IException::Programmer,
"invalid band", _FILEINFO_);
547 QRect &rect = *fill->
getRect();
553 int brickWidth = (int)(ceil(esamp) - floor(ssamp)) + 1;
559 int roundedSamp = (int)(ssamp + 0.5);
560 int roundedLine = (int)(line + 0.5);
562 emit ReadCube(p_cubeId, roundedSamp, roundedLine, roundedSamp + brickWidth,
563 roundedLine, p_band,
this);
579 void ViewportBuffer::doQueuedActions() {
580 bool doNextAction =
false;
586 if(!reinitializeActionExists() && !actionsPreserveData() &&
587 p_initialStretchDone) {
593 p_requestedFillArea = 0.0;
596 if(!p_actions->empty()) {
597 curAction = p_actions->head();
598 doNextAction = !curAction->
started();
601 while(doNextAction) {
602 if(curAction->
getActionType() == ViewportBufferAction::transform) {
605 else if(curAction->
getActionType() == ViewportBufferAction::fill) {
610 p_initialStretchDone =
true;
613 doNextAction = !p_actions->empty();
616 curAction = p_actions->head();
617 doNextAction = !curAction->
started();
621 if(p_actions->empty()) {
623 p_viewport->bufferUpdated(bufferXYRect());
633 double ViewportBuffer::currentProgress() {
636 if(p_requestedFillArea <= 0.0)
639 return 1.0 - totalUnfilledArea() / p_requestedFillArea;
649 double ViewportBuffer::totalUnfilledArea() {
650 double totalFillArea = 0.0;
654 for(
int actionIndex = 0; actionIndex < p_actions->size(); actionIndex ++) {
660 QRect unfilledRect(*fill->
getRect());
662 totalFillArea += unfilledRect.width() * unfilledRect.height();
666 return totalFillArea;
674 bool ViewportBuffer::actionsPreserveData() {
678 QRect currentBufferRect(bufferXYRect());
680 int bufferWidth = currentBufferRect.width();
681 int bufferHeight = currentBufferRect.height();
685 for(
int actionIndex = 0; actionIndex < p_actions->size(); actionIndex ++) {
688 if(action->
getActionType() == ViewportBufferAction::transform) {
696 if(abs(totalXShift) >= bufferWidth)
698 if(abs(totalYShift) >= bufferHeight)
713 if(abs(totalXShift) >= bufferWidth)
715 if(abs(totalYShift) >= bufferHeight)
730 bool ViewportBuffer::reinitializeActionExists() {
731 QRect currentBufferRect(bufferXYRect());
733 if(currentBufferRect.width() == 0 || currentBufferRect.height() == 0) {
737 for(
int actionIndex = 0; actionIndex < p_actions->size(); actionIndex ++) {
740 if(action->
getActionType() == ViewportBufferAction::transform) {
759 bool ViewportBuffer::working() {
760 return !p_actions->empty() || !p_bufferInitialized || !p_enabled;
785 p_actions->dequeue();
801 requestCubeLine(action);
804 requestCubeLine(action);
817 p_actions->dequeue();
819 p_viewport->restretch(
this);
829 void ViewportBuffer::resizeBuffer(
unsigned int width,
unsigned int height) {
830 p_buffer.resize(height);
832 for(
unsigned int i = 0; i < p_buffer.size(); i++) {
833 p_buffer[i].resize(width,
Null);
845 void ViewportBuffer::shiftBuffer(
int deltaX,
int deltaY) {
847 for(
int i = p_buffer.size() - 1; i >= deltaY; i--) {
848 p_buffer[i] = p_buffer[i - deltaY];
852 for(
unsigned int x = 0; x < p_buffer[i - deltaY].size(); x++) {
853 p_buffer[i - deltaY][x] =
Null;
858 for(
int j = p_buffer[i].size() - 1; j >= deltaX; j--) {
859 p_buffer[i][j] = p_buffer[i][j - deltaX];
860 p_buffer[i][j - deltaX] =
Null;
863 else if(deltaX < 0) {
864 for(
int j = 0; j < (int)p_buffer[i].size() + deltaX; j++) {
865 p_buffer[i][j] = p_buffer[i][j - deltaX];
866 p_buffer[i][j - deltaX] =
Null;
871 else if(deltaY < 0) {
872 for(
int i = 0; i < (int)p_buffer.size() + deltaY; i++) {
873 p_buffer[i] = p_buffer[i - deltaY];
876 for(
unsigned int x = 0; x < p_buffer[i - deltaY].size(); x++) {
877 p_buffer[i - deltaY][x] =
Null;
881 for(
int j = p_buffer[i].size() - 1; j >= deltaX; j--) {
882 p_buffer[i][j] = p_buffer[i][j - deltaX];
883 p_buffer[i][j - deltaX] =
Null;
886 else if(deltaX < 0) {
887 for(
int j = 0; j < (int)p_buffer[i].size() + deltaX; j++) {
888 p_buffer[i][j] = p_buffer[i][j - deltaX];
889 p_buffer[i][j - deltaX] =
Null;
901 void ViewportBuffer::resizedViewport() {
902 updateBoundingRects();
904 if(!p_bufferInitialized || !p_enabled)
909 if(!p_XYBoundingRect.isValid())
912 if(!p_oldXYBoundingRect.isValid()) {
918 double deltaLeftSamples = p_sampLineBoundingRect[rectLeft] -
919 p_oldSampLineBoundingRect[rectLeft];
921 int deltaLeftPixels = (int)round(deltaLeftSamples * p_viewport->scale());
923 double deltaRightSamples = p_sampLineBoundingRect[rectRight] -
924 p_oldSampLineBoundingRect[rectRight];
925 int deltaRightPixels = (int)round(deltaRightSamples * p_viewport->scale());
927 double deltaTopSamples = p_sampLineBoundingRect[rectTop] -
928 p_oldSampLineBoundingRect[rectTop];
929 int deltaTopPixels = (int)round(deltaTopSamples * p_viewport->scale());
931 double deltaBottomSamples = p_sampLineBoundingRect[rectBottom] -
932 p_oldSampLineBoundingRect[rectBottom];
933 int deltaBottomPixels = (int)round(deltaBottomSamples *
934 p_viewport->scale());
937 int deltaW = - deltaLeftPixels + deltaRightPixels;
940 int deltaH = - deltaTopPixels + deltaBottomPixels;
943 if(p_XYBoundingRect.width() != p_oldXYBoundingRect.width()) {
949 transform->
setResize(p_XYBoundingRect.width(),
950 p_oldXYBoundingRect.height());
953 enqueueAction(transform);
956 QPoint topLeftOfLeftRect(p_XYBoundingRect.left(),
957 p_oldXYBoundingRect.top());
959 QPoint bottomRightOfLeftRect(p_XYBoundingRect.left() - deltaLeftPixels,
960 p_oldXYBoundingRect.bottom());
962 QRect leftRect(topLeftOfLeftRect, bottomRightOfLeftRect);
966 enqueueAction(leftFill);
969 QPoint topLeftOfRightRect(p_XYBoundingRect.right() - deltaRightPixels,
970 p_oldXYBoundingRect.top());
972 QPoint bottomRightOfRightRect(p_XYBoundingRect.right(),
973 p_oldXYBoundingRect.bottom());
975 QRect rightRect(topLeftOfRightRect, bottomRightOfRightRect);
979 enqueueAction(rightFill);
982 else if(deltaW < 0) {
985 transform->
setResize(p_XYBoundingRect.width(),
986 p_oldXYBoundingRect.height());
988 enqueueAction(transform);
993 if(p_XYBoundingRect.height() != p_oldXYBoundingRect.height()) {
998 transform->
setResize(p_XYBoundingRect.width(),
999 p_XYBoundingRect.height());
1002 enqueueAction(transform);
1004 QPoint bottomRightOfTopSide(p_XYBoundingRect.right(),
1005 p_XYBoundingRect.top() - deltaTopPixels);
1007 QRect topSideToFill(p_XYBoundingRect.topLeft(), bottomRightOfTopSide);
1010 QPoint topLeftOfbottomSide(p_XYBoundingRect.left(),
1011 p_XYBoundingRect.bottom() -
1014 QRect bottomSideToFill(topLeftOfbottomSide,
1015 p_XYBoundingRect.bottomRight());
1019 enqueueAction(topFill);
1022 createViewportBufferFill(bottomSideToFill,
false);
1023 enqueueAction(bottomFill);
1026 else if(deltaH < 0) {
1030 transform->
setResize(p_XYBoundingRect.width(),
1031 p_oldXYBoundingRect.height());
1033 enqueueAction(transform);
1048 void ViewportBuffer::pan(
int deltaX,
int deltaY) {
1049 updateBoundingRects();
1051 if(!p_bufferInitialized || !p_enabled) {
1056 if(p_sampLineBoundingRect == p_oldSampLineBoundingRect) {
1064 double deltaLeftSamples = p_sampLineBoundingRect[rectLeft] -
1065 p_oldSampLineBoundingRect[rectLeft];
1066 int deltaLeftPixels = (int)round(deltaLeftSamples * p_viewport->scale());
1068 double deltaTopLines = p_sampLineBoundingRect[rectTop] -
1069 p_oldSampLineBoundingRect[rectTop];
1070 int deltaTopPixels = (int)round(deltaTopLines * p_viewport->scale());
1074 if(abs(deltaY) >= p_XYBoundingRect.height() ||
1075 abs(deltaX) >= p_XYBoundingRect.width()) {
1081 if(p_sampLineBoundingRect[rectLeft] != p_oldSampLineBoundingRect[rectLeft]) {
1086 transform->
setResize(p_XYBoundingRect.width(),
1087 p_oldXYBoundingRect.height());
1091 enqueueAction(transform);
1093 QPoint topLeftOfRefill(p_XYBoundingRect.left(),
1094 p_oldXYBoundingRect.top());
1096 QPoint bottomRightOfRefill(p_XYBoundingRect.left() + deltaX,
1097 p_oldXYBoundingRect.bottom());
1098 QRect fillArea(topLeftOfRefill, bottomRightOfRefill);
1101 enqueueAction(fill);
1104 else if(deltaX < 0) {
1108 transform->
setResize(p_XYBoundingRect.width(),
1109 p_oldXYBoundingRect.height());
1111 enqueueAction(transform);
1114 if(p_sampLineBoundingRect[rectRight] !=
1115 p_oldSampLineBoundingRect[rectRight]) {
1116 QPoint topLeftOfRefill(p_XYBoundingRect.right() + deltaX,
1117 p_oldXYBoundingRect.top());
1118 QPoint bottomRightOfRefill(p_XYBoundingRect.right(),
1119 p_oldXYBoundingRect.bottom());
1121 QRect refillArea(topLeftOfRefill, bottomRightOfRefill);
1125 enqueueAction(fill);
1133 transform->
setResize(p_XYBoundingRect.width(),
1134 p_oldXYBoundingRect.height());
1135 enqueueAction(transform);
1138 QPoint topLeftOfFillArea(p_XYBoundingRect.right() + deltaX,
1139 p_oldXYBoundingRect.top());
1141 QPoint bottomRightOfFillArea(p_XYBoundingRect.right(),
1142 p_oldXYBoundingRect.bottom());
1144 QRect fillArea(topLeftOfFillArea, bottomRightOfFillArea);
1147 enqueueAction(fill);
1152 if(p_sampLineBoundingRect[rectTop] != p_oldSampLineBoundingRect[rectTop]) {
1157 transform->
setResize(p_XYBoundingRect.width(),
1158 p_XYBoundingRect.height());
1160 enqueueAction(transform);
1162 QPoint topLeftOfFillArea(p_XYBoundingRect.left(),
1163 p_XYBoundingRect.top());
1164 QPoint bottomRightOfFillArea(p_XYBoundingRect.right(),
1165 p_XYBoundingRect.top() + deltaY);
1166 QRect fillArea(topLeftOfFillArea, bottomRightOfFillArea);
1168 enqueueAction(fill);
1171 else if(deltaY < 0) {
1174 transform->
setResize(p_XYBoundingRect.width(),
1175 p_XYBoundingRect.height());
1177 enqueueAction(transform);
1180 if(p_sampLineBoundingRect[rectBottom] !=
1181 p_oldSampLineBoundingRect[rectBottom]) {
1182 QPoint topLeftOfFillArea(p_XYBoundingRect.left(),
1183 p_oldXYBoundingRect.bottom() + deltaY);
1184 QPoint bottomRightOfFillArea(p_XYBoundingRect.right(),
1185 p_XYBoundingRect.bottom());
1186 QRect fillArea(topLeftOfFillArea, bottomRightOfFillArea);
1188 enqueueAction(fill);
1196 transform->
setResize(p_XYBoundingRect.width(),
1197 p_XYBoundingRect.height());
1198 enqueueAction(transform);
1201 QPoint topLeftOfFillArea(p_XYBoundingRect.left(),
1202 p_XYBoundingRect.bottom() + deltaY);
1203 QPoint bottomRightOfFillArea(p_XYBoundingRect.right(),
1204 p_XYBoundingRect.bottom());
1205 QRect fillArea(topLeftOfFillArea, bottomRightOfFillArea);
1207 enqueueAction(fill);
1220 void ViewportBuffer::addStretchAction() {
1221 for(
int i = 0; i < p_actions->size(); i++) {
1222 if((*p_actions)[i]->getActionType() == ViewportBufferAction::stretch) {
1223 p_actions->removeAt(i);
1241 void ViewportBuffer::emptyBuffer(
bool force) {
1244 p_bufferInitialized =
false;
1257 QRect ViewportBuffer::bufferXYRect() {
1258 QRect rect = p_XYBoundingRect;
1260 if(!rect.height() || !p_buffer.size())
1263 if(rect.height() > (
int) p_buffer.size())
1264 rect.setBottom(rect.top() + p_buffer.size() - 1);
1266 if(rect.width() > (
int) p_buffer[0].size())
1267 rect.setRight(rect.left() + p_buffer[0].size() - 1);
1281 void ViewportBuffer::scaleChanged() {
1286 updateBoundingRects();
1291 e, IException::Programmer,
"Unable to change scale.", _FILEINFO_);
1302 void ViewportBuffer::enable(
bool enabled) {
1303 bool wasEnabled = p_enabled;
1305 p_enabled = enabled;
1307 if(!wasEnabled && p_enabled) {
1308 updateBoundingRects();
1319 void ViewportBuffer::setBand(
int band) {
1324 updateBoundingRects();
1340 void ViewportBuffer::reinitialize() {
1345 if(working() && p_initialStretchDone) {
1350 for(
int i = p_actions->size() - 1; i > 0; i--) {
1351 delete(*p_actions)[i];
1352 p_actions->pop_back();
1357 if(curAction->
getActionType() == ViewportBufferAction::fill) {
1362 p_requestedFillArea = fill->
getRect()->height() *
1369 p_requestedFillArea = 0.0;
1374 p_bufferInitialized =
true;
1378 enqueueAction(reset);
1380 if (p_XYBoundingRect.isValid()) {
1382 transform->
setResize(p_XYBoundingRect.width(), p_XYBoundingRect.height());
1383 enqueueAction(transform);
1386 enqueueAction(fill);
1393 "Unable to resize and fill buffer.",