Changeset View
Changeset View
Standalone View
Standalone View
src/lib/marble/geodata/graphicsitem/GeoPolygonGraphicsItem.cpp
Context not available. | |||||
291 | } | 291 | } | ||
---|---|---|---|---|---|
292 | } | 292 | } | ||
293 | 293 | | |||
294 | void GeoPolygonGraphicsItem::paint( GeoPainter* painter, const ViewportParams* viewport, const QString &layer ) { | 294 | void GeoPolygonGraphicsItem::paint( GeoPainter* painter, const ViewportParams* viewport, const QString &layer ) | ||
295 | { | ||||
295 | if (layer.endsWith("/frame")) { | 296 | if (layer.endsWith("/frame")) { | ||
296 | paintFrame(painter, viewport); | 297 | paintFrame(painter, viewport); | ||
297 | } else if (layer.endsWith("/roof")) { | 298 | } else if (layer.endsWith("/roof")) { | ||
Context not available. | |||||
575 | if (m_cachedTexturePath != style()->polyStyle().texturePath() || m_cachedTextureColor != style()->polyStyle().paintedColor() ) { | 576 | if (m_cachedTexturePath != style()->polyStyle().texturePath() || m_cachedTextureColor != style()->polyStyle().paintedColor() ) { | ||
576 | if (textureImage.hasAlphaChannel()) { | 577 | if (textureImage.hasAlphaChannel()) { | ||
577 | m_cachedTexture = QImage ( textureImage.size(), QImage::Format_ARGB32_Premultiplied ); | 578 | m_cachedTexture = QImage ( textureImage.size(), QImage::Format_ARGB32_Premultiplied ); | ||
578 | m_cachedTexture.fill(style()->polyStyle().paintedColor()); | 579 | QColor fillColor = style()->polyStyle().paintedColor(); | ||
580 | fillColor.setAlpha(fillColor.alpha() * 0.25); | ||||
581 | m_cachedTexture.fill(fillColor); | ||||
579 | QPainter imagePainter(&m_cachedTexture ); | 582 | QPainter imagePainter(&m_cachedTexture ); | ||
580 | imagePainter.drawImage(0, 0, textureImage); | 583 | imagePainter.drawImage(0, 0, textureImage); | ||
581 | } | 584 | } | ||
Context not available. | |||||
596 | } | 599 | } | ||
597 | } | 600 | } | ||
598 | 601 | | |||
602 | GeoDataFeature::GeoDataVisualCategory const cat = feature()->visualCategory(); | ||||
603 | if ((cat >= GeoDataFeature::LeisureGolfCourse && cat <= GeoDataFeature::LanduseVineyard) | ||||
604 | ||cat == GeoDataFeature::Building | ||||
605 | ||(cat >= GeoDataFeature::NaturalWater && cat <= GeoDataFeature::NaturalHeath) | ||||
606 | ||(cat >= GeoDataFeature::HighwaySteps && cat <= GeoDataFeature::HighwayMotorway)) { | ||||
607 | QBrush brush = painter->brush(); | ||||
608 | QColor color = brush.color(); | ||||
609 | color.setAlpha(color.alpha()*0.25); | ||||
610 | brush.setColor(color); | ||||
611 | painter->setBrush(brush); | ||||
612 | } | ||||
613 | | ||||
599 | return currentPen; | 614 | return currentPen; | ||
600 | } | 615 | } | ||
601 | 616 | | |||
Context not available. |