Changeset View
Changeset View
Standalone View
Standalone View
libs/odf/KoOdfGraphicStyles.cpp
Show First 20 Lines • Show All 332 Lines • ▼ Show 20 Line(s) | 323 | } else if (type == "linear" || type == "axial") { | |||
---|---|---|---|---|---|
333 | lg->setFinalStop(QPointF(0.5 - sx, 0.5 + sy)); | 333 | lg->setFinalStop(QPointF(0.5 - sx, 0.5 + sy)); | ||
334 | gradient = lg; | 334 | gradient = lg; | ||
335 | } else | 335 | } else | ||
336 | return QBrush(); | 336 | return QBrush(); | ||
337 | 337 | | |||
338 | qreal border = 0.01 * e->attributeNS(KoXmlNS::draw, "border", "0").remove('%').toDouble(); | 338 | qreal border = 0.01 * e->attributeNS(KoXmlNS::draw, "border", "0").remove('%').toDouble(); | ||
339 | QGradientStops stops; | 339 | QGradientStops stops; | ||
340 | if (type != "axial") { | 340 | if (type != "axial") { | ||
341 | // In case of radial gradients the colors are reversed, because OOo saves them as the oppsite of the SVG direction | 341 | // In case of radial gradients the colors are reversed, because OOo saves them as the opposite of the SVG direction | ||
342 | // see bug 137639 | 342 | // see bug 137639 | ||
343 | QGradientStop start; | 343 | QGradientStop start; | ||
344 | start.first = (type != "radial") ? border : 1.0 - border; | 344 | start.first = (type != "radial") ? border : 1.0 - border; | ||
345 | start.second = QColor(e->attributeNS(KoXmlNS::draw, "start-color", QString())); | 345 | start.second = QColor(e->attributeNS(KoXmlNS::draw, "start-color", QString())); | ||
346 | start.second.setAlphaF(0.01 * e->attributeNS(KoXmlNS::draw, "start-intensity", "100").remove('%').toDouble()); | 346 | start.second.setAlphaF(0.01 * e->attributeNS(KoXmlNS::draw, "start-intensity", "100").remove('%').toDouble()); | ||
347 | 347 | | |||
348 | QGradientStop end; | 348 | QGradientStop end; | ||
349 | end.first = (type != "radial") ? 1.0 : 0.0; | 349 | end.first = (type != "radial") ? 1.0 : 0.0; | ||
▲ Show 20 Lines • Show All 434 Lines • Show Last 20 Lines |