Changeset View
Changeset View
Standalone View
Standalone View
src/items/image/KReportItemImage.cpp
Show First 20 Lines • Show All 163 Lines • ▼ Show 20 Line(s) | 163 | if (mode().toLower() == QLatin1String("stretch")) { | |||
---|---|---|---|---|---|
164 | id->setScaled(true); | 164 | id->setScaled(true); | ||
165 | id->setAspectRatioMode(Qt::KeepAspectRatio); | 165 | id->setAspectRatioMode(Qt::KeepAspectRatio); | ||
166 | id->setTransformationMode(Qt::SmoothTransformation); | 166 | id->setTransformationMode(Qt::SmoothTransformation); | ||
167 | } | 167 | } | ||
168 | 168 | | |||
169 | id->setPosition(scenePosition(position()) + offset); | 169 | id->setPosition(scenePosition(position()) + offset); | ||
170 | id->setSize(sceneSize(size())); | 170 | id->setSize(sceneSize(size())); | ||
171 | if (page) { | 171 | if (page) { | ||
172 | page->addPrimitive(id); | 172 | page->insertPrimitive(id); | ||
173 | } | 173 | } | ||
174 | 174 | | |||
175 | if (section) { | 175 | if (section) { | ||
176 | OROImage *i2 = dynamic_cast<OROImage*>(id->clone()); | 176 | OROImage *i2 = dynamic_cast<OROImage*>(id->clone()); | ||
177 | i2->setPosition(scenePosition(position())); | 177 | i2->setPosition(scenePosition(position())); | ||
178 | section->addPrimitive(i2); | 178 | section->addPrimitive(i2); | ||
179 | } | 179 | } | ||
180 | 180 | | |||
181 | if (!page) { | 181 | if (!page) { | ||
182 | delete id; | 182 | delete id; | ||
183 | } | 183 | } | ||
184 | 184 | | |||
185 | return 0; //Item doesn't stretch the section height | 185 | return 0; //Item doesn't stretch the section height | ||
186 | } | 186 | } | ||
187 | 187 | | |||
188 | 188 | |