image size automatically determined from JKQTPDatastore

This commit is contained in:
jkriege2 2019-05-18 13:31:07 +02:00
parent 5f62722d38
commit 028f192e7b
4 changed files with 28 additions and 0 deletions

View File

@ -217,6 +217,10 @@ void JKQTPContour::setImageColumn(size_t columnID)
{
datatype=JKQTPMathImageBase::DoubleArray;
data=parent->getDatastore()->getColumnPointer(columnID,0);
if (parent && columnID>=0 && parent->getDatastore()) {
setNx(parent->getDatastore()->getColumnImageWidth(columnID));
setNy(parent->getDatastore()->getColumnImageHeight(columnID));
}
}

View File

@ -1741,6 +1741,10 @@ int JKQTPColumnMathImage::getImageColumn() const
void JKQTPColumnMathImage::setModifierColumn(int __value)
{
this->modifierColumn = __value;
if (parent && __value>=0 && parent->getDatastore()) {
setNx(parent->getDatastore()->getColumnImageWidth(__value));
setNy(parent->getDatastore()->getColumnImageHeight(__value));
}
}
int JKQTPColumnMathImage::getModifierColumn() const

View File

@ -345,6 +345,10 @@ JKQTPColumnOverlayImageEnhanced::JKQTPColumnOverlayImageEnhanced(JKQTPlotter *pa
void JKQTPColumnOverlayImageEnhanced::setImageColumn(int __value)
{
this->imageColumn = __value;
if (parent && __value>=0 && parent->getDatastore()) {
setNx(parent->getDatastore()->getColumnImageWidth(__value));
setNy(parent->getDatastore()->getColumnImageHeight(__value));
}
}
int JKQTPColumnOverlayImageEnhanced::getImageColumn() const

View File

@ -1353,6 +1353,10 @@ int JKQTPColumnRGBMathImage::getModifierColumn() const
void JKQTPColumnRGBMathImage::setModifierColumn(int __value)
{
this->modifierColumn = __value;
if (parent && __value>=0 && parent->getDatastore()) {
setNx(parent->getDatastore()->getColumnImageWidth(__value));
setNy(parent->getDatastore()->getColumnImageHeight(__value));
}
}
int JKQTPColumnRGBMathImage::getImageBColumn() const
@ -1363,6 +1367,10 @@ int JKQTPColumnRGBMathImage::getImageBColumn() const
void JKQTPColumnRGBMathImage::setImageBColumn(int __value)
{
this->imageBColumn = __value;
if (parent && __value>=0 && parent->getDatastore()) {
setNx(parent->getDatastore()->getColumnImageWidth(__value));
setNy(parent->getDatastore()->getColumnImageHeight(__value));
}
}
int JKQTPColumnRGBMathImage::getImageGColumn() const
@ -1373,6 +1381,10 @@ int JKQTPColumnRGBMathImage::getImageGColumn() const
void JKQTPColumnRGBMathImage::setImageGColumn(int __value)
{
this->imageGColumn = __value;
if (parent && __value>=0 && parent->getDatastore()) {
setNx(parent->getDatastore()->getColumnImageWidth(__value));
setNy(parent->getDatastore()->getColumnImageHeight(__value));
}
}
int JKQTPColumnRGBMathImage::getImageRColumn() const
@ -1383,4 +1395,8 @@ int JKQTPColumnRGBMathImage::getImageRColumn() const
void JKQTPColumnRGBMathImage::setImageRColumn(int __value)
{
this->imageRColumn = __value;
if (parent && __value>=0 && parent->getDatastore()) {
setNx(parent->getDatastore()->getColumnImageWidth(__value));
setNy(parent->getDatastore()->getColumnImageHeight(__value));
}
}